Magento – Shopping cart display wrong price

priceshopping-cart

We're currently having a weird bug on our magento site. Sometimes a customer send us an email complaining about the shopping cart. The subtotal is indeed calculated wrong.

See an example here : http://imgur.com/ZDtgm9r

Our team was unable to reproduce it by any mean. Today we have the case where a SINGLE, simple product got its total mult by 3…

I dont know how i can help you, which file you may need or so. Neither totals.phtml nor Totals.php (where renderTotals() is defined) have been overriden.

This is probably close to this question : Why Magento Shopping Cart show wrong price and sometime not allow to add product?

We're stuck with it for weeks now… And we have no clue since we're unable to reproduce it. So here's my call to community. Did you have this bug ? How did you resolve it ? Or maybe do you have an advice from where it may come from ?

EDIT : If a customer checkout the whole cart, all the prices during checkout are OK.

Thanks to all of you

Best Answer

I recall something similar happening to a site some time ago (year+) - for some reason I cannot find my question regarding the issue.

Basically: cart totals got multiplied (sometimes 3 times) AFTER shipping was applied to the quote object. So after you leave cart to checkout, or in cart applied shipping.

In my case it was an errand 3rd party extension that had an observer, which added in a shipping address to the Quote object. Since there was already a shipping address selected, it ended up adding a 3rd address (and a 4th and so on, as you go back and forth between checkout and cart)

So, the quote object had:

1 x Billing address 2 x Shipping Address

Since totals are calculated on addresses, magento #1 internals faithfully iterated both the shipping addresses, and tallied up the totals.

I don't recall the exact details, but it was tracked down by wiping all order / order address data in the relevant tables. Then entering the checkout, and checking the order tables tables for entries.

It was then found multiple address were being inserted into the order address table.

Maybe your issue not the exact same issue, but may also be related to multiple addresses being attached to the quote.

Hope that helps in some way.

Related Topic