Skip to main content
Beyond styling, the cart has a few behavior settings that control how it interacts with your storefront — when the drawer opens, and which theme elements Aftersell keeps in sync with the cart.

Where to find these

In the cart editor, open Cart settings. The options below are grouped under Behavior and Custom selector.

Open the cart when an item is added

Open cart when an item is added controls whether the drawer pops open automatically each time a shopper adds a product. It’s on by default. Turn it off if you’d rather the cart stay closed until the shopper opens it themselves.

Theme selectors

Aftersell hooks into your storefront through CSS selectors — for example, to know which element opens the cart, or which cart-icon count to keep in sync. Built-in detection covers the most popular Shopify themes (Dawn, Sense, Crave, Debut, Impulse, Horizon, and many others), so most stores never need to touch these. Adjust a selector only if something isn’t wiring up correctly on your theme.

Selector modes

Each selector offers the same three modes: The selector input is enabled only for the Default + custom and Custom only modes.

The three selectors

How to find a selector

  1. Open your storefront in a browser (Chrome recommended).
  2. Right-click the element you want to target — your cart icon, the count number, or the add-to-cart button — and choose Inspect.
  3. In the panel that opens, find the element that represents it (the count is often a span inside the cart icon).
  4. Note its class (starts with .) or ID (starts with #) — for example .header__cart-count span or #CartCount.
  5. Back in Cart settings, set the selector to Default + custom or Custom only and paste it in.
  6. Save, then test on both desktop and mobile.
Start with Default — it works for most themes with no setup. Reach for Default + custom when only one of several icons updates (say, desktop works but mobile doesn’t), and Custom only when the default is targeting the wrong element. If you’re unsure which selector to use, your theme developer can point it out — you don’t need to write any code, just copy and paste.