How to remove the Add to Cart button from Catalog pages in Magento 2?Magento 2.2.5: Disable Add to Cart buttonMeesed up “Add to cart” button in product pagesRemove Add to Cart button on select productsMagento 2: How to remove add to cart template from product detail pageMagento 2: add product (catalog) to cart when button is clickedHow to add “Empty Cart” button to minicartMagento 2 remove options from item cartMagento2 Add to cart button in row with grouped ProductsMagento2: How to remove ‘Add New’ button from Admin Grid?Magento 2 | Remove add to cart from catalog/category/view/How to add 'addToCart' GA event to Add To Cart button on wishlist page?

Why have both: BJT and FET transistors on IC output?

Map vs. Table for index-specific operations on 2D arrays

Applying for mortgage when living together but only one will be on the mortgage

How to trick a fairly simplistic kill-counter?

When did J.K. Rowling decide to make Ron and Hermione a couple?

How does Rust's 128-bit integer `i128` work on a 64-bit system?

Who's behind community AMIs on Amazon EC2?

Pre-Greek θάλασσα "thalassa" and Turkish talaz

What is the most 'environmentally friendly' way to learn to fly?

What's the term for a group of people who enjoy literary works?

Is this popular optical illusion made of a grey-scale image with coloured lines?

What is the reason behind water not falling from a bucket at the top of loop?

What does the "きゃ" in "していきゃがらなかった" stand for?

Skipping same old introductions

Can an alphabet for a Turing machine contain subsets of other alphabets?

Will medical institutions reject an applicant based on being 28 years of age?

If I buy and download a game through second Nintendo account do I own it on my main account too?

Export economy of Mars

What does a number above the 'staff' mean in tablature?

Why are sugars in whole fruits not digested the same way sugars in juice are?

How do I respond appropriately to an overseas company that obtained a visa for me without hiring me?

Protect a 6 inch air hose from physical damage

In Haskell, when using the XStrict language extension, is if short-circuiting?

Declaring a visitor to the UK as my "girlfriend" - effect on getting a Visitor visa?



How to remove the Add to Cart button from Catalog pages in Magento 2?


Magento 2.2.5: Disable Add to Cart buttonMeesed up “Add to cart” button in product pagesRemove Add to Cart button on select productsMagento 2: How to remove add to cart template from product detail pageMagento 2: add product (catalog) to cart when button is clickedHow to add “Empty Cart” button to minicartMagento 2 remove options from item cartMagento2 Add to cart button in row with grouped ProductsMagento2: How to remove ‘Add New’ button from Admin Grid?Magento 2 | Remove add to cart from catalog/category/view/How to add 'addToCart' GA event to Add To Cart button on wishlist page?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















How to remove the Add to Cart button from Catalog pages only?










