Discussing Shopify Functions development, deployment, and usage in Shopify apps.
I am having two different order discounts backed by different functions active, that should apply tiered discounts to the cart subtotal. One function outputs a percentual discount if the cart price exceeds a certain threshold. The other function outputs a discount with a fixed amount if the cart price exceeds the same threshold. The help article on discount combinations says this combination should be possible and discounts should be applied subsequently. But when I am testing it, always only one discount is applied, mostly the percentual discount.
Both functions output valid discounts. The discount is applied if I only have one order discount active at a time, so both function should work correctly. I provide the function outputs for a run on the same cart below.
Percentual order discount:
{ "discountApplicationStrategy": "MAXIMUM", "discounts": [ { "conditions": [ { "orderMinimumSubtotal": { "excludedVariantIds": [ "gid://shopify/ProductVariant/36839682605215" ], "minimumAmount": 50, "targetType": "ORDER_SUBTOTAL" } } ], "message": "Aktion", "targets": [ { "orderSubtotal": { "excludedVariantIds": [ "gid://shopify/ProductVariant/36839682605215" ] } } ], "value": { "percentage": { "value": 10 } } } ] }
Fixed amount order discount:
{ "discountApplicationStrategy": "MAXIMUM", "discounts": [ { "conditions": [ { "orderMinimumSubtotal": { "excludedVariantIds": [ "gid://shopify/ProductVariant/36839682605215" ], "minimumAmount": 50, "targetType": "ORDER_SUBTOTAL" } } ], "message": "Geschenk", "targets": [ { "orderSubtotal": { "excludedVariantIds": [ "gid://shopify/ProductVariant/36839682605215" ] } } ], "value": { "fixedAmount": { "amount": 19 } } } ] }
As you can see the outputs only differ in their message and value, the conditions are the same. Is there anything I am missing so that only one discount is applied?