0

I need to hide the add to cart button so currently, I have a plugin aroundIsSalable which sets the return to false if you are logged out.

The issue with this is that it also hides the options for a configurable product. How can I get it set saleable to false but also show the configurable options

1
  • If you managed to solve this, can you share the solution ? Commented May 10, 2020 at 12:16

1 Answer 1

0

Don't use Plugin. Override addtocart.phtm template and hide/show button using custom module helper in addtocart.phtml.

catalog_product_view.xml

<referenceBlock name="product.info.addtocart"> <action method="setTemplate"> <argument name="template" xsi:type="string">NAMESAPCE_MODUEL::catalog/product/view/addtocart.phtml</argument> </action> </referenceBlock> 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.