docs
docs copied to clipboard
PaymentModule - Multiple Orders for a Cart
Sometime PrestaShop will split a Cart in multiple Order with same Reference after a Payment.
This is made in PaymentModule::validateOrder()
Because this splitting is made by PrestaShop after the Payment, Customer has only paid Shipping Costs for one Order.
So PrestaShop will display a warning on Order view page to notify merchant the total order amount is not equal to total cart amount.
PrestaShop will send to PaymentModule only Order id and Order reference of the last created Order.
Every PaymentModule will only update OrderState of the last created Order, on module validation trigger by API (like bank validation return).
Every child Order should be manually update by merchant because he needs to choose if additional shipping cost should be paid by Customer or if he take it in charge.
⚠️ Possible cases :
- A product of Cart exceeds the price/weight range of carriers
- A product of Cart is restricted to one Carrier (case described bellow)
- Warehouse management in 1.6, removed in 1.7
- Multi-shipping functionnality in 1.5 removed in 1.6
- Others cases I don't know
➡️ Need more informations to find every possible cases will cause Order splitting and how to handle that for Module developer.
How to test
Case : A product of Cart is restricted to one Carrier
- Install a fresh PrestaShop instance
- Install PrestaShop Checkout module or another Payment module require validation from an API
- Go to BO > Sell > Catalog > Products
- Edit Product 1 aka
Hummingbird printed t-shirt
- In Shipping tab > Available carriers > check case of
PrestaShop (Pick up in-store)
- Save product
- Edit Product 2 aka
Hummingbird printed sweater
- In Shipping tab > Available carriers > check case of
My carrier (Delivery next day!)
- Save product
- Go to Shop
- Go to product page of Product 1 aka
Hummingbird printed t-shirt
- Add to cart
- Go to product page of Product 2 aka
Hummingbird printed sweater
- Add to cart
- Go to Cart page
- Go to Proceed to checkout
- Choose to paid with PrestaShop Checkout
- Paid
- See
Your order hasn't been validated yet, only created. There can be an issue with your payment or it can be captured later, please contact our customer service to have more details about it.
- Go to BO > Sell > Orders
- See 2 Orders created with same reference, only one is with status
Payment accepted
- View this Orders and see
Warning €[TOTAL ORDER] paid instead of €[TOTAL CART]. This warning also concerns order [Order reference]
For me, the best and easy way should be to remove order splitting. It's not needed anymore and upset ERP and accountants
We have one customer with same issue PS 1.7.6.9
There is something strange, on product -> transportation -> weight, the decimals separator is a coma (,) but in the total wight of the order it is shown in gram but it say Kg in text.
Example:
On product:
Total weight on order:
On carrier
it should show 12,430 kg but it say 12.430 Kg, if the PS taking the weight in grams to calculate shipping cost, it will go out of carrier rage and split the order.
in this case we have a rage of 60 Kg and the order will send twelve thousand four hundred thirty (12.430) Kg
Hello, any updates on this issue? Randomly we get orders with one product split into a linked order. None of these products have carrier exceptions and they fit within the courier weight setting.. so I'm not sure what's causing it.
Is there a way to disable the linked orders feature completely?
Hi any news on this case?, we do have multiples customers affected with this.
Hi, we have news on this, I have some customers being impacted and I do not know how to justify this bug to them...
Also happens to us with no case listed above.
Also happens to us with no case listed above.
Yes, but as I said it should be completed, please share we us your use cases ;)
This issue still remains also in PS8? I have bought Webkul module for split order and only first order is sent to PaymentModule