Jump to content

[solveed] Two currency but show just one, US default but other only in fo


Recommended Posts

Hi, we have a site prestashop in Argentina, and our quote product depends directly on the dollar, but the dollar is not accepted in our stores, then we want to do is load the Sales Price in dollars to fluctuate with the quote, and is displayed only in ARGENTINE PESOS.

 

Sorry for my poor english.

Link to comment
Share on other sites

yes, that works, but because we have the prices in BO in ARS.

 

how now set the prices in usd ? 

 

set prices in back office using USD and not ARS?

 

if yes, then you would need to change your shop's default currency, this will require that you change all prices in back office basis from ARS to USD.  bo--->localization-->localization-->set shop default currency

Link to comment
Share on other sites

set prices in back office using USD and not ARS?

 

if yes, then you would need to change your shop's default currency, this will require that you change all prices in back office basis from ARS to USD.  bo--->localization-->localization-->set shop default currency

 

warning: once you do this then front office will display USD.

 

you will need a custom mortification to have back office shop default currency USD but only display ARS in front office.

Link to comment
Share on other sites

told me about the custom modification :)

 

if you are familiar with php you can modify the classes/Tools.php

 

Note: this is UNTESTED CODE, it may or may not work.  Back up original first.  This is used only as example, there may be other modifications required.

 

tip: after change, you will need to clear your browser cookie for this domain as ps will remember last currency.

 

look for function setCurrency

find:  and change as shown

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

change as follows (where 6 = is replaced with currency id of ARS (bo-->localization-->currencies)

$currency = Currency::getCurrencyInstance(6);

if this does not work for you then posting in job offers would be good way to proceed,.

 

another tip: after installing change or making other modifications to class files, delete this file

 

cache/class_index.php

  • Like 2
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

Eyyy Patron, on the new presta dont work, every page goes blank if i change that line, any help ? 

 

 

if you are familiar with php you can modify the classes/Tools.php

 

Note: this is UNTESTED CODE, it may or may not work.  Back up original first.  This is used only as example, there may be other modifications required.

 

tip: after change, you will need to clear your browser cookie for this domain as ps will remember last currency.

 

look for function setCurrency

find:  and change as shown

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

change as follows (where 6 = is replaced with currency id of ARS (bo-->localization-->currencies)

$currency = Currency::getCurrencyInstance(6);

if this does not work for you then posting in job offers would be good way to proceed,.

 

another tip: after installing change or making other modifications to class files, delete this file

 

cache/class_index.php

Link to comment
Share on other sites

Eyyy Patron, on the new presta dont work, every page goes blank if i change that line, any help ? 

 

hi, sorry without exact error code I could not even guess. :)

 

this is why I wrote module, so those that do not want to modify core can simply do from back office.

 

module is here: http://etiendas.co/en/home/60-front-office-default-currency.html

Link to comment
Share on other sites

oh, ok.... i dont have 31 dollar to pay this module, i try with a new post to figure out how can change that free :P thanks aniway

 

I understand, the above code given works...but you can't post, 'blank page' or 'some error' and expect a 'fix'...

 

use this post to diagnose issue, post here...we can help...but info man, fact, figures, pie charts...details...

 

http://www.prestashop.com/forums/topic/224525-how-to-turn-on-error-reporting-for-debug-information/

Link to comment
Share on other sites

I understand, the above code given works...but you can't post, 'blank page' or 'some error' and expect a 'fix'...

 

use this post to diagnose issue, post here...we can help...but info man, fact, figures, pie charts...details...

 

http://www.prestashop.com/forums/topic/224525-how-to-turn-on-error-reporting-for-debug-information/

 

 

on the index : 

 

Warning: Cannot modify header information - headers already sent by (output started at /home3/dipa/public_html/dipa.com.ar/classes/Tools.php:1) in /home3/dipa/public_html/dipa.com.ar/classes/Cookie.php on line 330

 

Warning: Cannot modify header information - headers already sent by (output started at /home3/dipa/public_html/dipa.com.ar/classes/Tools.php:1) in /home3/dipa/public_html/dipa.com.ar/classes/controller/FrontController.phpon line 793

 

when i try entry on the back office :

 

Warning: Cannot modify header information - headers already sent by (output started at /home3/dipa/public_html/dipa.com.ar/classes/Tools.php:1) in/home3/dipa/public_html/dipa.com.ar/classes/Cookie.php on line 330

Link to comment
Share on other sites

×
×
  • Create New...