Open navigation

Customization

This content contains older information from our previous Javascript library. Please visit the link if you have implemented Klevu with the latest template JS.
  1. Open vendor/klevu/module-addtocart/view/frontend/templates/klevu/addtocart/index.phtml file
  2. Search for the following function :
    
     <script type="text/javascript">
    
     function klevu_addtocart(id,url,qty) {
     .....
     .....
     .....
     .....
     }
     </script>
     
  3. Declare the following javascript variablevar 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>
  4. Change value of klevu_addtocartLbl variable For displaying button with text (Default)
     klevu_addtocartLbl = 'Add to cart';
    For displaying image as button
     klevu_addtocartLbl = '<img src="img/cart.png" />';

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.