Magento – Magento 1.9 :- Add to Cart Helper – not working

addtocarthelpermagento-1.9

I've been trying to fix a problem on an inherited Magento 1.9.1 site – the problem is coming from a custom category page I think.

The template is using the Add to Cart Helper – in what appears to be the same way as the working product list template.

On this page: http://www.trevorsorbie.com/shop/ranges.html, if you click the Add to Cart button on any product nothing is added to cart. If you log in to your account and click that button it does add to cart..

But this is working on this page: http://www.trevorsorbie.com/shop/products.html

On the ranges.html page I've used:

<a class="btn btn-sm add-to-cart-alt" href="<?php echo Mage::helper('checkout/cart')->getAddUrl($_product)?>" title="Add Product to Cart">
    <i class="fa fa-shopping-cart"></i>
    <i class="fa fa-spinner fa-spin"></i>
    <span class="sr-only">Buy</span>
</a>

Any information or pointing me at reading material to fix this will be much appreciated!

Best Answer

If you want to hide Add-to-Cart button for not logged-in customers, then following link might help you:

Related Topic