开发者

Change product currency and price in ubercart-based drupal with variable price

开发者 https://www.devze.com 2023-03-14 17:10 出处:网络
I run a donation site in Drupal, that soon needs to expand to another country, and will need to support not only switch of language, but also currency. The thing is, users donate money to charity in t

I run a donation site in Drupal, that soon needs to expand to another country, and will need to support not only switch of language, but also currency. The thing is, users donate money to charity in their own currency, and this needs to be summed up to a total amount of donations shown to the current user in their own currency.

A fundraiser is an ubercart product that users "buy" at a variable price, thus making 开发者_JAVA技巧a donation. I am creating a custom Donation node with each ubercart purchase containing CCK fields such as the amount donated.

So what I need to allow is this:

  1. A user makes a donation in, say, Euro, EUR
  2. Another user makes a donation in Danish Kroner, DKK
  3. A third user views the site in US locale and should see all the donations converted to USD based off of the exchange rate at the time of donation for all the donations.

And it gets a little more difficult: We are using the UC variable price module to allow users to donate any amount they see fit.

So can this be accomplished using Drupal and Ubercart, and if so, how?


I am afraid that you will end up writing your own plug-in to convert currencies.

The problem with the conversion is, this is something that changes but you already realized this. The only source of exchange rates I know is Oanda and they seem to have their own Data Feed.
Unfortunately, I cannot tell if you would be allowed to use it for free, I believe it would be good to ask them.

0

精彩评论

暂无评论...
验证码 换一张
取 消