Contrib type:
ModuleModeration:
Limited approvalStatus:
Complete and workingSponsored by:
Finesse SolutionsCompatibility:
Ubercart 1.xLatest version:
1.05This module enhances Ubercart by allowing a store to display product prices to customers in multiple currencies.
Please read the included README.txt for details and installation instructions. Really. Don't even try to skip this step. There's important information in there, and if you don't follow all the special instructions it won't work.
| Attachment | Size |
|---|---|
| multicurrency-1.05.tar.gz | 13.57 KB |



Thank you very much, will
Thank you very much, will test it at once tonight
Thanks.
quote from permalink
Can multi-currency support and ip-based be used together so that a visitor from Europe can automatically sees the price in Euro and a visitor from USA sees it in USD?
Can this be integrated with i18n?
Re: Thanks.
Yes, they can be used together. Works well.
I don't know how the i18n module works, and I haven't tried it. Multi-currency only needs a mechanism for a user to choose a country, or to have Drupal determine the country automatically. That mechanism could be the Profile module, or could be something provided by the Internationalization module, or could be something else like the IP-based determination of country. In any case, integration is easy.
Does i18n deal with country information or just language information? Knowing the customer's language is "English" is not enough to figure out what currency to use. The currency could be US Dollars, Canadian Dollars, British Pounds, even Japanese Yen for an English-speaker living in Japan, etc. ...
Re: Re: Thanks.
I tried this, but unfortunately I have got an error after activating the module:
Fatal error: Cannot redeclare uc_currency_format() (previously declared in C:\wamp\www\drupal-5.10\sites\all\modules\ubercart\uc_store\uc_store.module:1855) in C:\wamp\www\drupal-5.10\sites\all\modules\multicurrency\uc_multicurrency.module on line 987and this after refresh:
Fatal error: Cannot redeclare uc_currency_format() (previously declared in C:\wamp\www\drupal-5.10\sites\all\modules\multicurrency\uc_multicurrency.module:881) in C:\wamp\www\drupal-5.10\sites\all\modules\ubercart\uc_store\uc_store.module on line 1878I'm using drupal 5.10, ubercart 1.3 (and the needed modules - token, workflow_ng, ubrowser, tapir) and currency module(is it the right currency module?).
Any suggestions?
Re: Re: Re: Thanks.
You obviously didn't read the README.txt. Let me repeat myself:
Re: Re: Re: Re: Thanks.
Geez, sorry for wasting your time with stupid question
I did read your note, but before I returned back to this module after some other work I totaly forget about it. It works now.
How directly switch currencies
This module is very great - but i have one big trouble with it
My shop trade only in ONE country and my customers want to chose THREE different currencies. But i ddin't find any way to directly switch bettween currencies.
So, how can i implement a select-list with all currencies, which available on site?
Re: How directly switch currencies
The intent behind this module is to let the business owner, not the customer, determine which currencies can be used. It is based on the country because currencies are issued by countries, and the law in each country determines what currency is a legal tender (i.e. *must* be accepted as payment in that country). Accepting payment in a currency that is not legal tender in the store's country will cost the store money, because of conversion fees. Just because a store in the US for instance will accept payment in Euros from a customer in France doesn't mean the store wants to accept Euros from a customer in the US! The currency alone, without consideration of country, is not enough choice for the business owner. There are also other laws for exporting and importing goods which may restrict which countries you can sell and ship to, regardless of currency. That is why the choice of currencies must be in the hands of the business owner and is naturally intertwined with the choice of countries you sell to - it is a business decision. This module lets you sell to other countries and still control which currencies you will accept from those countries.
There *is* an assumption in this module that you will only want to accept one currency from any one country. Do you really have three legal currencies in your country? If so, the easiest way to deal with that is to create three .CIF files for your country, with the currency appended to the name. For example, "Switzerland - Swiss Franc", "Switzerland - Euro", "Switzerland - US Dollar". Then you can use the built-in mechanism of this module to allow your customers to choose which one of these three they want to use, and still control the currencies used and the countries you sell to.
I have not made any provision for choosing multiple allowed currencies per country, but if that is a common need I will consider adding it.
Thanks for advice!
My country (Russia) doesn't have three legal currencies. But the owner of a shop just wants to show prices in 3 currencies.
And your module can do this in a greate way.
Thanks for advice!
But the best way - it will be a simple block with direct currency select.
When can you do this functionality?
One more question
I find out that unauthorized user can't change currency because module saves user selection in $user variable.
I think - it will be very usefull to allow all user to change currency.
For unauthorized users module can save their choice in cookie - like uc_cart saves carts.
Using Multi-Currency module for handling VAT
I am setting up a Swedish B2C site selling british country clothing to mostly, but not only, scandinavians. Prices in catalog, checkout etc to european customers must be shown swedish VAT (moms) included, but to for instance Norway and and US prices should be shown without VAT. I know this module is not intended for VAT issues, but what do you think about this idea:
Default currency will be SEK including 25% VAT. This means prices will be managed including VAT. Fortunately for the goods in this store there is only one VAT rate. The tax-module will not be used. For EU-customers currency (Euro, DK etc) will be converted at the market rate. For non-EU customers (who should not pay VAT) currency (NOK, USD etc) will be converted using a multiplicative factor to deduct VAT (NOK Price = SEK Price * exchange rate * 80%). The names of the currencies will be set to include VAT information (for instance "SEK incl. VAT" and "NOK excl. VAT").
A couple of things has to be solved to make it work:
1. The VAT amount (20 % of the total order value including shipping) must be shown at the order review and invoice (and preferably at the checkout) for EU customers, but not for non-EU customers. The VAT amount should not be added to the total order value of course. I think we can do this by some dirty coding in the core. Does anyone have a better idea?
2. Anonymous users must be able to see the prices, at least in the default currency. I did not quite understand what modification to the core Ubercart function uc_currency_format()that is needed to do that, as mentioned in the readme-file. Preferably anonumous users should be able to choose currency, but this does not seam possible with this module in present state.
3. The currency (and VAT in this case) available for users at checkout should be controlled by the billing adress. Customers must not be able to buy goods in any other currency because VAT free orders can legaly be given only to non EU-citizens. When an anonymous user chooses billing adress the Currency (and VAT in this case) must be changed accordingly from the default currency, and the cart must be recalculated. How does the Multi-currency module handle this?
4. The payment module must be able to export the currency seleced and the order payment details accordingly, thus be fully integrated with the Multi-currency module. I am checking out if this is possible.
I would be most gratefull for any comments on this approach. And if anyone has a better idea for handling VAT and currencies please let me know.
Regards,
Karl Oskar
Re: One more question
I think - it will be very useful to allow all user to change currency.
@TR: I would strongly prefer to save the selected country in
$_SESSION['country']. Then you could first check if$_SESSION['country']is set, else fall back to the store's country and it works also before login.Option for customers to switch between the currencies
Thanks to the author of this module for putting together all the complex requirements in a user friendly way
It would be super, if you can add the option for customers be able to switch between different currencies.
Of late we've realised this requirement is getting common now a days, most of our business clients needed this feature. Thanks
Re: Multi-Currency Support
Can this module show the prices calculated according to a rate of exchange?
F.e. I would always like to input prices in EUR, but calculate them automatically on a daily basis ('how' is another question, I'm just asking what exactly this module does) and show to a visitors who will choose USD in USD and for those who will choose SEK in SEK, etc.
Does anyone tried to integrate it with other Drupal modules, like Profile or i18n?
Quote:Can this module show
F.e. I would always like to input prices in EUR, but calculate them automatically on a daily basis ('how' is another question, I'm just asking what exactly this module does) and show to a visitors who will choose USD in USD and for those who will choose SEK in SEK, etc.
Yes, that's exactly what it does. There are lots of details in the README.txt.
Re: Quote:Can this module show
I renamed uc_currency_format() to uc_currency_format_original() in uc_store.module. There were around 6 places where uc_currency_format was defined where I added _original in front of it. But when I try to access my drupal website I'm getting
Fatal error: Call to undefined function uc_currency_format() in /home/himag/public_html/drupal/sites/all/themes/flowers/template.php on line 54
I'm not familiar with php, so I don't know if I renamed functions right in uc_store.module. Or is there a problem in template.php?
What I renamed was something like this in 6 places of uc_store.module:
array('data' => uc_currency_format($order->order_total), 'nowrap' => 'nowrap')),To
array('data' => uc_currency_format_original($order->order_total), 'nowrap' => 'nowrap')),Re: Re: Quote:Can this module show
No, that's not what you're supposed to do. There is only one place the function is defined, and you just have to rename the entire function definition. See my reply to http://www.ubercart.org/issue/6886/installation_readme_file.
Theming question
Hi!
Great module, even better documentation!
I have a theming question, I use a template on my product pages but for some reason when the template is enabled, the price is not changing when I try to switch country from the block. It does work great when the template is not enabled. I use $node->sell_price to display the price.
Any help would be great!
Thanks,
Rob
Ok, answering my question
Ok,
answering my question and maybe helping people struggle with the same issue:
<?php $value = $node->sell_price; ?><?php $price = uc_currency_format($value); ?>
<h2><?php print $price; ?></h2>
This did the trick for me.
Rob
Or just <?php print
Or just
<?php print uc_currency_format($node->sell_price); ?>Obviously I'm in GMT time
Obviously
I'm in GMT time zone and a bit tired now...
Thanks anyway
Thanks TR. This time I
Thanks TR.
This time I renamed only the main one function as described by you but now I'm getting a Fatal error: Call to undefined function uc_currency_format() in /home/himag/public_html/drupal/sites/all/modules/ubercart/uc_catalog/uc_catalog.module on line 995
And also I'm using [function phptemplate_uc_cart_block_content] in phptemplate which has uc_currency_format() so I'm also getting Fatal error: Call to undefined function uc_currency_format() in /home/himag/public_html/drupal/sites/all/themes/flowers/template.php on line 54
I'm not getting how to make this work?
unregistered customers need to see prices
Hi
On my webpage, unregistered customers need to see prices in diferent currency without registration. Is it possible to do that without registration? Tahnx for reply
it doesn't work, help please
Hi
I read this in readme.txt file:
Because Drupal caches pages for anonymous users, the only way to handle
displaying multiple currencies to different anonymous users is to turn off
caching entirely (which I don't recommend)
I've got page cache disabled.
And it doesn't work.
Also this doesn't work:
Anonymous users see prices using the default store currency. My anonymous users can see the prices only in USD currency. When I setup Default Country: Slovak republic or some other country it just doesn't work. It still shows in USD but in country selection block is the right country. When anonymous users try to change country selection to some other country afrer submit it will show in block default store currency.
When I log in everything is perfect. I don't understand what I do wrong.
Could anybody help me please?
Thank you
Re: it doesn't work, help please
That quote is out of context - this module does not display different currencies for anonymous users under any circumstance. The currency that anonymous users see is determined by the settings at admin/store/settings/multicurrency and admin/store/settings/multicurrency/countries. You have to set the default country to be used for anonymous users and the currency to use for that country. Then you should flush your page cache so that pages are rebuilt using these new settings.
Re: Multi-Currency Support
It would be great if this module could be renamed uc_multicurrency, the way many (most?) other contrib modules are.
Re: Re: it doesn't work, help please
Given that one of the Ubercart's great features is anonymous checkout, wouldn't it be useful to consider having this work module for anonymous users as well?
Re: Multi-Currency Support
Thanks for this great module.
I read the README.txt and one thing that's still confusing to me is whether renaming the function in uc_store module of ubercart core would make upgrades difficult.
Re: Multi-Currency Support
I need the multicurrency functionality for anonymous users, any directions on modifying the module to accomplish that?
Re: Re: Multi-Currency Support
@venkat-rk, actually when upgrading to new UC, one has to rename uc_currency_format() funcion in the uc_store.module.
@ManuelMendoza, this is an awesome contribution to UC. i would also love to see multi-currency and ip-based module converted to anonymous functionality.
D6 Port for Multi Currency
Please make D6 port for it..
Thanks
Compatibility for all currencies that paypal accepts?
Does this work with paypal?
I've selected Australian Dollar and it is showing perfectly through out the website but when I click on "submit order" on checkout page which took me to paypal website, where the Australian Dollar (AU$ 50 in uber store) converted to United States Dollar (US$ 50 in paypal website)? This is kinda wired....I was expecting that paypal website will show same prices in Australian dollar rather it showed same amount in USD and didn't even re-converted currency...
In admin/store/settings/payment/edit/methods currency code is selected as USD. Is there a way in which a user can choose the currency in which they want to make payment?
Currently paypal accept payments in 18 currency which I would like to integrate in uber store. At least 5 major currencies. Does anyone know how to integrate them with paypal.....
Re: Compatibility for all currencies that paypal accepts?
This is an issue that can arise with payment modules, and is mentioned in the README.txt for the Multicurrency module. Specifically, the Multicurrency module has no control over how the payment modules are coded, and as many/most are coded without regard to multiple currencies, an examination of the payment module is necessary to ensure that you send the correct amounts/currencies to the payment processor.
The PayPal module has its own variable, set in the admin pages for that module, which controls what currency is used for the transaction. If you want to accept PayPal payments in different currencies, you will have to modify the PayPal module. The lines you need to change are the ones starting with
'CURRENCYCODE'. Right now they take the currency code value from the PayPal module variable. You will have to change this to use the currency code provided by the Multicurrency module. I don't have time right now to design and test a patch for the PayPal module.thanks again, TR. I hope you
thanks again, TR.
I hope you would consider making a patch or integration in near future for above issue.
Re: Compatibility for all currencies that paypal accepts?
This is fairly easy to fix. In sites/all/ubercart/payment/uc_paypal, modify uc_paypal.module as follows:
in function uc_paypal_wps_form($order), add these lines:
$mycountry = uc_multicurrency_get_country();
$mycurrency = variable_get('uc_multicurrency_country_currency_'.$mycountry, 'USD');
(make sure the above lines are inserted before the following lines):
$data = array(
// PayPal command variable
Then comment out this line:
'currency_code' => variable_get('uc_paypal_wps_currency', 'USD'),
and replace it with this:
'currency_code' => $mycurrency,
Seems to work fine for me.
Re: Re: Compatibility for all currencies that paypal accepts?
Thank you so much "G". It worked like a charm.