X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Product price decimal places (https://forum.x-cart.com/showthread.php?t=66268)

mirage00 03-01-2013 06:17 AM

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);

mirage00 03-01-2013 04:14 PM

Re: Product price decimal places
 
Bump.. anything on this?

mirage00 03-03-2013 08:27 PM

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!!

cflsystems 03-03-2013 09:31 PM

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

mirage00 03-04-2013 12:46 PM

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.

cflsystems 03-04-2013 10:52 PM

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


All times are GMT -8. The time now is 04:11 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.