'Different records in tables "cart_product" and "order_detail"
We have a customer who, as a note, has a lot of daily orders.
The issue is that he punctually receives orders that have different records in the cart and order detail (tables "cart_product" and "order_detail").
The file /classes/PaymentModule.php has no override, so it's strange...
Example:
Order ID 1 with 2 records in cart_product.
Order ID 1 with 1 record in order_detail.
Has anything similar ever happened to you?
Thanks in advance.
PS Version is 1.7.2.4
Solution 1:[1]
It is very likely that for some reason some product is not considered during the execution of the PaymentModule.php validateOrder() method
Not having other information, I would investigate replicating the creation of an order from one of the involved carts involved and debugging the execution of that method, in particular the management of the "package_list" that is responsible for the creation of order_detail.
Also consider to update Prestashop core to the latest version because the first 1.7.x were full of bugs about it.
Solution 2:[2]
If this happens with the same product - duplicate it and delete older version.
Maybe there is some undebuggable error in connected db fields.
Sometimes presta try to split one order in two because of product quantity/shipping rules etc.
Maybe second order creation failed.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | user3256843 |
| Solution 2 | panariga |
