Disable Add to Cart for Specific Variant

Topic summary

Goal: Prevent customers from buying the wrong product option (variant) on Shopify product pages.

Issue: The default variant auto-selects on page load, leading to mistaken purchases. A placeholder variant (“SELECT YOUR MODEL”) was created and marked not to continue selling when out of stock to disable the Add to Cart (ATC) button, but Shopify then auto-selects the next available variant, defeating the safeguard.

Requests: Either disable ATC until a valid variant is selected, or stop Shopify from auto-switching to the next available variant.

Latest suggestion: Use theme code to disable the ATC button on page load and enable it only when the selected variant meets specific conditions (e.g., availability). No code or theme-specific steps were provided.

Notes: Variant = specific product option; ATC = Add to Cart. Example product link was shared. No images or code snippets included.

Status: Unresolved; needs implementation guidance in the theme to enforce ATC enablement logic.

Summarized with AI on December 16. AI used: gpt-5.

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?variant=44039633961013

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?

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