Jump to content

Add to cart button on product detail page not working even though other ajax_add_to_cart_button work


Recommended Posts

Hi,

 

Add to cart button on product details page is not working! There are no console errors and products listed in similar product block has ajax_add_to_cart_button which are working fine. No ajax is being fired. I know this could be a small issue but I don't seem to rectify it as i have removed all the changes I had made. 

Please help! 

 

Thanks

Link to comment
Share on other sites

i found the solution. Body tag of my website was poorly formed (<bodyid="product" insted of <body id="product") and on product detail pag add to cart button ajax is fired with $("body#iproduct p#add_to_cart submit") which clearly couldn't find the tag and ajax didn't get fired. As I told it was just a small issue but still made me go crazy and pull my hair for almost last one and a half hour. Never thought body tag could be ill formed.

Anyway, thank you so much for you attention.

Edited by preetam23 (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...