This one is collected from a blog:
This code will help you implement Add to Cart button in any magento structural page and that’s too in workable form:
<input type=”button” title=”<?php echo $this->__(‘Add to Cart’) ?>” onclick=”setLocation(‘<?php echo Mage::getUrl(‘checkout/cart/add’, array(‘product’=>$row['product_id'],’qty’=>1)) ?>’)” />
No comments:
Post a Comment