Discussing Shopify Functions development, deployment, and usage in Shopify apps.
A function can return multiple discounts. Need ALL of them to be applied, not just one: https://shopify.dev/api/functions/reference/product-discounts/graphql/common-objects/discountapplica...
Use case: Volume discount, included in examples.
1st cart line product can meet Tier 1, needs to get a 10% discount
2nd cart line (another product) can meet Tier 3, needs to get a 30% discount
There's already a setting per "function discount" which says if (all) the discounts provided by this function combinesWith other product discounts
https://shopify.dev/api/admin-graphql/2022-07/mutations/discountAutomaticAppCreate
so the `DiscountApplicationStrategy` is useless. The function can manage it's own internals and return one or more discounts.
Hi Shopify,
any chance that strategy ALL will be added soon?
Best,
Greg
Hi @Greg_P @markus12 we are getting the same limitation, have you got any solution or work-around this one?
Thanks
Abdul
Well, as we need only 2 discounts at the same time we decided to use 2 separated functions, but it's not something which make us happy 😉 Strategy ALL would be the best solution.
We need this also. Has Shopify support responded?
Hi @nbfusion, please look here https://github.com/Shopify/function-examples/discussions/194 and upvote 😉 It’s not a good news but better than nothing.
This is also an issue for us. We need to be able to apply different discount amounts on different line items. This should be based on the line item, not the variant ID. We need the same capabilities that the Script Editor currently has.
Hey @markus12 ,
Are you using two order discount shopify functions or one order discount and one product discount shopify function to apply multiple discounts?