2. Magento. How to remove “Add to Cart” buttons from catalog pages
1 min readThis tutorial shows how to remove Add to Cart buttons from the catalog pages of Magento store themes.
- Open cPanel or FTP and navigate to the following files:
- app\design\frontend\tm_themes\themeXXXX\template\catalog\product\compare\list.phtml
- app\design\frontend\tm_themes\themeXXXX\template\review\customer\list.phtml
- app\design\frontend\tm_themes\themeXXXX\template\review\product\view\list.phtml
- app\design\frontend\tm_themes\themeXXXX\template\tm\productlistgallery\list.phtml
- app\design\frontend\tm_themes\themeXXXX\template\wishlist\item\list.phtml
where themeXXXX is your theme number.
- Due to the fact the catalog pages can by viewed in either grid or list mode, there are two references to the Add to Cart button in the code within the list.phtml file. Make sure to delete the code in both sections.
Look up this code and delete it:
1<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> - Clear Magento cache and refresh the website page to see the changes.