This content contains older information from our previous Javascript library. Please visit the link if you have implemented Klevu with the latest template JS.
- Open vendor/klevu/module-addtocart/view/frontend/templates/klevu/addtocart/index.phtml file
- Search for the following function :
<script type="text/javascript"> function klevu_addtocart(id,url,qty) { ..... ..... ..... ..... } </script>
- Declare the following javascript variable
var klevu_addtocartLbl = "More Info";
After declaration, it should look like<script type="text/javascript"> var klevu_addtocartLbl = "More Info"; function klevu_addtocart(id,url,qty) { .... .... .... } </script>
- Change value of klevu_addtocartLbl variable For displaying button with text (Default)
klevu_addtocartLbl = 'Add to cart';
For displaying image as buttonklevu_addtocartLbl = '<img src="img/cart.png" />';