How to hide variant picker on product with only one variant [Dawn Theme]

Topic summary

A print-on-demand store owner wants to hide the variant picker on products with only one variant while keeping it visible for multi-variant products. This is necessary because deleting variants breaks their supplier’s system integration.

Initial Solution Provided:

  • Add a conditional statement in the theme code: {% if product.variant.size > 1 %} around the variant picker code
  • For Dawn theme (Shopify 2.0), this code should be placed in main-product.liquid rather than older theme files

Complication:
The solution hides all variant pickers when any single option has one variant. For example, a product with one color but multiple sizes would hide both the color AND size selectors.

Remaining Challenge:
The store needs more sophisticated logic to:

  • Hide individual option pickers (like color) only when that specific option has one variant
  • Keep other option pickers (like size) visible when they have multiple variants

The helper suggests this requires custom code tweaking based on the specific theme structure and offers to assist via direct contact, noting that improper code changes could break the site.

Summarized with AI on October 29. AI used: claude-sonnet-4-5-20250929.

Print on demand store here.

Our Products are created through our supplier’s app that makes the products for us.

Some products have multiple variants, some don’t.

In order to get a cleaner look, for the products that have only one variant, we don’t want to have the variant picker.

We can’t just delete the variant so it doesn’t show on product page, because when we do that the supplier receives an order of a product their system doesn’t recognize.

We want to hide the variant picker for those single variant products while we still have the variant picker for products with multiple variants.

Any help is appreciated

Hello @SiteBuilder

Sure for variant picker. find the code in product-form.liquid or product-template.liquid file and add below condition:

{% if product.variant.size > 1 %}
VARIANT PICKER CODE
{% endif %}

Thanks

1 Like

Thanks for your reply but find what code? What am I looking for?

And then what do I need to paste there? “VARIANT PICKER CODE” isn’t a condition so I’m not sure what you mean

Find the variant picker code in your theme and add the condition above the variant picker opening and closing div.

{% if product.variant.size > 1 %} {% endif %}

You only have to add the given if statement.

Thanks

I am using a Shopify 2.0 theme (Dawn 12.0.0)

I do not have a product-form.liquid or product-template.liquid file in my code files

I do have a main-product.liquid, eben a product-variant-picker.liquid and many others.

Which file can it be?

Also, when I am in the file, what do I have to look for? is it variant-selects?

Can you show an example?

Hello @SiteBuilder

Please check

Thanks

This is awesome, thanks a lot, very helpful.

I just have a problem now, when a product has only one color but several sizes (like a piece of clothing), it hides the size selector because the color variant is 1.

We would like to hide the color picker if the color option has only one variant but we would still need to show the size picker so the customer can choose them.

What tweak should we do?

PS: right now, when a product has only one variant it hides the variant picker which is exactly what we want. We just need to make it a little more sophisticated for products with several options

If possible to provide store access so I will make the code changes as per need then please let me know.

store is bylderz.fr

you can let me know here so it helps others, I’ll make changes myself if that’s ok

Hi mate, thanks for the code. How would I apply this if I have both Colour & Size variant options? i.e. I’d like to hide the colour variants only if only 1 colour, or hide the size variants only if only 1 size.

Hello

Thanks for connecting with Shopify Community.

This will need a code tweak. So I worry if you are not technical the site
can break if you edit the code by your own as the code tweak will be based
on the theme used. So if you are interested feel free to send your query on
mail mentioned in below signature.