A problem with the order total has suddenly occured in my Drupal Commerce installation. The order total is twice as much as it should be when I go to checkout and sometimes three times as much. (see screenshot)

When I add a product to the shopping cart everything looks fine and the correct price is displayed, but when i go to checkout the order total is flawed. If i remove the product and add another, the same thing occurs over again. Has anyone experienced something similar and how do I fix it?

PS: The columns in the screenshot are (title, unit price, quantity, total)

CommentFileSizeAuthor
checkout.png19.24 KBHenrikBak

Comments

j0rd’s picture

Title: Order total doubled or trebled » Order total doubled or trippled

fixed spelling in title.

j0rd’s picture

Title: Order total doubled or trippled » Order total doubled or tripled

Fixed my own spelling this time :)

rszrama’s picture

Whoa, this is very weird indeed. I haven't seen anything like it. What more can you tell us about your site? Are you using any contributed modules besides the core Drupal Commerce and its dependencies? Do you have any product pricing rules setup?

HenrikBak’s picture

Hi again. I have the following contrib modules for Commerce enabled:

Shipping
Stock
Drupal Commerce Extra Panes
DiBS payment
Commerce Invoice Receipt

I haven't setup any custom product pricing rules. I have tried to disable the above modules to see if the problem would go away, but it didn't.

I found out that some product prices are multiplied by two, some by three and some product prices are actually correct. I don't get it...

HenrikBak’s picture

Ok, so I found out that the order total is only miscalculated, if the order contains a product that has been ordered before...

If an order contains a product that has been ordered X times before. Then the price is calculated like (unit price * X). So new products are just fine, but a book priced at 10€ that has been ordered 10 times before is a 100€ in the order total :S

How can I fix this? I would hate to start from scratch again.

rszrama’s picture

No need to be too pessimistic. ; ) Nothing in here makes me think you need to start from scratch. Why don't you try disabling those contributed modules one by one and see if getting rid of any of them solves the issue. I've never used Commerce Invoice Receipt, but that sounds like something that could affect orders.

latulipeblanche’s picture

@HenrikBak
I had this before when I changed the "shopping-cart-bloc"-view on the homepage (I made a pager of the view).
So if you changed that view , maybe change it back to the original form and try again.
(If not, I don't know.)

HenrikBak’s picture

@latulipeblanche - I found out that the commerce stock module was causing the problem in my case. Disabling it solved the problem - too bad i can't use that module though.

j0rd’s picture

Status: Active » Closed (duplicate)

I've created an issue for this problem in the Commerce Stock module over here:
#1267550: If VAT is included in a product price, the order total goes up by that much every time the product is re-saved

Please head over there and let the author know which version you are using and where you've tracked down the error to.