Discounts rounding percentages off

So I noticed that all my discounts were perfectly even dollar amounts. Today was the first day of the site being live so I just caught this. I did some research and noticed that this has been a problem before. I understand how CS can sell a cart that doesn’t function properly on something simple as this. Anyway…I read that there is a “fix” at [URL]CS-Cart Documentation — CS-Cart 4.15.x documentation but I did as follows with no luck.

I was a little confused about the info about PayPal at the bottom since I do use PayPal as an alternative payment. The coding for PayPal only seems to work with PayPal so I didn’t do this since most of my orders are paid with CC. But my cc orders are still coming through rounded. I should note that the proper discount shows up during checkout…just not when payment goes through.

What the heck is going on here?!?!

I wonder why the fix suggested in the KB article has not been implemented in the core code?


I was wondering the same thing. Even so, it didn’t work for me so I wonder what the true fix is. I don’t mind losing/gaining a few cents from the glitch but seems really unprofessional.

I applied that fix and am not having a problem in 2.0.8. Maybe it’s the payment gateway settings that are causing this rounding problem for you? I use and Paypal with no issues at all.

I use 2checkout as my processor. Maybe that has something to do with it…though I believe they use the same parameters as a I’ll have to wait and see if my PayPal orders function properly on my next PP order.

I should note that the actual total amount is correct that the customer is getting charged. Just the discount is rounded. So the math doesn’t add up right which is VERY unprofessional looking.

Is the rounded discount appearing at the product level or the order level or both? I know I removed (commented out) the appearance of the discount at the product level on the checkout screens and on my invoices because I was seeing some slight difference in the discount and tax calculations. The discount and tax amounts showing in the subtotal area are correct so they are the only values I show on my cart.

Don’t know if this helps you out at all…

[quote name=‘scase’]Is the rounded discount appearing at the product level or the order level or both? [/quote]

Oddly since my upgrade from 2.0.6 to 2.0.11 my cart doesn’t show the quantity discount next to the product price anymore. The discount is figured only at the total during checkout. I’m assuming this was changed in an update as I used to be able to change the quantity and it would change the price of each in 2.0.6.

In any case, the totals all appear correct until getting passed back from 2checkout. 2CO works like PayPal as the customer leaves my site to enter payment information. Then they are redirected back once they submit payment and the order is approved. That is where the trouble begins. On the summary page the discount total will jump from $1.50 (for example) to $2. But the total shown and charged is correct for the $1.60 amount. It just is really confusing since the amounts don’t tally up at the end. And since most of my product prices are even dollar amounts it is pretty obvious when it doesn’t add up. No one has complained yet but it is very misleading.

Well this still isn’t working with PayPal or 2Checkout. I went through and made the PayPal changes to the files too and it’s still acting the same no matter what checkout option I use. Wonder if my mods could play a role…I wouldn’t think so.

Just to follow up. I paid to have support check this out for me and it is working now. Maybe this thread will help someone out in the future. Support said:

Where can I find the official fix for this error. I am having the same problem and would like to be pointed in the right direction.

Thank you

Jeremy Goodspeed