Remove Add to Cart buttons from catalog pages

Last modified by liviudvd on Mon, November 1, 2010 11:37
Source|Old Revisions  

If you want to remove the “Add to Cart” buttons from the catalog pages, this is how you do it:

All you have to do is find the right file to edit, then you just need to delete some code in that file.

The file you need to edit is list.phtml

You can find it by going to: app > design > frontend > default > default > template > catalog > product > list.phtml

Because the catalog pages can by viewed in either grid mode or list mode, there are two references to the “Add to Cart” button in the code within the list.phtml file. Make sure you delete the code in both sections. If you read the code, you will see where it says list mode and grid mode.

Look for this code, then delete it:

  1. <?if($_product->isSaleable()):?>
  2.             <button class="form-button" onclick="setLocation('<?=$this->getAddToCartUrl($_product)?>')"><span><?=__('Add to Cart')?></span></button>
  3.             <?endif;?>

Once you’ve done that, you shouldn’t see the “Add to Cart” buttons on the catalog pages anymore.

Sorry! This no match with the newer version 1.4.1.1 !




 

Magento 2 GitHub Repository

Magento Job Board - Some sort of tag line goes here

Latest Posts| View all Jobs