Jump to content
Sign in to follow this  
sindbad

Different currencies for backend and frontend

Recommended Posts

Hi,

I have a question regarding my new online store: is there any possibility to set up two different currencies, for the front end US Dollars and for the back end Euros? I need to do that because I buy the products in Euros and I sell them only in US Dollars, so for the front end I need to show only US Dollar.

Thank you.

Share this post


Link to post
Share on other sites

You can't configure different currencies in FO and BO.

If you only need 1 currency in the FO, a solution may be to activate both currencies, disable the currency selector in the FO and choose the FO currency as the default one. So only this currency will be used in the FO.

Share this post


Link to post
Share on other sites

OK,

thanks for reply. It was nice to have this possibility of choosing because if the currency ratio is changing..... it takes time to update the prices for 200 products.

Share this post


Link to post
Share on other sites

Can't you only edit the change ratio ?
Back Office >> Payment >> Currencies

Share this post


Link to post
Share on other sites

One way can be to hack the Tools::setCurrency() method.
It seems this method compute the current currency to display in FO not used in BO.

So, in file classes/Tools.php, in method setCurrency(), replace

$currency = new Currency(intval(Configuration::get('PS_CURRENCY_DEFAULT')));


by

$currency = new Currency(2);


2 for Dollar, 1 for Euro

Keep the DEFAULT_CURRENCY for the currency in which you buy your product
Set the FO currency by the setCurrency method


You have to remove the cookie to have it working.
I've just tested the FO display.
You need to test the full sequence

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More