Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PaymentModule - Multiple Orders for a Cart #508

Open
Matt75 opened this issue Apr 21, 2020 · 8 comments
Open

PaymentModule - Multiple Orders for a Cart #508

Matt75 opened this issue Apr 21, 2020 · 8 comments
Labels

Comments

@Matt75
Copy link
Contributor

Matt75 commented Apr 21, 2020

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 :

  1. A product of Cart exceeds the price/weight range of carriers
  2. A product of Cart is restricted to one Carrier (case described bellow)
  3. Warehouse management in 1.6, removed in 1.7
  4. Multi-shipping functionnality in 1.5 removed in 1.6
  5. 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

  1. Install a fresh PrestaShop instance
  2. Install PrestaShop Checkout module or another Payment module require validation from an API
  3. Go to BO > Sell > Catalog > Products
  4. Edit Product 1 aka Hummingbird printed t-shirt
  5. In Shipping tab > Available carriers > check case of PrestaShop (Pick up in-store)
  6. Save product
  7. Edit Product 2 aka Hummingbird printed sweater
  8. In Shipping tab > Available carriers > check case of My carrier (Delivery next day!)
  9. Save product
  10. Go to Shop
  11. Go to product page of Product 1 aka Hummingbird printed t-shirt
  12. Add to cart
  13. Go to product page of Product 2 aka Hummingbird printed sweater
  14. Add to cart
  15. Go to Cart page
  16. Go to Proceed to checkout
  17. Choose to paid with PrestaShop Checkout
  18. Paid
  19. 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.
  20. Go to BO > Sell > Orders
  21. See 2 Orders created with same reference, only one is with status Payment accepted
  22. View this Orders and see Warning €[TOTAL ORDER] paid instead of €[TOTAL CART]. This warning also concerns order [Order reference]
@jf-viguier
Copy link
Contributor

For me, the best and easy way should be to remove order splitting. It's not needed anymore and upset ERP and accountants

@msaustral
Copy link
Contributor

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:
image

Total weight on order:

image

On carrier
image

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

@lorenzoactm
Copy link

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?

@msaustral
Copy link
Contributor

Hi any news on this case?, we do have multiples customers affected with this.

@Lionel-dev
Copy link

Hi, we have news on this, I have some customers being impacted and I do not know how to justify this bug to them...

@wassafr
Copy link

wassafr commented Jun 24, 2022

Also happens to us with no case listed above.

@Matt75
Copy link
Contributor Author

Matt75 commented Jun 24, 2022

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 ;)

@sloofa
Copy link

sloofa commented Mar 7, 2023

This issue still remains also in PS8?
I have bought Webkul module for split order and only first order is sent to PaymentModule

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants