Trending4ever Can items be modified from Shopify Functions API? Because I am building an app and have no access to modify cart from storefront. I don’t want to use Script Tag as they are about to be deprecated soon. Therefore, I am coming to Shopify Functions, but have no idea if that possible.
Topic summary
Goal: automatically remove items from the cart when a condition (e.g., cart total) is not met using Shopify Functions.
Current status:
- Not supported in Shopify Functions today (confirmed). The Cart Transform API can add products but does not remove items tied to cart-level conditions. The Cart/Checkout Validation API only displays errors when conditions fail.
Workarounds discussed:
- Checkout UI extension: suggested as a way to present messages and guide users to remove items during checkout. Participants asked for examples, visuals, and whether removal can happen without leaving checkout; no concrete examples or confirmations provided.
- Theme JavaScript/front-end: set item quantity to 0 or monitor the cart to enforce conditions, but this requires storefront access and Script Tags are being deprecated.
- Webhooks: idea to trigger cart updates (e.g., via discount webhook) is untested; updates pending.
Actions and references:
- Feature request link provided to upvote support for removal via Cart Transform API.
Definitions:
- Shopify Functions: server-side extensions to modify commerce logic.
- Checkout UI extension: customize checkout interface and workflows.
Outcome: No resolution yet. Roadmap/timeline and UI examples remain unanswered; discussion is open.