Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
We have a scenario in which we want to add/remove items to a person's cart based on other items they've selected. Can this be one using shopify functions/cart extensions?
@emiller It seems achievable using Checkout UI extensions. What do you think? 🐦
Checkout UI Extensions Documentation
You can use useCartLines to check the state of the cart, including retrieving line item quantities and attributes.
Additionally, by using useApplyCartLinesChange, you can create, update, or delete items based on certain conditions.
Knowledge of Remix, React, and Node.js will be required, but it allows for flexible customization.
If this seems challenging, I recommend using a compatible Shopify app instead.
If anyone knows of a good app, please share! 👋