This patch adds a some new form fields to the Country format settings page. Here, admins can set different currency formats for each of the countries they have enabled. These settings are stored in a new table, "uc_multiprice_currencies", and they are applied with a price handler alterer. So, customers from UK can see a price in pounds, while US customers will see dollars.

The API for price handlers should be changing very soon, so I'll update this patch when that happens (or supply a new one if this is committed first).

CommentFileSizeAuthor
#4 546084.patch11.38 KBstella
multiprice_currencies.patch8.01 KBIsland Usurper

Comments

Docc’s picture

Great patch. Ill test it and out and try to commit to dev this week. Tnx!

Docc’s picture

K patch looks good. One question though. Why only the sell price and not the list and cost price aswell?

Island Usurper’s picture

Actually, I think it may be worth taking out the check for the node in the $context['subject']. The way the patch is now, the checkout page will still show up in dollars. On the site I'm using this, I've taken out both of the if() statements in the price handler alterer.

The only reservation I have about putting that into the module itself is that the prices don't really match up on the order pages. Some orders are in one currency, and some are in another, and there's no information yet that distinguishes them. I suppose uc_multiprice could add the user's country_id or currency code to the $order->data, and then use that in the price alterer when it is available.

stella’s picture

StatusFileSize
new11.38 KB

Here's a re-rolled version that allows a different currency to be displayed in the cart and during checkout, depending on the country selected. I've also added a country selection pane to the cart.

Cheers,
Stella

Docc’s picture

Tnx stella. I commited Island his patch to HEAD together with your changes.
I will be playing with it some more before i update the dev branche with it.

stefan81’s picture

Hi, thanks for your work. exactly what I need!
Installed it on D6 / UC 2 and it works fine!

davemybes’s picture

subscribe

liliplanet’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev

Hi,

I see the patch is already included in the latest dev version, but somehow I'm missing something :)

The change region block changes the amount due say for instance USD122.00 and you change the country for Britain (price is GPB100.00), you see $122.00 and not the GBP in front.

In other words the currency label does not change, but the amount is correct.

Look forward to any reply, and thank you for this module!
Lilian

plasticlax’s picture

subscribe

ericwongcm’s picture

The change region block changes the amount due say for instance USD122.00 and you change the country for Britain (price is GPB100.00), you see $122.00 and not the GBP in front.

In other words the currency label does not change, but the amount is correct.

Try changing the "Currency Sign:" from say "$" to "USD$"
(or is there a better way to display the three character ISO 4217 currency code, by simply displaying the currency code automatically that is recognized and stored by the system anyway?)

Note: doing so will cause problem with Paypal gateway which I am waiting for a solution. See issue: http://drupal.org/node/621424

Docc’s picture

Status: Needs review » Closed (fixed)

No activity for more then 2 weeks.

pitxels’s picture

I have this problem actually:

Currency is changing ok on the content area (after I edit and save the node)

But shopping cart BLOCK is showing the default currency only.

pitxels’s picture

Status: Closed (fixed) » Needs work
Docc’s picture

Try the latest dev and let me know if this problem still occurs. Also name the ubercart version you using

lpalgarvio’s picture

subscribe

ericwongcm’s picture

Continuing from #10

Right now, UC_Multiprice only allow one to change the "Currency Sign:".
Changing the currency sign is only useful for limited number of currencies, Dollars ($), Euro ( €), etc.
For other countries, e.g. New Zealand, Australia, Hong Kong that also use the dollar sign, it is impossible to tell what the currency is.

Can you please add the option to also allow UC_Multiprice to also display the three character ISO 4217 currency code, as a prefix or suffix?
Somewhat similar to Format Currency module - http://drupal.org/project/format_currency
(I had tried installing the Format Currency module but it doesn't work as is to display the currency code in ubercart)

As I suggested before, I can add the three character ISO 4217 currency code in the "Currency Sign:" to differentiate the currency, but this will cause problem with Paypal gateway as the three character code is not recognized.

bartezz’s picture

Status: Needs work » Closed (won't fix)

Hi hdmp4,

You could write your own price_handler functionality in a custom module to fix this I would think.
http://www.ubercart.org/docs/developer/11375/price_api

For now marking as won't fix as I think this is a rather specific request.

Cheers

pobster’s picture

> For now marking as won't fix as I think this is a rather specific request.

It is very specific and you're quite correct (above) exactly what http://drupal.org/project/format_currency is for. Note that it *does* work, the Economist website use it to display currency information on their pay barrier page. It just requires knowledge of how to implement theme() function calls.

Thanks,

Pobster

  • Docc committed f1b64ae on 7.x-2.x
    #546084 Let different prices show different currencies by Island Usurper...