2

I need help in Button animation in magento. I simply want my Add to cart button will change when user clicks on the button. Just like http://www.localbanya.com/. When any user will click on add to cart button on catalog page, the button text will be changed as "1 item added to cart". How do I do it. Please help.

enter image description here

2

1) You should try coding this yourself first and then ask for help when you get stuck.

2) I'm giving you an idea how to do it as a starting point for your googling. As you can see from that site, when you add to cart there is a json call. If the status is "success" then change the text of that button with javascript along these lines:

if (status == "success"){
  $("button").each(function(){
    $(this).find("span").text("new text here");
  });
}

this is just an idea. How it is done depends on your configuration.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.