View Single Post
  #1  
Old 02-24-2014, 02:56 AM
 
joeid joeid is offline
 

Member
  
Join Date: Mar 2009
Location: Hungary
Posts: 11
 

Unhappy "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:
UPDATE xcart_config SET variants="2.,:1,999.53\n2.:1999.53\n2, :1 999,53\n2,.:1.999,53\n0 :1 999" WHERE name="number_format";

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:
$_tmp = strtr($_tmp, array(".00"=>""));

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
Reply With Quote