Posted on

Magento add-to-cart buttons on homepage don’t update cart

Problem relates to Internet Explorer 11 and Google Chrome (but sometimes it works in Google chrome and sometimes not).

The add-to-cart buttons on the product list on the homepage of Magento 1.8 does not update the “total cart sum” and there’s no green box pop-up with the “product-x added to cart!” confirmation text.

But after clicking on a category the green box suddenly turn up with confirmations on all products added on the homepage, and the “total cart sum” is correct.

Add-to-cart buttons in category products lists works fine as well as add-to-cart buttons on product pages.

Current html for the add-to-cart buttons on the product list on the homepage:

<div class=”actions clearer”>
<button type=”button” title=”Buy” class=”button btn-cart” onclick=”setLocation(‘http://mydomain.nu/index.php/checkout/cart/add/uenc/aHR0cDovL3N1bmRhcmUubnUvaW5kZXgucGhwLw,,/product/13/form_key/8Epibh9PEQSDwzRy/’)”>
<span><span>Buy</span></span></button>
</div>

Current html for the add-to-cart buttons in the product list on categories:

<div class=”actions clearer”>
<button type=”button” title=”Buy” class=”button btn-cart” onclick=”setLocation(‘http://mydomain.nu/index.php/checkout/cart/add/uenc/aHR0cDovL3N1bmRhcmUubnUvaW5kZXgucGhwL21pbmVyYWxzLmh0bWw,/product/134/form_key/8Epibh9PEQSDwzRy/’)”>
<span><span>Buy</span></span></button>
</div>

Leave a Reply

Your email address will not be published. Required fields are marked *