Need help?

Can't find what you are looking for? Try with one of these:

Add to Cart

If you are not using the latest version of our plugins, you will have to provide custom JavaScript code to make the button work.

When the option to add the cart button is enabled, we create an event that triggers every time a person has clicked the button. This event is called 'doofinder.cart.add'.

You need to catch this event and create a function in your code, to call your store's API for the implementation to work. This function will vary from platform to platform. You have to paste the script into your HTML code.

Example of generic implementation:

<script>
document.addEventListener('doofinder.cart.add', function(event) {
  const { item_id, amount } = event.detail;
  // add custom code to send the data to your cart API
  console.log("added ${amount} of item #${item_id}");
});
</script>

Important Update

We have updated the add to cart feature for most platforms. For installations prior to the release of this update, of the plugins mentioned below, you do not need to copy it manually. Simply follow this previous step, to update the script in the store, which is required for it to work properly.

  • Shopify, BigCommerce: you must deactivate and reactivate the search engine from the plugin.

  • Magento2, Prestashop, WooCommerce: you must install the latest version of doofinder from the plugin's marketplace.

  • Ekm: no api for add-to-cart.

How to activate it

To enable the add to cart button in your layer, go to your Admin > Layers > Appearance.

To customize your ‘Add to cart’ button, read the article ‘Appearance’.