R.Kinkeris Posted April 10, 2013 Share Posted April 10, 2013 (edited) Hello, I have a problem with buy now/add to cart buttons. When I click on them the product image moves to cart and the item is added to cart but I need that clicking on that button (ajax_cart_button) it adds the item to cart and opens the cat summary page. At the moment I'm using code: jQuery(function($) { $(".ajax_add_to_cart_button").click(function(e) { setTimeout((function(){ window.location = "link/en/order"; }), 2000); }); }); but it doesn't work. It looks like something in ajax-cart.js is disabling this script. If I write this part: $(".ajax_add_to_cart_button").click(function(e) { setTimeout((function(){ window.location = "link/en/order"; }), 2000); }); in console and then click on button then everything works like expected. Dose anyone know what could cause the code not to work? PS version - 1.5.4 Theme - not default but ajax buttons haven't been edited. Link to page - can't provide. My aim is that add to cart button works like in this theme: http://lt-demo.com/l...oduct&id_lang=1 Edited April 11, 2013 by R.Kinkeris (see edit history) Link to comment Share on other sites More sharing options...
R.Kinkeris Posted April 11, 2013 Author Share Posted April 11, 2013 Solved. At ajax-cart.js around line 39 function .unbind was preventing the script to happen. Link to comment Share on other sites More sharing options...
Recommended Posts