Jump to content

Order Total Wrong When Adding/Deleting Product


Recommended Posts

I recently went to update a customer order and found I couldnt change the product within the cart.  I needed to change the size attribute since my customer ordered the wrong size.  I tried editing the actual product but there is no function for this.  Instead, I added a new product with the correct size attribute and deleted the old product.  Now the total for the order is wrong because shipping was added twice.  The original order was $108 but now it shows $131.  I was trying to figure out where the extra $23 came from and found another invoice was created for shipping.  I found this but clicking the "add discount" button.  This definitely seems to be a glitch.

Link to comment
Share on other sites

  • 7 months later...
  • 1 year later...

We have the same issue in Prestashop 1.6.1.5. After Adding/Removing Products of an existing order, the totals of the order are wrong.

 

Unfortunately, it is not always happening and so far we have not found reproducible reasons for it. And unfortunately I could never reproduce the error while watching the Chrome's network list (so that I would see the complete POST data).

 

When thee error is happening I can see notices in the error log such as:

 

PHP Notice:  Undefined offset: 74558 in AdminOrdersController.php on line 2391, referer: ?controller=AdminOrders&vieworder&token=&id_order=35573
PHP Notice:  Undefined index: total_price_tax_excl in AdminOrdersController.php on line 2394, referer: ?controller=AdminOrders&vieworder&token=&id_order=35573
PHP Notice:  Undefined index: id_warehouse in AdminOrdersController.php on line 2397, referer: ?controller=AdminOrders&vieworder&token=&id_order=35573
 
Does anybody have had the same problem and found a solution?
 
Is there a function to clear the mess-up? (AdminOrdersController only calculates differences, there seems to be no function to recalculate the order values).
 
Thanks for help!
Adrian
Link to comment
Share on other sites

  • 5 weeks later...

 

We have the same issue in Prestashop 1.6.1.5. After Adding/Removing Products of an existing order, the totals of the order are wrong.

 

Unfortunately, it is not always happening and so far we have not found reproducible reasons for it. And unfortunately I could never reproduce the error while watching the Chrome's network list (so that I would see the complete POST data).

 

When thee error is happening I can see notices in the error log such as:

 

PHP Notice:  Undefined offset: 74558 in AdminOrdersController.php on line 2391, referer: ?controller=AdminOrders&vieworder&token=&id_order=35573
PHP Notice:  Undefined index: total_price_tax_excl in AdminOrdersController.php on line 2394, referer: ?controller=AdminOrders&vieworder&token=&id_order=35573
PHP Notice:  Undefined index: id_warehouse in AdminOrdersController.php on line 2397, referer: ?controller=AdminOrders&vieworder&token=&id_order=35573
 
Does anybody have had the same problem and found a solution?
 
Is there a function to clear the mess-up? (AdminOrdersController only calculates differences, there seems to be no function to recalculate the order values).
 
Thanks for help!
Adrian

 

 

 

Hi webrequest,

 

same problem here but no solution.

Have you found one?

 

Thanks!

 

Valeria

Link to comment
Share on other sites

Yes. I made an override of the AdminOrdersClass and added code to recalculate all the order values from the order_details every time a modification are made in the ordered items list.

 

However, we just found that this is not yet the end of the story as there is still the table order_invoice left unchanged. 

Link to comment
Share on other sites

Yes. I made an override of the AdminOrdersClass and added code to recalculate all the order values from the order_details every time a modification are made in the ordered items list.

 

However, we just found that this is not yet the end of the story as there is still the table order_invoice left unchanged. 

 

Thanks webrequest, did you find any corruption in your db?

Link to comment
Share on other sites

×
×
  • Create New...