Deepak Palreddy Posted October 8, 2014 Share Posted October 8, 2014 Hello Every one, 1. <a id="ajaxButton_8" class="exclusive ajax_add_to_cart_button" title="Add to cart" href="../cart.php?qty=1&id_product=8&token=$token=Tools::getToken(true)&add" rel="ajax_id_product_8">Add to cart</a> 2. <a onclick="ajaxCart.add(product_id=2, attribute_id=null, true, null, quantity=1, null);">Add to cart</a> The above both "Add to cart" buttons are not working in CMS page. 1st one is redirecting to "<domain>/cart.php?qty=1&id_product=8&token=$token=Tools::getToken(true)&add " and product is not getting added to cart. 2nd link is not working... Could anybody help...... Link to comment Share on other sites More sharing options...
vekia Posted October 8, 2014 Share Posted October 8, 2014 check this topic: http://www.prestashop.com/forums/topic/367455-solved-add-to-cart-buy-button-in-cms-pages/?p=1824977 Link to comment Share on other sites More sharing options...
Deepak Palreddy Posted October 8, 2014 Author Share Posted October 8, 2014 Thank you for reply, I have followed the above link and made changes you suggested. Script is not getting modified in cms page. And product is not getting added to cart.. Link to comment Share on other sites More sharing options...
vekia Posted October 8, 2014 Share Posted October 8, 2014 what errors you usee in browser console? can you share url to page where you use this code? Link to comment Share on other sites More sharing options...
Deepak Palreddy Posted October 9, 2014 Author Share Posted October 9, 2014 what errors you usee in browser console? can you share url to page where you use this code? <a onclick="ajaxCart.add(product_id=10, attribute_id=0, true, null, quantity=1, null);">Add to cart</a> When i click on the above link, I'm getting the below error. "ajaxCart is not defined" Link to comment Share on other sites More sharing options...
Deepak Palreddy Posted October 9, 2014 Author Share Posted October 9, 2014 Problem has been fixed by enabling Ajax Cart option in Cart Black module. Link to comment Share on other sites More sharing options...
vekia Posted October 10, 2014 Share Posted October 10, 2014 thank you for clarification what you did i marked topic title as solved and your answer as a solution to this problem with regards, Milos Link to comment Share on other sites More sharing options...
Recommended Posts