Support Allowing Customers to Remove Auto-Added Items
complete
M
My Pura Vida Wellness Private Limited
If the customer removes an item that was automatically added by a specific "Add to Cart" node, our app should detect that and not add items from that specific node back to the cart. This will allow customers to redeem other tiers if they remove the gift for one tier, but if they redeem one tier and remove it, they can't get that tier again in this cart. We will use cart attributes to store this information.
If you'd like us to add this feature to our app, please upvote and comment on this thread.
P.S. This feature request was generated via AI, based on the conversation with the customer.
Tobe Osakwe
complete
Tobe Osakwe
in progress
Tobe Osakwe
planned
Tobe Osakwe
A major challenge to implementing this:
Shopify lacks any type of standard event stream we could hook into to 100% accurately detect when items have been removed from the cart.
Currently, in order to detect cart changes, our listens to the following:
- When the page loads
- When a form with an action containing /cart/add, /cart/update, etc. is submitted
- When a fetchorXMLHttpRequestwith method POST is sent to a cart URL
However, we've noticed that in several themes, when the customer removes an item from the cart, none of the above points are triggered. Instead, "remove" buttons are often just direct links to /cart/change. Because the page navigates away when this is clicked, the app might not be able to recognize that the item has been removed before the navigation.
In fact, we've already implemented a link click listener in the past, but in the theme we implemented this for (Palo Alto), this listener was simply never even triggered, so we removed it.
Therefore, the ability for our app to remember which items have been removed by the customer will inherently not be 100% accurate.
Please understand that Shopify lacks built-in support for many things that would streamline the implementation of a feature like "auto add to cart."
Thanks for your understanding and patience,
Tobe
Tobe Osakwe
under review