websitebuilder Posted August 25, 2014 Share Posted August 25, 2014 Hi all, I have spent the last 3 hours trying to get this to work and it wont. I want to add an "add to cart" button and function to a CMS page. I have found the following code on this forum to use: <p><a onclick="ajaxCart.add(product_id=2, attribute_id=0, true, null, quantity=1, null);">Add to cart</a></p> I have added this to the CMS page using the CMS editor in the back office using the source code button. However, when I save the page, it changes the code to: <p><a>Add to cart</a></p> What am I doing wrong? Link to comment Share on other sites More sharing options...
vekia Posted August 25, 2014 Share Posted August 25, 2014 it's a case of html purifier or tinymce editor you have to: 1) disable html purifier or 2) extend tinymce editor to support scripts Link to comment Share on other sites More sharing options...
websitebuilder Posted August 25, 2014 Author Share Posted August 25, 2014 i dont think so, how would i do that? Link to comment Share on other sites More sharing options...
websitebuilder Posted August 25, 2014 Author Share Posted August 25, 2014 Works perfectly, thanks Vekia Link to comment Share on other sites More sharing options...
vekia Posted August 25, 2014 Share Posted August 25, 2014 i modified my post, so you're reffering to modified one? or to post that i posted first time ? Link to comment Share on other sites More sharing options...
websitebuilder Posted August 25, 2014 Author Share Posted August 25, 2014 I did the the HTML purifier and the extended tinymc and it works great. Is it possible once the user has clicked this add to cart that it then directs them to another page of my choose? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now