Is there a way built into Magento 2 to add CSS specific to a product?
Or is there a way to turn off a specific element on a product page? (i.e. the 'Add to Cart' button for a product that is only sold in store)
Solved! Go to Solution.
Yes & Yes.
You can't really add a specific CSS for a particular product but Magento does allow you to apply a different design for different products, CMS blocks and pages. To apply a unique design to a particular product, do the following:
<!--Remove Add to cart FOR SIMPLE PRODUCT--> <referenceBlock name="product.info.addtocart" remove="true" />
Please accept my answer as a solution if I was able to help.
Sure, here you go but mind it that it will also remove the configurable options:
<!--Removed Add to cart for Configurable products--> <referenceBlock name="product.info.addtocart.additional" remove="true" />