Jump to content

Need help with currency mess I've made


Recommended Posts

This is all my own fault, but I can't find my error. A couple of weeks ago I meant to install the current 6beta into a test subdirectory. But I goofed and installed it on our live site. Thank goodness I have backups, so I installed 5.2.16 over it and made the appropriate edits.

 

Long story short, I'm happy with the downgrade, except for the USD currency period. I'm not really sure if the beta upgrade and then v5b downgrade caused it, but our Blueprint skin now has the comma and period reversed. For instance, five dollars and 28 cents looks like 5,28

 

I've checked, and cPanel  order_summary does show the correct period.

 

So can someone suggest where to look to fix the currency "punctuation"?

Link to comment
Share on other sites

Yes, me too. (I'm sharing the database between CC5 and CC6.)

 

The CC6(beta3) upgrade made some changes to the database, specifically the CubeCart_currency table.

 

I'll have a better idea of what exactly changed to cause this malformed currency display in CC5 shortly.

Link to comment
Share on other sites

Prior to CC600b3, the CubeCart_currency table had for 'symbol_decimal' a flag/switch that, if zero (0), meant to use a period for the decimal point and comma for the thousands point, while a value of one (1) meant use the reverse.

 

At CC600b3, the 'symbol_decimal' column was changed to use the actual character "period", and a new 'symbol_thousand' column added which holds the actual character "comma". These new columns are set for each currency.

 

Being a 'string', the logical equivalent of a string is a one (1 or true), which means to CC5, use a comma for the decimal point.

 

You can execute the following SQL commands to return the 'symbol_decimal' column back to a 0/1 state:

UPDATE `CubeCart_currency` SET `symbol_decimal` = '0';

Then, if you want to continue experimenting with CC6, I recommend copying the database to a new set of tables with a "cc6_" prefix. Edit /includes/global.inc.php by setting the $glob['dbprefix'] to that prefix.

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...