Ads

Magento: add to cart button is not working

December 17, 2009
Filed under: Featured, Magento Cart 

In my custom theme there was this code for Add to cart button:

<button type=”button” class=”button-form” onclick=”productAddToCartForm.submit()”><span><?php echo $this->__(’Add to Cart’) ?></span></button>

The problem was that nothing happened when you clicked it. Just remove type="button" so it looks like this:




<button class=”button-form” onclick=”productAddToCartForm.submit()”><span><?php echo $this->__(’Add to Cart’) ?></span></button>

It worked for me…

Comments

3 Comments on Magento: add to cart button is not working

  1. Luke McReynolds on Wed, 3rd Mar 2010 4:16 pm
  2. I had the same problem with the “Apply Coupon” button on the checkout page. Removing type=”button” made the button work for me as well.

    Thanks!

  3. Darshana on Tue, 11th May 2010 3:24 am
  4. Thanks a lot for the solution. It works.

  5. Ghassen Khemiri on Tue, 20th Mar 2012 7:25 am
  6. I am having a little bit the same problem.

    I am just installing z new magento 1.5 ,and imported the products from an old one
    to my new shop.

    but there are no “add to cart” button on configurable products with custom options,so the “add to cat” so it doesn’t appear. there are any fix. thank you

Tell me what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!





*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image