Disable Add to Cart for Specific Variant

Disable Add to Cart for Specific Variant

Topherdk
Visitor
3 0 1

Website: https://mahindradirectparts.com/

 

Issue: People are purchasing the default variant that populates on page load instead of picking the right one, leading to returns and extra work on our end for communication.

 

Attempted Solution: Created a variant called "SELECT YOUR MODEL" that auto-populates the same text a few different places. Example:
https://mahindradirectparts.com/collections/oil-filters/products/mahindra-tractor-engine-oil-filter?...

 

I then tried to uncheck the box for "Continue selling when out of stock" for that specific variant so the Add to Cart button is disabled with that variant, but then upon page reload, Shopify makes the default selected variant the next available. This doesn't solve the problem because then people will still purchase the default (wrong) variant. 

 

Is there a way to disable the Add to Cart Button unless a variant is selected?

or

Stop Shopify from changing to the next available variant?

Reply 1 (1)

Shadab_dev
Shopify Partner
1248 64 131

What you can do is on load disable the add to cart button. Or check like if the variant that's selected is available or some condition that you need to check and enable/disable the atc button.

 

Please reach out via mail for a convenient conversation, better understanding and a reliable solution 

 

Thanks

Buy me Coffee, if you feel i was helpful. Email Me here or WhatsApp me with this link for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.