Jump to content

[Solved] Manually add a format under currency


Recommended Posts

Greetings,

I'm trying to manually add a currency since it doesn't come default with PrestaShop and I've come across some problems. The main problem is that after adding the new currency it just comes up as 0 instead of getting converted. Originally it worked before when using a default format but the current available formats I cannot use for the new currency.

The currency i added is the Yen currency, ¥.

I tried using the dollar formatting but noticed that it also converts it to the cents area 0,000."00" in which the Japanese do not use this. The formatting I need to use is "¥0,000".

So what I've done on my part is edit "/[adminfolder]/tabs/AdminCurrencies.php" and added the following line after line 147:

5 => 'X0,000 ('.$this->l('as with yen').')',



and also edit "/classes/Currency.php" and included the following line after line 106:

5 => array('left' => &$formated_strings['left'], 'right' => ''),



Did I miss another file that I need to edit to add the correct formatting?

Thanks

Link to comment
Share on other sites

Hi ecchi_goshujinsama!

I think you'll love one of the last 1.1 new feature which allow you to disable the decimal display.
So please download the 1.1beta2 version (or even the last SVN version) go to your Back Office >> Payment >> Currency >> Edition, disable decimals' display and choice $ behavior.
This should solve your issue without editing any code line ;-P

Link to comment
Share on other sites

  • 3 months later...
×
×
  • Create New...