I follow the instructure at http://opensolution.org/Quick.Cart/docs/?id=tips.. 1. In file “core/common.php” in function displayPrice( ) change line:
return $mPrice;
to:
return number_format( $mPrice, 2, '.', ',' );
2. In file “core/common.js” in function changePriceFormat( ) should be set separator for thousands (separator for decimals won’t be changed in that case), so default config lines in that function:
var sDecimalSeparator = '.'; var sThousandSeparator = '';
should be changed to:
var sDecimalSeparator = '.'; var sThousandSeparator = ',';
But i got the error like this [IMG]http://i55.tinypic.com/jj41s5.jpg[/IMG]
dheghel - exactly the same happend to my Quick.Cart 4.0 when I changed the the way you did. The "Add to basket" and the "Currency" disappeared. But I didn't change the price they disappeared anyway.
@bobo i can't upload because that error doesn't fix....i only instaal on localhost.... Can u try this metode in ur pc with localhost, try to change with this metode :
* In file core/common; in function displayPrice( ) change line:
It seems, that I have to write a bug report. There is a small trap in the code, when you change the price number format.
Dheghel, You have to change in the code: This is the solution for prices having no cents, like Your example 1. in core/common.php change the return $mPrice; to: return number_format( $mPrice, 0, ',', '.' ); (zero means: no cents will be shown) 2. And now we repair a bug: in action_clients/products.php find the line: if( is_numeric( $aData['mPrice'] ) ){ and replace it exactly! with: if(is_numeric(preg_replace('/[\.,]/','',$aData['mPrice']))){
The bug here was: the price formated with thousand-dots (1.000.000) is no more numeric for the interpreter. It became string.
3. in core/common.js The way you took will give out in order form a not nice result. You display all prices by products in 1.000.000 format, and in order form the delivery and ALL-summary will come with: 1,000,000.00 format. It is not nice. So: change the lines var sDecimalSeparator = '.'; var sThousandSeparator = ''; to: var sDecimalSeparator = ','; var sThousandSeparator = '.';
But You don't want the cents in order form (at delivery & all-summry)? Then a few lines under these lines, You will find: sPrice = sPriceFull+''+sDecimalSeparator+''+aPrice[1]; just change it to: sPrice = sPriceFull; (this will cut the "," as separator and cents after it).