Zen Cart Logo
Forums / Bug Reports / Price calculated differently in checkout as compared to cart

Price calculated differently in checkout as compared to cart

Views: 1,449

Results 1 to 6 of 6
13 Nov 2013, 7:31 AM
#1
divine avatar

divine

New Zenner

Join Date:
Sep 2011
Posts:
5
Plugin Contributions:
0

Price calculated differently in checkout as compared to cart

Hi

In our store we offer discounts on some products dependent on the quantity purchased (set in product price manager).

When the products are displayed in the Shopping Cart, a price is displayed which is consistent with the information displayed in the product price manager screen.

In checkout, after selecting the shipping method, a different price is displayed for the same product.

As an example,

product http://www.glassfusing.com.au/index.php?main_page=product_info&cPath=1_80_104&products_id=2080

The shopping cart displays $10.00 as the price of 250 grams.

In checkout, the price of the product is changed to $9.00.

Of course none of our customers have complained about the extra discount.......

I wonder if it has something to do with the cart and checkout calculating the discount differently?

We are using version 1.5.1.

Any suggestions would be greatly appreciated.

Gordon

17 Nov 2013, 4:26 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Price calculated differently in checkout as compared to cart

Consider this scenario:

  1. I just installed a brand new copy of Zen Cart v1.5.1, with demo products.

How do I make this brand new store "do" what you're saying yours is doing?
I imagine some products and categories will need to be added. What about taxes and zones? What about which settings you've set in your admin? Any plugins to install?

17 Nov 2013, 4:52 AM
#3
divine avatar

divine

New Zenner

Join Date:
Sep 2011
Posts:
5
Plugin Contributions:
0

Re: Price calculated differently in checkout as compared to cart

DrByte:

Consider this scenario:

  1. I just installed a brand new copy of Zen Cart v1.5.1, with demo products. How do I make this brand new store "do" what you're saying yours is doing?

Hi

Thanks for the response.

I don't believe that there are any plugins which are relevant to the issue - we have installed Advanced Shipper and Easy Populate and Paypal Express - that's about it.

Similarly I can't think of anything in Admin which is unusual.

All products have only one price. We don't have user based discounts and we don't use zones or taxes.

So to replicate:-

Create a product with a cheap price - in our circumstance it is $0.06.

Other settings:-
Quantity Box - show
Product Qty Minimum 50
Product Qty Maximum 250
Product Qty Units 50

Save the product (it also has an image, a model, a quantity etc).

From the catalogue screen access Product Price Manager for the product.

Edit, insert black discounts

Discount Type Percentage
100 - 20% PPM shows this as $5.00 (100 x 0.05)
250 - 40% PPM shows this as $10.00 (250 x 0.04)

Save

Place 250 units of the product in the Cart - it is priced in the cart at $10 (which is what the PPM screen shows).

Checkout - the price becomes $9.00.

Regards

Gordon

17 Nov 2013, 5:12 AM
#4
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Price calculated differently in checkout as compared to cart

divine:

Create a product with a cheap price - in our circumstance it is $0.06.

Other settings:-
Quantity Box - show
Product Qty Minimum 50
Product Qty Maximum 250
Product Qty Units 50

Save the product (it also has an image, a model, a quantity etc).

From the catalogue screen access Product Price Manager for the product.

Edit, insert black discounts

Discount Type Percentage
100 - 20% PPM shows this as $5.00 (100 x 0.05)
250 - 40% PPM shows this as $10.00 (250 x 0.04)

Save

Place 250 units of the product in the Cart - it is priced in the cart at $10 (which is what the PPM screen shows).

Checkout - the price becomes $9.00.

Regards

GordonWell its the Checkout $9.00 that is correct.
(The $10.00 is incorrect)
.06 x 250 = $15 - 40% ($6) = $9.00

17 Nov 2013, 5:38 AM
#5
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Price calculated differently in checkout as compared to cart

It would appear that as zen calculates to 4 decimal places

The 40% off price is 0.0360 each
It is shown rounded to 2 decimal places in the cart ie 0.04
0.0360 x 250 = $9.00 which is correct

0.04 x 250 = $10.00 is an approximation and incorrect

It would appear that users with such low value items might need to show them to 4 decimal places instead of 2 decimal places.

or price them as 1 item = (packet of 50) for $3.00
Then the discounts will calculate better for 2 decimal places.

17 Nov 2013, 9:42 AM
#6
divine avatar

divine

New Zenner

Join Date:
Sep 2011
Posts:
5
Plugin Contributions:
0

Re: Price calculated differently in checkout as compared to cart

gilby:

It would appear that as zen calculates to 4 decimal places

The 40% off price is 0.0360 each
It is shown rounded to 2 decimal places in the cart ie 0.04
0.0360 x 250 = $9.00 which is correct

Hi

Thanks for that suggestion.

I had worked out how the 2 figures were being calculated - my problem was that they were not the same.

Changing the decimals to 4 certainly provides a solution (albeit somewhat clunky)

IMHO, it would still be good if both the cart and the checkout calculations produced the same result.

Regards

Gordon