Choose when the cart drawer opens
Two settings decide if the drawer opens on add to cart and on the cart icon. Both are on by default.
Two settings control this, under General → Settings in the cart editor: Open drawer when products are added and Open drawer when cart icons are clicked. Both are on by default. Keep both on to replace your theme's cart fully.
Change the settings
- In Shopify admin, open Apps → Section Store → Cart Drawer.
- Click Edit on your cart.
- Under General, open Settings.
- Tick or untick the two settings.
- Click Save.
What each setting does
Open drawer when products are added:
- An add-to-cart form on your store opens the drawer at once.
- When your theme or another app adds through Shopify's standard cart address, the drawer refreshes and opens.
Open drawer when cart icons are clicked:
- A click on your theme's cart icon opens the drawer.
- A click on any link to your cart page opens the drawer.
Why you should keep both on
While both are on, we switch off your theme's own drawers and "added to cart" popups. If either one is off, we leave your theme's cart alone. It can then open next to ours.
Can the drawer stay closed when a shopper adds a product?
Yes, but your theme then handles the add. Untick Open drawer when products are added. Your theme's own add-to-cart behavior runs, and that can be its own cart or popup. The drawer keeps its count up to date and still opens from the cart icon.
Can a button open the drawer?
A link to your cart page opens it, while the second setting is on. A developer can also call SectionStoreCart.open().
Related
- Why does my theme's cart still open, or open too?
- Why isn't my cart drawer opening?
- Cart drawer public API (SectionStoreCart)
Also searched as: auto open cart, open cart on add to cart, stay on page after add to cart, dont open cart after add to cart, drawer opens automatically, stop cart opening, cart icon click, open drawer from button, open drawer link, add to cart behaviour, cart opens every time, open cart button, cart icon opens drawer
Did this answer your question?