Discussing Shopify Functions development, deployment, and usage in Shopify apps.
I recently ran into a problem while developing a product discounts function. The function should apply discounts to a certain quantity of a product variant, which may result in a line item split. In the cart this works fine, but in the checkout I get unnessecary additional line items displayed. Expected are two lines - one with a discount and one without a discount, but in checkout there is a third line - also not discounted. The total quantity is still correct, but an additional line split happens. As far as I could see, this happens if and only if the non-discounted line appears before the discounted line in cart.
The function run result only allows targeting a product variant and not specific lines, so I do not see room for changes in the function here. That is why it seems like a bug to me. I appreciate any help on this.
Sure, I sent you more info.
i am facing the same issue please update on this
Hi,
We are experiencing the same issue with a native buy x get y discount in Shopify. If the customer moves to and from the cart the discounted product is duplicated.
Was there any resolution? Thanks.
@SBD_ Were facing the same issue. Are there any news about the progress solving this problem?