share|improve this question






























    2















    How to remove the Add to Cart button from Catalog pages only?










    share|improve this question


























      2












      2








      2








      How to remove the Add to Cart button from Catalog pages only?










      share|improve this question














      How to remove the Add to Cart button from Catalog pages only?







      magento2 theme design






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked May 3 '16 at 23:01









      Luis GarciaLuis Garcia

      6745 gold badges23 silver badges44 bronze badges




      6745 gold badges23 silver badges44 bronze badges























          2 Answers
          2






          active

          oldest

          votes


















          5














          In Magento 2 they've hardcoded them into the catalog product list template.



          This can be found around line 80 of app/code/Magento/Catalog/view/frontend/templates/product/list.phtml:



          <?php if ($_product->isSaleable()): ?>
          <?php $postParams = $block->getAddToCartPostParams($_product); ?>
          <form data-role="tocart-form" action="<?php /* @escapeNotVerified */ echo $postParams['action']; ?>" method="post">
          <input type="hidden" name="product" value="<?php /* @escapeNotVerified */ echo $postParams['data']['product']; ?>">
          <input type="hidden" name="<?php /* @escapeNotVerified */ echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php /* @escapeNotVerified */ echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
          <?php echo $block->getBlockHtml('formkey')?>
          <button type="submit"
          title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
          class="action tocart primary">
          <span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
          </button>
          </form>


          A few options exist to suppress them:



          • Create an around plugin for the block and change $_product->isSaleable() to return false for the render of the template, and swap it back afterward

          • Replace this template in your custom theme's layout

          • Hide with CSS

          Honestly hiding via CSS isn't the worst option here:



          .catalog-category-view .action.tocart display: none; 





          share|improve this answer



























          • Hiding via CSS also removed the "Add to Cart" button from product pages. Is there a way to remove it only from Catalog pages?

            – Luis Garcia
            May 4 '16 at 17:38











          • Ah yes. See the update.

            – philwinkle
            May 4 '16 at 22:53











          • Can you elaborate fist option plugin around to chang $_product->isSaleable()

            – siddhesh
            Jul 21 '17 at 14:12











          • Actually I tried to make salable false using catalog_product_is_salable_after event but it gives side effects like it doesn't show product options, it's make product qty 0 and show product as 'out of stock' I would like to do it only for addtocart renderer only.@philwinkle

            – siddhesh
            Jul 21 '17 at 14:22












          • It can be remove using the layout overide the file in the catalog_product_view.xml file in the theme folder. <referenceBlock name="product.info.addtocart.additional" remove="true" />

            – Divya
            Jul 24 at 4:50



















          1














          You can always hide it via CSS but i will highly recommend to copy the app/code/Magento/Catalog/view/frontend/templates/product/list.phtml into YourVendor/YourTheme/Magento_Catalog/view/frontend/templates/product/list.phtml and remove all the form code fall in the if ($_product->isSaleable()): condition.






          share|improve this answer



























            protected by Community Jan 6 '17 at 12:59



            Thank you for your interest in this question.
            Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



            Would you like to answer one of these unanswered questions instead?














            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            5














            In Magento 2 they've hardcoded them into the catalog product list template.



            This can be found around line 80 of app/code/Magento/Catalog/view/frontend/templates/product/list.phtml:



            <?php if ($_product->isSaleable()): ?>
            <?php $postParams = $block->getAddToCartPostParams($_product); ?>
            <form data-role="tocart-form" action="<?php /* @escapeNotVerified */ echo $postParams['action']; ?>" method="post">
            <input type="hidden" name="product" value="<?php /* @escapeNotVerified */ echo $postParams['data']['product']; ?>">
            <input type="hidden" name="<?php /* @escapeNotVerified */ echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php /* @escapeNotVerified */ echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
            <?php echo $block->getBlockHtml('formkey')?>
            <button type="submit"
            title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
            class="action tocart primary">
            <span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
            </button>
            </form>


            A few options exist to suppress them:



            • Create an around plugin for the block and change $_product->isSaleable() to return false for the render of the template, and swap it back afterward

            • Replace this template in your custom theme's layout

            • Hide with CSS

            Honestly hiding via CSS isn't the worst option here:



            .catalog-category-view .action.tocart display: none; 





            share|improve this answer



























            • Hiding via CSS also removed the "Add to Cart" button from product pages. Is there a way to remove it only from Catalog pages?

              – Luis Garcia
              May 4 '16 at 17:38











            • Ah yes. See the update.

              – philwinkle
              May 4 '16 at 22:53











            • Can you elaborate fist option plugin around to chang $_product->isSaleable()

              – siddhesh
              Jul 21 '17 at 14:12











            • Actually I tried to make salable false using catalog_product_is_salable_after event but it gives side effects like it doesn't show product options, it's make product qty 0 and show product as 'out of stock' I would like to do it only for addtocart renderer only.@philwinkle

              – siddhesh
              Jul 21 '17 at 14:22












            • It can be remove using the layout overide the file in the catalog_product_view.xml file in the theme folder. <referenceBlock name="product.info.addtocart.additional" remove="true" />

              – Divya
              Jul 24 at 4:50
















            5














            In Magento 2 they've hardcoded them into the catalog product list template.



            This can be found around line 80 of app/code/Magento/Catalog/view/frontend/templates/product/list.phtml:



            <?php if ($_product->isSaleable()): ?>
            <?php $postParams = $block->getAddToCartPostParams($_product); ?>
            <form data-role="tocart-form" action="<?php /* @escapeNotVerified */ echo $postParams['action']; ?>" method="post">
            <input type="hidden" name="product" value="<?php /* @escapeNotVerified */ echo $postParams['data']['product']; ?>">
            <input type="hidden" name="<?php /* @escapeNotVerified */ echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php /* @escapeNotVerified */ echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
            <?php echo $block->getBlockHtml('formkey')?>
            <button type="submit"
            title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
            class="action tocart primary">
            <span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
            </button>
            </form>


            A few options exist to suppress them:



            • Create an around plugin for the block and change $_product->isSaleable() to return false for the render of the template, and swap it back afterward

            • Replace this template in your custom theme's layout

            • Hide with CSS

            Honestly hiding via CSS isn't the worst option here:



            .catalog-category-view .action.tocart display: none; 





            share|improve this answer



























            • Hiding via CSS also removed the "Add to Cart" button from product pages. Is there a way to remove it only from Catalog pages?

              – Luis Garcia
              May 4 '16 at 17:38











            • Ah yes. See the update.

              – philwinkle
              May 4 '16 at 22:53











            • Can you elaborate fist option plugin around to chang $_product->isSaleable()

              – siddhesh
              Jul 21 '17 at 14:12











            • Actually I tried to make salable false using catalog_product_is_salable_after event but it gives side effects like it doesn't show product options, it's make product qty 0 and show product as 'out of stock' I would like to do it only for addtocart renderer only.@philwinkle

              – siddhesh
              Jul 21 '17 at 14:22












            • It can be remove using the layout overide the file in the catalog_product_view.xml file in the theme folder. <referenceBlock name="product.info.addtocart.additional" remove="true" />

              – Divya
              Jul 24 at 4:50














            5












            5








            5







            In Magento 2 they've hardcoded them into the catalog product list template.



            This can be found around line 80 of app/code/Magento/Catalog/view/frontend/templates/product/list.phtml:



            <?php if ($_product->isSaleable()): ?>
            <?php $postParams = $block->getAddToCartPostParams($_product); ?>
            <form data-role="tocart-form" action="<?php /* @escapeNotVerified */ echo $postParams['action']; ?>" method="post">
            <input type="hidden" name="product" value="<?php /* @escapeNotVerified */ echo $postParams['data']['product']; ?>">
            <input type="hidden" name="<?php /* @escapeNotVerified */ echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php /* @escapeNotVerified */ echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
            <?php echo $block->getBlockHtml('formkey')?>
            <button type="submit"
            title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
            class="action tocart primary">
            <span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
            </button>
            </form>


            A few options exist to suppress them:



            • Create an around plugin for the block and change $_product->isSaleable() to return false for the render of the template, and swap it back afterward

            • Replace this template in your custom theme's layout

            • Hide with CSS

            Honestly hiding via CSS isn't the worst option here:



            .catalog-category-view .action.tocart display: none; 





            share|improve this answer















            In Magento 2 they've hardcoded them into the catalog product list template.



            This can be found around line 80 of app/code/Magento/Catalog/view/frontend/templates/product/list.phtml:



            <?php if ($_product->isSaleable()): ?>
            <?php $postParams = $block->getAddToCartPostParams($_product); ?>
            <form data-role="tocart-form" action="<?php /* @escapeNotVerified */ echo $postParams['action']; ?>" method="post">
            <input type="hidden" name="product" value="<?php /* @escapeNotVerified */ echo $postParams['data']['product']; ?>">
            <input type="hidden" name="<?php /* @escapeNotVerified */ echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php /* @escapeNotVerified */ echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
            <?php echo $block->getBlockHtml('formkey')?>
            <button type="submit"
            title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
            class="action tocart primary">
            <span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
            </button>
            </form>


            A few options exist to suppress them:



            • Create an around plugin for the block and change $_product->isSaleable() to return false for the render of the template, and swap it back afterward

            • Replace this template in your custom theme's layout

            • Hide with CSS

            Honestly hiding via CSS isn't the worst option here:



            .catalog-category-view .action.tocart display: none; 






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited May 4 '16 at 22:54

























            answered May 4 '16 at 0:27









            philwinklephilwinkle

            33.6k5 gold badges83 silver badges145 bronze badges




            33.6k5 gold badges83 silver badges145 bronze badges















            • Hiding via CSS also removed the "Add to Cart" button from product pages. Is there a way to remove it only from Catalog pages?

              – Luis Garcia
              May 4 '16 at 17:38











            • Ah yes. See the update.

              – philwinkle
              May 4 '16 at 22:53











            • Can you elaborate fist option plugin around to chang $_product->isSaleable()

              – siddhesh
              Jul 21 '17 at 14:12











            • Actually I tried to make salable false using catalog_product_is_salable_after event but it gives side effects like it doesn't show product options, it's make product qty 0 and show product as 'out of stock' I would like to do it only for addtocart renderer only.@philwinkle

              – siddhesh
              Jul 21 '17 at 14:22












            • It can be remove using the layout overide the file in the catalog_product_view.xml file in the theme folder. <referenceBlock name="product.info.addtocart.additional" remove="true" />

              – Divya
              Jul 24 at 4:50


















            • Hiding via CSS also removed the "Add to Cart" button from product pages. Is there a way to remove it only from Catalog pages?

              – Luis Garcia
              May 4 '16 at 17:38











            • Ah yes. See the update.

              – philwinkle
              May 4 '16 at 22:53











            • Can you elaborate fist option plugin around to chang $_product->isSaleable()

              – siddhesh
              Jul 21 '17 at 14:12











            • Actually I tried to make salable false using catalog_product_is_salable_after event but it gives side effects like it doesn't show product options, it's make product qty 0 and show product as 'out of stock' I would like to do it only for addtocart renderer only.@philwinkle

              – siddhesh
              Jul 21 '17 at 14:22












            • It can be remove using the layout overide the file in the catalog_product_view.xml file in the theme folder. <referenceBlock name="product.info.addtocart.additional" remove="true" />

              – Divya
              Jul 24 at 4:50

















            Hiding via CSS also removed the "Add to Cart" button from product pages. Is there a way to remove it only from Catalog pages?

            – Luis Garcia
            May 4 '16 at 17:38





            Hiding via CSS also removed the "Add to Cart" button from product pages. Is there a way to remove it only from Catalog pages?

            – Luis Garcia
            May 4 '16 at 17:38













            Ah yes. See the update.

            – philwinkle
            May 4 '16 at 22:53





            Ah yes. See the update.

            – philwinkle
            May 4 '16 at 22:53













            Can you elaborate fist option plugin around to chang $_product->isSaleable()

            – siddhesh
            Jul 21 '17 at 14:12





            Can you elaborate fist option plugin around to chang $_product->isSaleable()

            – siddhesh
            Jul 21 '17 at 14:12













            Actually I tried to make salable false using catalog_product_is_salable_after event but it gives side effects like it doesn't show product options, it's make product qty 0 and show product as 'out of stock' I would like to do it only for addtocart renderer only.@philwinkle

            – siddhesh
            Jul 21 '17 at 14:22






            Actually I tried to make salable false using catalog_product_is_salable_after event but it gives side effects like it doesn't show product options, it's make product qty 0 and show product as 'out of stock' I would like to do it only for addtocart renderer only.@philwinkle

            – siddhesh
            Jul 21 '17 at 14:22














            It can be remove using the layout overide the file in the catalog_product_view.xml file in the theme folder. <referenceBlock name="product.info.addtocart.additional" remove="true" />

            – Divya
            Jul 24 at 4:50






            It can be remove using the layout overide the file in the catalog_product_view.xml file in the theme folder. <referenceBlock name="product.info.addtocart.additional" remove="true" />

            – Divya
            Jul 24 at 4:50














            1














            You can always hide it via CSS but i will highly recommend to copy the app/code/Magento/Catalog/view/frontend/templates/product/list.phtml into YourVendor/YourTheme/Magento_Catalog/view/frontend/templates/product/list.phtml and remove all the form code fall in the if ($_product->isSaleable()): condition.






            share|improve this answer































              1














              You can always hide it via CSS but i will highly recommend to copy the app/code/Magento/Catalog/view/frontend/templates/product/list.phtml into YourVendor/YourTheme/Magento_Catalog/view/frontend/templates/product/list.phtml and remove all the form code fall in the if ($_product->isSaleable()): condition.






              share|improve this answer





























                1












                1








                1







                You can always hide it via CSS but i will highly recommend to copy the app/code/Magento/Catalog/view/frontend/templates/product/list.phtml into YourVendor/YourTheme/Magento_Catalog/view/frontend/templates/product/list.phtml and remove all the form code fall in the if ($_product->isSaleable()): condition.






                share|improve this answer















                You can always hide it via CSS but i will highly recommend to copy the app/code/Magento/Catalog/view/frontend/templates/product/list.phtml into YourVendor/YourTheme/Magento_Catalog/view/frontend/templates/product/list.phtml and remove all the form code fall in the if ($_product->isSaleable()): condition.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jun 6 '17 at 3:32









                sv3n

                10.2k6 gold badges25 silver badges57 bronze badges




                10.2k6 gold badges25 silver badges57 bronze badges










                answered Jun 5 '17 at 20:59









                Zeeshan KhuwajaZeeshan Khuwaja

                5174 silver badges14 bronze badges




                5174 silver badges14 bronze badges


















                    protected by Community Jan 6 '17 at 12:59



                    Thank you for your interest in this question.
                    Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                    Would you like to answer one of these unanswered questions instead?



                    Popular posts from this blog

                    Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

                    Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                    Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form