Jump to content

No animation when using onClick ajaxCart.add


telnett

Recommended Posts

you have to insert correspond product image to <div> where add to cart button appears, you've got it?

 

I only had this basic html, no divs or images yet.

 

 

Something like this?

<div><img src='some_image.jpg'><a onclick="ajaxCart.add(product_id=45, null, true, null, quantity=1, null);">Add to cart</a></div>

Well, I must be doing it wrong because it didn't helped.

Link to comment
Share on other sites

image (or its parent <a> element must have class="" param like other images for example - on category pages: product_img_link

 

try to use something like:

 

<a class="product_img_link"><img src=""/></a>

Link to comment
Share on other sites

image (or its parent <a> element must have class="" param like other images for example - on category pages: product_img_link

 

try to use something like:

 

<a class="product_img_link"><img src=""/></a>

 

ok, well this one did not worked either, but you got me back on the track. I have just pasted a bunch of html from my list view page and now I can get some distorted stuff to fly roughly towards the cart so I believe I'll work my way throught this by cleaning that html out tag by tag.

 

Thank you for your attention and quick response, I appreciate it!

 

 

EDIT: Adding the code that works for me

 

My solution:

<img class="add_to_cart_image" src='/image_url.jpg'>

<a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_45" href="/cart?add=&id_product=45" title="Add to Cart">Add to Cart</a>
Edited by telnett (see edit history)
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...