Hiding the add to cart button when a variant is selected

Hi there,

How can I hide the “add to cart” button when a variant is selected?

The two options on my site is “Branded” or “Unbranded”

If the Branded option is selected, I need to hide the add to cart button and the customer should only have the add to quote option so we can quote them on the branding options they choose.

I am not a web developer and I have very basic code skills. I would really appreciate some help with this if there is a way of doing this without coding.

Thanks in advance!!!

Alexis

Hi @norsebranding

Could you share your product page URL to check?

Hi @Dan-From-Ryviu

The URL is https://norsebranding.co.za/collections/ladies-golf-shirts

Please let me know if you need anything else.

Hi @norsebranding

I have no idea how to code to hide the Add to Cart button when Branded is selected, but I have an idea that you can try to make the Branded option out of stock so that your Add to Cart button will be disabled when choosing it. Then, you can add CSS code to hide the disabled Add to Cart button.

@Dan-From-Ryviu Thank you for your help but this didn’t work. It did however grey out the cart button but it changed the button to sold out. Thanks in anyway!

Yes, we can easily add CSS code to hide the grey-out sold-out button.