Sunday, July 8, 2012

How to display add to cart url on any page on magento?


<?php if(isSaleable()): ?>
 <button type="button" title="__(‘Add to Cart’) ?>” class=”button btn-cart” onclick=”setLocation(‘getLayout()->createBlock(‘catalog/product_list’)->getAddToCartUrl($objProduct) ?>’)”>__(‘Add to Cart’) ?>
__(‘Out of stock’) ?>

No comments:

Post a Comment

Please mention your comments.......