You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
Pages: 1
On some of our customer's products, the discount is not calculating correctly. In this example, regprice is $321.60 and the saleprice is $289.44. Instead of showing 10% discount, it's showing 11% discount. Is there a way to fix this. Please see:
http://www.arnoldstobacco.com/index.php … mp;ref=779
Thanks
David
Offline
In the file {private}/apps/ecom/ECOM/includes/pricedisp.php, you'll see a ciel() function called three times. On the first two which are run to get discount percentages (the last one is for loyalty points), change ceil() to floor(). This will have the effect of rounding down all percentages to the nearest integer, instead of rounding up.
Offline
Thanks, that worked
Regards,
David
Offline
Actually, it worked on one product, but not on some others. Please see:
http://www.arnoldstobacco.com/index.php … mp;ref=770
It should be 10% but showing up as 9%
Regards,
David
Offline
I just removed the @floor function, and it's now working on the other product. Will this affect anything else?
Offline
It still didn't completely work, so I searched for a "." and truncated the string.
Offline
Pages: 1