Nowadays, the cart drawer is more prevalent than the standard cart page. But the cart drawer is powered by various themes or apps. Shopify doesn’t offer any official API.
As an app developer, I find it hard to integrate my theme app extension with different cart drawers using the Cart API. Each cart drawer offers its own integration method, not to mention these methods are versioned.
Can Shopify enforce a standard way to do so, just like subscriptions?
Shopify doesn’t control cart drawers since they’re entirely theme-specific. Every theme handles them differently,some use JavaScript, some rely on Liquid, and others have fully custom setups. Enforcing a standard now would break too many existing themes, and Shopify can’t really force developers to change how their cart drawers work.
A more practical and realistic solution would be for Shopify to introduce standard cart events like cart:updated
or item:added
etc, so apps and themes can listen for cart changes. Theme developers could subscribe to these events when building their cart drawers, making sure they update properly whenever the cart changes. Apps could also listen to the same events to keep everything in sync.
1 Like
Hi Gulam,
Really like your suggestion on standardised cart events to make the experience more predictable for both app and theme devs. Have connected with the relevant team on this.
3 Likes
The growing preference for cart drawers over traditional cart pages has made Shopify development more complex, especially for app developers. Since Shopify doesn’t provide an official API for cart drawers, each theme or app implements its own method, leading to compatibility challenges. A standardized approach, similar to Shopify’s Subscriptions API, would greatly benefit developers by ensuring seamless integration across themes. Until Shopify introduces an official Cart Drawer API, developers may need to create adaptive integration methods or collaborate with theme developers. For expert guidance on Shopify customization and development