Zupli Docs
For developers and agencies

Theme selectors: cart icons, buttons and drawers

Zupli detects most themes. When a cart icon, add to cart button or the theme's own drawer is missed, set it in the dev options. With examples.

2 min readUpdated

On this page
  1. Where they are
  2. Additional cart buttons
  3. Theme header element selector
  4. Additional product page add to cart buttons
  5. Find a selector
  6. Test it

Zupli detects most themes’ cart icons, add to cart buttons and cart drawers automatically. Some themes use custom classes or their own JavaScript, so Zupli can’t spot them. The dev options let you point Zupli at the right elements, without touching theme code.

Where they are

On the Appearance page, open Advanced settings and click Show more dev options.

The dev options: Additional cart buttons, Theme header element selector and Additional product page add to cart buttons

Additional cart buttons

For add to cart buttons Zupli doesn’t detect, such as quick add buttons in collection grids. Use it when the button adds the product but the Zupli drawer doesn’t open.

.quick-add__submit, .product-card-cart .btn

More common examples: .add-to-cart, .product__add-to-cart, button[name="add"].

Theme header element selector

For the cart icon in your header. Clicking it should open the Zupli drawer instead of the cart page or the theme’s own drawer. Use it when clicking the cart icon opens the cart page, or nothing happens.

.header__icon--cart, .cart-icon

More common examples: .site-header__cart, .cart-link, #cart-icon-bubble.

Additional product page add to cart buttons

Use it for the theme’s own cart drawer, mini cart or dark overlay when they still appear alongside Zupli: two drawers at once, an overlay that won’t go away, or a page that stops scrolling after opening the cart.

.cart-drawer, .cart-overlay

More common examples: .cart-notification, .mini-cart, .ajaxcart, .cart-sidebar.

Find a selector

  1. On your storefront, right-click the button or icon and choose Inspect.
  2. Find its class or ID, for example <a class="header__icon--cart"> gives .header__icon--cart.
  3. Prefer classes to IDs, and avoid generated names that change on every theme build.
  4. Separate several selectors with commas.

Test it

Only add selectors for elements that aren’t already detected. After saving, refresh the store and click every cart trigger on desktop and on a phone; many themes have a separate mobile header with its own cart icon. Still stuck? Contact support with the store URL.