Jump to content

Add to Cart link on CMS page not working


Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...