EDIT: I now noticed that this always happens when the discounted line item comes after the non-discounted one (of the same product variant) in the cart. When the discounted line item comes before, there is no additional line in checkout. It seems like - when going to checkout - Shopify takes the lines from the already splitted cart and applies function discounts to the first line item with the specified variant ID and splits the line if necessary. I still got no solution for this, since I am not sure if I can tell Shopify to always put the discounted line first. Anyways, the behaviour seems not optimal to me.
VitaDev
2
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Product Discounts - Duplicate Line Items In Checkout | 5 | 100 | August 29, 2024 | |
| Discount Function - wrong line item order and error message | 5 | 54 | November 28, 2023 | |
| Shopify Functions (Product Discount API, Order Discount API) | 2 | 148 | September 26, 2023 | |
| Need to implement different discounts on lineitems using Shopify Functions Product Discount API | 0 | 91 | March 30, 2023 | |
| Different automatic discounts on the same variant (2 line items) | 0 | 22 | October 17, 2023 |