Add compatibility with cart transform functions #434
a47ae
started this conversation in
Feedback: Discounts APIs
Replies: 1 comment
-
Hey @a47ae I was just wondering if you ever received any feedback on the above or managed to work around the problem at all? We are having exactly the same issue. Thanks! |
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
-
Hey, I'm referencing a discussion with Nick Wesselman, indicating that Shopify's current architecture doesn’t allow discount functions to interact with individual components of a bundled item (https://community.shopify.com/c/shopify-functions/combine-discount-function-and-cart-transformation/td-p/2409718).
As it stands, cart transformation functions run before discount functions and discount functions can not access item components. This limitation hinders our ability to apply discounts to individual bundle components, a feature particularly crucial for our use case.
Use Case Context:
We manage a loyalty program where select customers receive specific items at no cost (e.g., a complimentary engraving), facilitated through discount functions. Concurrently, the shop utilizes cart transformations to aggregate products, presenting them as a single bundled item during checkout. The issue arises when an eligible 'free' item is embedded within a bundle, rendering our discount function ineffective in adjusting the item’s price within that bundle.
Using cart transformation for price adjustments is not a viable workaround due to:
Request:
We propose enhancing the discount function framework to allow visibility and operability on individual bundled item components. Alternatively, a sequence alteration enabling item-specific discount functions to precede cart transformations could address this issue.
Beta Was this translation helpful? Give feedback.
All reactions