Zen Cart Logo
Forums / Bug Reports / Rounding error between attribute price and shopping cart price

Rounding error between attribute price and shopping cart price

Views: 868

Results 1 to 1 of 1
12 Apr 2015, 9:31 PM
#1
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,875
Plugin Contributions:
7

Rounding error between attribute price and shopping cart price

I have seen many posts regarding rounding errors over the years but cannot find one describing this.

Bug example: Attribute price is 10 on Product Info page, but when added to cart it is calculated at 9.99.

Steps to duplicate this in a vanilla 1.54:

  1.  Currency Euro
    
  2.  Tax zone all countries, all zones
    
  3.  Tax rate 21%
    
  4.  Configuration->My Store: show prices with tax.
    
  5.  Edit the product attributes of:
    

Test 10% by Attrib
Hewlett Packard - by attributes SALE (pid 36).
Set white to 8.2644 (10 euros -21% tax).
6) View in shop: white attribute = 10 euros
7) Add to cart = 9.99.

I see the calculations for the attributes on the product info page and those in the cart are indeed handled by separate lumps of similar-looking but evidently not identical code in the attributes module and the shoppingcart class.
No doubt pegged for a reworking but any chance of a band-aid now?

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...