Thu. Jul 4th, 2024

41. Magento. How to put a shop into catalog mode

2 min read
  1. 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.
  2. First of all, let’s remove My Cart and Checkout from the frontend:

    magento_catalog_0 magento_catalog_0a

  3. Log into your Magento admin panel and navigate to System >> Configuration >> Advanced. Disable the Mage_Checkout option:
    magento_catalog_1
  4. 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.
  5. Navigate to /app/design/frontend/default/themeXXX/template/catalog/product directory.
  6. We are going to alter the following files:
    1. new.phtml
    2. list.phtml
    3. view.phtml
  7. 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>

    magento_catalog_2

  8. 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>

    magento_catalog_3

  9. 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’) ?>

    magento_catalog_4

  10. 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;}
  11. Sometimes it’s required to clean the Magento cache.
  12. 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.

July 2024
M T W T F S S
« Jun    
1234567
891011121314
15161718192021
22232425262728
293031