Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Hide numbers after the decimal point in price

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-23-2012, 03:52 AM
  pdstudio's Avatar 
pdstudio pdstudio is offline
 

Member
  
Join Date: Dec 2009
Location: Hungary / Sopron
Posts: 28
 

Post Hide numbers after the decimal point in price

Hy,
I have a solution for the hiding of the numbers after the decimal point in the product price, for those, who dont want to use it.
You must apply the following SQL-query:
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";

It will add new selection entry to the "General Settings" -> "Appearance" options page for the number format option.

You can also add the "0 :1 999" manually to a new line when you search after the xcart_config entry for example in phpMyAdmin.

Note that it is recommended to back up the database before making any changes!

I use X-Cart 4.4.4 and I did not test other versions
__________________
X-Cart 4.4.4
http://matricamagnes.hu/
Reply With Quote

The following user thanks pdstudio for this useful post:
bcam (10-07-2012)
  #2  
Old 03-04-2013, 08:49 AM
 
mirage00 mirage00 is offline
 

Newbie
  
Join Date: Mar 2012
Posts: 9
 

Default Re: Hide numbers after the decimal point in price

This change works for the display but you will have rounding errors... What I have discovered is XCART needs to seperate the display format from the precision format. I need to have prices entered into the system with 4 digit precision $ .1034 as an example. This is needed when someone purchases large quantities 5000+ of the same item. But the final price for the purchase should be display in $xxx.xx format.
__________________
4.4.3 Gold
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:27 AM.

   

 
X-Cart forums © 2001-2020