Allow Discount Allocator Function to default to no impact / default Shopify discount allocation #601
studioforty9-dev
started this conversation in
Feedback: Discounts APIs
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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