If you are already using Klevu Search via our Magento, Shopify or BigCommerce App, you may find that the Add to Cart button within our Klevu Themes or Recommendations already works.
If the add to cart functionality is not working, you may need to take an additional step to implement this feature for your respective platform.
Note: Only complete the following steps if you do not already have a function
klevu_addtocart() included in your store. Please check with your frontend developer if you are not sure.
The logic for adding an item to the cart in Shopify is quite simple. Add this to any pages of your Shopify store where a Klevu Add to Cart button might appear, ideally in your
The logic for adding an item to the cart in BigCommerce is quite simple. Add this to any pages of your BigCommerce store where a Klevu Add to Cart button might appear, ideally in your
You can find our implementation of this logic here:
For any other platforms, simply implement the function
klevu_addtocart with your own logic of what you would like to happen when a customer clicks on add to cart: