Jump to content

Currency 500 $ instead of $500


Recommended Posts

I guess is something in the /classes/Currency.php around:

    /**
     * Return formated sign
     *
     * @param string $side left or right
     * @return string formated sign
     */
   public function getSign($side=NULL)
   {
       if (!$side)
           return $this->sign;
       $formated_strings = array(
           'left' => $this->sign.' ',
           'right' => ' '.$this->sign
       );
       $formats = array(
           1 => array('left' => &$formated_strings['left'], 'right' => ''),
           2 => array('left' => '', 'right' => &$formated_strings['right']),
           3 => array('left' => &$formated_strings['left'], 'right' => ''),
           4 => array('left' => '', 'right' => &$formated_strings['right']),
       );
       return ($formats[$this->format][$side]);
   }



But I can't figure out... Hope this help a bit...

Link to comment
Share on other sites

Hello,

Instead of showing the currency sign infront the digit I wants it back of the digit.
Where in the code doI change this?

Now: $500 Wants to change to : 500$

Thanks!

You open tool.php at ./classes/tool.php
and you find tags:
switch ($c_format)


and you can do it here

      /* X 0,000.00 */
             case 1:
               $ret = $c_char.$blank.number_format($price, $c_decimals, '.', ',');
               break;
           /* 0 000,00 X*/
           case 2:
               $ret = number_format($price, $c_decimals, ',', ' ').$blank.$c_char;
               break;
           /* X 0.000,00 */
           case 3:
               $ret = $c_char.$blank.number_format($price, $c_decimals, ',', '.');
               break;
           /* 0.000,00 X */
           case 4:
               $ret = number_format($price, $c_decimals, ',', '.').$blank.$c_char;
               break;

Link to comment
Share on other sites

I wish you chaps wouldn't meddle with the core code >:(

In Back Office -> Payment ->Currencies you find the option to format the positioning of the symbols etc. for each currency. The Formatting drop-down box should do the trick?

:snake:

Paul

Link to comment
Share on other sites

×
×
  • Create New...