when you browse through a category


you can see several products.

I want to remove the add to cart button from these. You should only be able to put them into the cart when you are on the detailed page of the product.

Edit: here you can see a picture

I am not able to find the right template. Do you know how I can do this?


Edit: Anyone knows how to remove the hover effect when you hover over a product?

2 Answers 2


I have looked into this using a Magento version 2.2.4

For me, the add to cart button dissapears after commenting some html in the template below: app/design/frontend/<your_theme_namespace>/<your_theme_name>/Magento_Catalog/templates/product/list.phtml line 78

you may comment the html starting with <div class="actions-primary" (line 78 until line 104 (line closing this div)


Add this code in below layout file :


<referenceBlock name="product.info.addtocart" remove="true" />

It may be useful for you.

  • How to remove it in product detail page? Commented Jul 29, 2019 at 6:02
  • @jafarpinjar for simple products you need to do <referenceBlock name="product.info.addtocart" remove="true" /> and for configurable you need to do <referenceBlock name="product.info.options.wrapper.bottom" remove="true" />
    – Abbas
    Commented Nov 5, 2019 at 9:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.