Jump to content

Problem symbol decimal place


Recommended Posts

Greetings friends

I am very happy with my CubeCart Version 5.2.16, but would like to know how to fix the decimal symbol ..
In my country we separate the decimal with point (eg, 1,000.00) but my shop is reversed (eg 1,000.00)
As I can fix that ...?

 

Thank You ...

 

 

Link to comment
Share on other sites

Welcome GilBytes! Glad to see you made it to the forums.

 

In CC5, there is no direct way to make this change. There is a column in the CubeCart_currencies table, symbol_decimal, that if it holds a zero (0) value, the decimal symbol is a period. If the column holds a one (1) value, the decimal symbol is a comma.

 

To add the ability to update/edit this configuration, make these edits to /admin/skins/default/templates/settings.currency.php:

Find near line 27:
<td><input type="text" name="currency[{$currency.code}][decimal_places]" class="textbox number edited" value="{$currency.decimal_places}" /></td>
 
Add after:
<td>
<select name="currency[{$currency.code}][symbol_decimal]" class="textbox">
<option value="0" {$currency.c_p_selected}>period</option>
<option value="1" {$currency.p_c_selected}>comma</option>
</select>
</td>
 
Find near line 13:
<td align="center">{$LANG.settings.currency_decimal_places}</td>
 
Add After:
<td align="center">{$LANG.settings.currency_decimal_orientation}</td>

In the file /language/YOUR_LANGUAGE.xml:

Find in the "Settings" group:
<string name="currency_decimal_places" introduced="5.0.0"><![CDATA[Decimal Places]]></string>
 
Add After:
<string name="currency_decimal_orientation" introduced="5.0.0"><![CDATA[Decimal Symbol]]></string>

In the file /admin/sources/settings.currency.inc.php:

Find near line 110:
$currency['updated'] = formatTime($currency['updated']);
 
Add After:
$currency['c_p_selected'] = ($currency['symbol_decimal']) ? '' : ' selected="selected"' ;
$currency['p_c_selected'] = (!$currency['symbol_decimal']) ? '' : ' selected="selected"' ;

These instructions have yet to edit the "Add Currency" function.

Link to comment
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

×
×
  • Create New...