By using discount codes and excluding specific products but using those products in an expand operation, the condition of the discount code gets fully ignored, and therefore added as discounted line item component to a cart.
See in this screenshot, we have an expanded product which has a deposit as separate product applied and for comparison reasons also as a single standalone deposit product.
You can see that if a 10% discount is active, which is ONLY allowed to be valid for the "Kellerbier", the discount also gets applied to the line item component. To see, that the condition really kicks in, you can compare it with the single deposit product, which is also in the cart:
I assume, that the discount code gets first applied to the original product BEFORE the expaned operation is applied to, and therefore also the discount code applications are applied to the expanded line item components.
I think, that this is a bug in Shopfiy Functions and therefore it should be investigated and fixed.
By using discount codes and excluding specific products but using those products in an expand operation, the condition of the discount code gets fully ignored, and therefore added as discounted line item component to a cart.
See in this screenshot, we have an expanded product which has a deposit as separate product applied and for comparison reasons also as a single standalone deposit product.
You can see that if a 10% discount is active, which is ONLY allowed to be valid for the "Kellerbier", the discount also gets applied to the line item component. To see, that the condition really kicks in, you can compare it with the single deposit product, which is also in the cart:
I assume, that the discount code gets first applied to the original product BEFORE the expaned operation is applied to, and therefore also the discount code applications are applied to the expanded line item components.
I think, that this is a bug in Shopfiy Functions and therefore it should be investigated and fixed.