Allow Discount Allocator Function to default to no impact / default Shopify discount allocation #601
studioforty9-dev
started this conversation in
Feedback: Discounts APIs
Replies: 1 comment
-
An example of default behaviour (taking into account the discount application strategy etc) would be really helpful |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
If I return an empty result, no discounts are applied at the cart:
Ideally there would be a way to check the input, and if certain criteria are not met, then we let Shopify do its normal discount allocation.
Otherwise, what I currently need to do, is to map all of the proposals in the input, to the output and the structure/field names are not the same. This is a lot of boilerplate mapping code to effectively "do nothing".
The use case I'm working on is where if a coupon is applied, it should only be applied against products that DO NOT have a certain tag (some products are legally non-discountable). But if the cart doesn't include such a product, I don't want to have to do all of the allocation. I want Shopify to just run as it would normally where the Discount Allocator Function did not exist.
Beta Was this translation helpful? Give feedback.
All reactions