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

Product price decimal places

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-01-2013, 06:17 AM
 
mirage00 mirage00 is offline
 

Newbie
  
Join Date: Mar 2012
Posts: 9
 

Default Product price decimal places

I have a project that requires pricing on producs to go to 4 decimal places. Example: $ .2911. I have changed the db to allow 4 decimal places for xcart_prices. I also changed the precision rounding to a 4 (I hard coded it for now) in the func_format_number function. Still my wholesale prices list still shows 2 decimal places. Large volume orders, 10000 items is causing the pricing to sway over 5% with this rounding issue. Any help would be appreciated.

return number_format(round((double)$price + 0.00000000001, 4), $precision, $decimal_delim, $thousand_delim);
__________________
4.4.3 Gold
Reply With Quote
  #2  
Old 03-01-2013, 04:14 PM
 
mirage00 mirage00 is offline
 

Newbie
  
Join Date: Mar 2012
Posts: 9
 

Default Re: Product price decimal places

Bump.. anything on this?
__________________
4.4.3 Gold
Reply With Quote
  #3  
Old 03-03-2013, 08:27 PM
 
mirage00 mirage00 is offline
 

Newbie
  
Join Date: Mar 2012
Posts: 9
 

Default Re: Product price decimal places

Ok, all I need at this point is for the wholesale prices variants module to save the prices entered with 4 decimals. If I enter .1722, it continues to round the number and save (.1700) to the database. I have changed all db references to prices to 12,4. Any help would be appreciated, I cant find out where the prices entered in the admin are being changed!!
__________________
4.4.3 Gold
Reply With Quote
  #4  
Old 03-03-2013, 09:31 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Product price decimal places

You have to look at the php script that processes the product/variants modify page how the numbers are modified
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 03-04-2013, 12:46 PM
 
mirage00 mirage00 is offline
 

Newbie
  
Join Date: Mar 2012
Posts: 9
 

Default Re: Product price decimal places

I'm sorry but what part of that answer was helpful? I know what needs to be looked at. I was hoping the experts would directly me to what needs to be modified. half the places in xcart use ,2 for rounding hardcoded and the other half pulls the number from the 'num_format' field in the config db.
__________________
4.4.3 Gold
Reply With Quote
  #6  
Old 03-04-2013, 10:52 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Product price decimal places

The answer was aimed to help you were to look for how the data is saved in db. Aparently you are looking for a complete mod what to modify and how to modify it... I suggest to post your question in the professional help section of the forum
__________________
Steve Stoyanov
CFLSystems.com
Web Development
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 04:12 AM.

   

 
X-Cart forums © 2001-2020