Sunday, July 29, 2012

Adding Custom Add to cart button in Magento


Hi,

we can create custom add to cart link or button from product id you can use below code


<button onclick="setLocation('<?php echo $this->getAddToCartUrl($_item) ?>')" class="button btn-cart" title="Add to Cart" type="button"><span><span>Add to Cart</span></span></button>