Adding Custom add to cart button in Magento
Put below code into your .phtml file.
$productId = '168'; // Your Product Id
$_product = Mage::getModel('catalog/product')->load($productId);
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo Mage::helper('checkout/cart')->getAddUrl($_product); ?>')"><span><span><img src="<?php echo $this->getSkinUrl('images/buy.jpg') ?>" alt="" /></span></span></button>
3 comments:
Hello brother
i want product list page add to cart button for configurable product..
with options
please help me....
Saved as a favorite, I like your blog!
where to put this code?
Post a Comment