In both product listings (e.g. the category page) and the product view page, I need to replace the button "Add to Cart" with an "enquire" button which links to the "Contact Us" page.
Please help me to find a solution.
In both product listings (e.g. the category page) and the product view page, I need to replace the button "Add to Cart" with an "enquire" button which links to the "Contact Us" page.
Please help me to find a solution.
Edit the file app/design/frontend/{package}/{theme}/template/catalog/product/list.phtml.
Change this:
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
to this
<button type="button" title="<?php echo $this->__('Enquire') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getUrl('contacts') ?>')"><span><span><?php echo $this->__('Enquire') ?></span></span></button>
Thanks a lot for your reply. It's worked fine, How to get same result from
Product view page.?
– Baby in Magento Aug 04 '14 at 06:45setLocation('<?php echo $this->getUrl('contacts') ?>')
– Marius
Aug 04 '14 at 06:50