| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
"Safe" remove decimals from prices | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
"Safe" remove decimals from prices
Hi
I tried some solutions, but none "perfect". 1., I tried this SQL patch, it doesn't do anything. Code:
2., I tried change the price field in xcart_pricing SQL table "decimal (12,2)" to "decimal (12,0)", it doesn't do anything. 3., I tried change in modifier.formatprice.php "precision= Null" to "precision= 0". It's working only on admin page, but not working on storefront. 4., I tried add this code for fuction.currency.php: Code:
and combined with 1-3 step. Great , it's working, but it's remove the decimals from weight...grrr. I'm now very nervous...I only want remove/hide .00 in price. Eg. 1980.00 to 1980 Why this is so complicated ? Anybody can help me ? THX!
__________________
X-Cart 4.6.2 |
|||||||
#2
|
|||||||
|
|||||||
Re: "Safe" remove decimals from prices
Nobody ?
__________________
X-Cart 4.6.2 |
|||||||
#3
|
|||||||||
|
|||||||||
Re: "Safe" remove decimals from prices
One option is to add another format to number_format in the config table of the database. Then select it in the Appearance settings.
Or if you just want to change that currency function then I would adjust the following line similar to the change you were wanting to make: $result .= str_replace('$', $config['General']['currency_symbol'] , str_replace('x', $cf_value, $config['General']['currency_format'])); |
|||||||||
#4
|
|||||||
|
|||||||
Re: "Safe" remove decimals from prices
Quote:
1., I tried add new value for xcart_config tablet numeric_format, but it's do nothing (not show new number fromating on admin). 2., I think this soluton not good for me, becuase if i want export prices, the decimals will show...or not ?
__________________
X-Cart 4.6.2 |
|||||||
#5
|
|||||||||
|
|||||||||
Re: "Safe" remove decimals from prices
1. That might be cached, or double-check it is entered correctly
2. Have you tried it? |
|||||||||
#6
|
|||||||
|
|||||||
Re: "Safe" remove decimals from prices
Quote:
1., Yes, i checked repeatedly and clean caches etc, but does not work 2., No, but i found this code in function.currency.php. Need to add other files ? THX!
__________________
X-Cart 4.6.2 |
|||||||
#7
|
|||||||
|
|||||||
Re: "Safe" remove decimals from prices
No solution ?
__________________
X-Cart 4.6.2 |
|||||||
#8
|
|||||||
|
|||||||
Re: "Safe" remove decimals from prices
Quote:
Can you please let me know how to do this on 4.6.1 Platinum? To display prices without decimal part you will need to modify this "function smarty_function_currency" in the following script: <xcart_dir>/include/templater/plugins/function.currency.php is it so?
__________________
X-cart Platinum 4.6.1 Reboot template |
|||||||
|
|||
X-Cart forums © 2001-2020
|