Guest alejo139 Posted November 11, 2005 Share Posted November 11, 2005 hello greetings, that well that the CC3 version follows developing, but that possibilities there is to be able to add to the cost of the product the point that divides the thousands of the price example in you see of being 1000.00 is 1.000,00. Thanks for the attention good day for all. */* Quote Link to comment Share on other sites More sharing options...
Guest Posted November 11, 2005 Share Posted November 11, 2005 Yes, you absolutely can. I came up with this fix sometime back, but I'll repost it again. You'll need to edit /includes/functions.inc.php and replace the priceFormat function with the one below. ////////////////////////////////// // Format Price //////// function priceFormat($price, $dispNull = FALSE){ if($price == TRUE){ global $currencyVars; $price = $price * $currencyVars[0]['value']; ################################################################# # Edit made by Sir William -- http://www.swscripts.com/ # Here's the original line from the code: # return $currencyVars[0]['symbolLeft']. # sprintf("%.".$currencyVars[0]['decimalPlaces']."f", $price). # $currencyVars[0]['symbolRight']; # # The following line will properly format the number with commas and a # decimal in US format like this: 1,234,567.89 return $currencyVars[0]['symbolLeft']. number_format($price, $currencyVars[0]['decimalPlaces'], '.', ','). $currencyVars[0]['symbolRight']; # If you'd like a European convention of: 1.234.567,89 simply comment # the above line and uncomment the one below # return $currencyVars[0]['symbolLeft']. # number_format($price, $currencyVars[0]['decimalPlaces'], ',', '.'). # $currencyVars[0]['symbolRight']; } elseif($dispNull == TRUE) { global $currencyVars; ################################################################# # Edit made by Sir William -- http://www.swscripts.com/ # Here's the original line from the code: # return $currencyVars[0]['symbolLeft']. # sprintf("%.".$currencyVars[0]['decimalPlaces']."f", 0.00). # $currencyVars[0]['symbolRight']; # # The following line will properly format the number with commas and a # decimal in US format like this: 1,234,567.89 return $currencyVars[0]['symbolLeft']. number_format(0.00, $currencyVars[0]['decimalPlaces'], '.', ','). $currencyVars[0]['symbolRight']; # If you'd like a European convention of: 1.234.567,89 simply comment # the above line and uncomment the one below # return $currencyVars[0]['symbolLeft']. # number_format(0.00, $currencyVars[0]['decimalPlaces'], '.', '.'). # $currencyVars[0]['symbolRight']; } else { return FALSE; } } You'll have to uncomment the European version and comment out the US one, but that's really no big deal. Have fun! */* Quote Link to comment Share on other sites More sharing options...
Guest alejo139 Posted November 11, 2005 Share Posted November 11, 2005 Thank you very much friend Sir William by the aid, I make the changes and tests and warning as it works. and excuseme by my badly handling of the language english, is not my native language */* Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.