I am doing a custom module and now I want to hide the 'add to cart' button for certain products.
I have followed the
https://magenticians.com/magento-2-disable-add-to-cart-button/ documentation and i was able to hide it from the product's detail page but not from the home/category page. I need this button hidden from all the views.
I have added the
addtocart.phtml file to
app/code/Magenticians/Mymodule/view/frontend/templates/catalog/product/view path and also the corresponding layout file as the document link said.
It is working in detail page of the product only. I want it on all pages.
Thanks in advance!