41. Magento. How to put a shop into catalog mode
2 min read- Unfortunately, there is no such option to enable a Catalog Mode in Magento by default, therefore, we are going to edit files and manually delete add to cart buttons.
- First of all, let’s remove My Cart and Checkout from the frontend:
- Log into your Magento admin panel and navigate to System >> Configuration >> Advanced. Disable the Mage_Checkout option:
- In order to remove add to cart buttons from Product pages and Category pages, connect to your server using an FTP client or access your files via Hosting Cpanel file manager.
- Navigate to /app/design/frontend/default/themeXXX/template/catalog/product directory.
- We are going to alter the following files:
- new.phtml
- list.phtml
- view.phtml
- Open new.phtml file to remove add to cart button from the New Products section on home page. Locate and remove the following line:
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>
- Open list.phtml file to remove add to cart buttons from the Category pages. Locate and remove the following line:
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>
- Open view.phtml file to remove add to cart button from the Product view pages. Locate and remove the following line:
1<?php echo $this->getChildHtml(‘addtocart’) ?>
- In case you also need to hide/remove product prices, this can be easily done by applying the following rule to the styles.css file located in skin/frontend/default/themeXXX/css/ folder:
1.price-box {display: none;}
- Sometimes it’s required to clean the Magento cache.
- Open your website and refresh the page (Ctrl+F5).
Thank you. Now you know how to remove add to cart and checkout options in Magento.