How can I configure support for an Ajax cart?

The Offer-Templates app fully supports Ajax based carts like slide-out or dropdown carts. 

In most cases Ajax based carts are shown on every page on your store. 

To support the display of offers in the cart on each page, the app needs some additional information to detect when an Ajax cart was opened.


On the Settings tab inside the app you can configure the cart settings.

Ajax cart

It is recommended to enable this setting if your theme shows the cart including the full cart items content on every page.

This settings is enabled automatically IF the app finds a cart form on the current page, but some themes only load the cart form after the cart icon was clicked, in this case the setting needs to be enabled manually. 

Cart url

You can configure a custom url to redirect to after and offer is activated.
(In most cases this setting should be left empty)

Cart open selector

Enter the selector of the element that is clicked to open the Ajax based cart.  The app then uses this selector to watch for click and also automatically open the cart when an offer is applied successfully. 

To find your specific selector, you can hover over the icon and right click > Inspect > Hover over the element in the developer console.

In the example above a valid selector would be "a.js-drawer-open-right" 

Enter the selector into the settings field. 

Below you can find a list of selectors for the most common themes.

If you cannot find the selector for your theme, please send us a request and we will be happy to help you out. 

Ajax cart offer

After you've setup the cart settings you should be able to create offers that are shown inside the ajax cart.

Theme cart open selectors

Theme Selector
boundless a.js-drawer-open-right
prestige a[data-drawer-id="sidebar-cart"]
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.