Horizon theme – Show variant selector even when product has only one variant option

Hi,

I’m using the Horizon theme (latest version). Some of my products are imported via a third-party app (Reputon) and have only one variant option — for example, one colour or one size.

Problem: Horizon hides the variant selector (colour/size buttons) when there is only one option value. The customer cannot see the colour or size on the product page — it only appears in the title.

Goal: Force Horizon to always display the variant selector, even when there is only one option value, for both colour and size variants.

First question: Is there a no-code solution in Horizon settings to always show the variant selector?

If not — code solution:** Which file and which condition should be modified to remove the “hide if single variant” logic in the Horizon theme?

Thanks!
Hervé from Paris

Horizon doesn’t hide it, it just shows plain text. If you want the actual picker (buttons/dropdown), go to Online Store → Theme → Three Dots → Edit Code

Left hand panel, go to Snippets → variant-main-picker.liquid

Replace this entire block of code

{%- if product_option.values.size == 1 and variant_style != 'swatch' -%}
          <div
            class="variant-option"
            data-testid="variant-option-single"
          >
            {{- product_option.name | escape -}}
            <span
              class="variant-option__swatch-value"
              data-testid="variant-option-single-value"
            >
              {{- product_option.selected_value -}}
            </span>
          </div>
        {%- elsif variant_style == 'swatch' or block_settings.variant_style == 'buttons' -%}

With this code

{%- if variant_style == 'swatch' or block_settings.variant_style == 'buttons' -%}

Take note of this code edit for future reference, just in case.

pretty sure horizon has no toggle for this, it just hides any option that only has one value. search the variant picker snippet for values.size == 1, thats the bit hiding your colour/size buttons. duplicate the theme first then take that condition out.

Thanks for your answer. I applied the fix (removed the values.size == 1 block and changed elsif to if), but the colour option with a single value “Noir” still doesn’t appear on the product page. The size selector works fine when there are multiple sizes — so the fix had no visible effect on single-value colour options.

Is there another condition elsewhere in the theme code that hides colour options when there is only one value? Could it be in a different snippet or in variant-picker-styles.liquid?

Not that I’m aware of.. It works fine for me. Make sure the product has an actual variant option in the product editor.

You can test this real quick by creating a test product manually with one option and see if it’s different than your imported products. If yes, then the issue is likely with how the products are imported. If your manual product is not doing what I showed, then you may have a theme conflict somewhere.

May be I am not very clear (French speaker) I have this problem for Size and Colors. For a product with one size and one color, zero variant for the customer.

Hi @lelongdelajambe Welcome To Shopify Community So No no-code toggle for this in Horizon settings. In code, the variant picker snippet checks something like values.size == 1 (or has_only_default_variant) and skips rendering — search your product page snippets for “variant” and find that conditional, then remove/bypass it. Just note this’ll affect all single-variant products theme-wide, so if you only want it for the Reputon-imported ones, scope it with a tag/metafield check instead of removing it globally. Hope this helps, and if it does, don’t forget to like and mark it as the solution. Thank you!

That’s fine, but they need to be actual options that you can see in the product editor in Admin:

One Color, One Size. The need to be present here. Then they should show like this (with the edit of course):

If you go to Products in Admin and go to your product editor, and those variant options are missing, then Shopify will think it’s a product with no options.

It’s ok to do a test product manually. And if you want, please show screenshots.

Je comprends que votre produit n’a qu’une seule couleur (« Noir ») et une seule taille. Le problème n’est pas le nombre de couleurs ou de tailles.

Ce que j’essaie de vérifier, c’est comment ces informations sont enregistrées dans Shopify.

Dans l’interface d’administration Shopify, ouvrez Produits → votre produit. Dans la section des variantes/options, vous devez réellement voir deux options, par exemple :

Couleur: Noir

Taille: M

Même s’il n’y a qu’une seule valeur pour chaque option, « Couleur » et « Taille » doivent exister comme de véritables options du produit dans Shopify.

Si « Noir » et la taille apparaissent seulement dans le titre, la description ou dans des données importées par Reputon, mais pas comme options dans cette section de l’administration Shopify, le thème Horizon ne peut pas les afficher dans le sélecteur de variantes. Pour Horizon, il n’y a alors aucune option à afficher.

C’est pourquoi je vous suggère de créer manuellement un produit de test très simple dans Shopify avec :

Couleur : Noir
Taille : M

Une seule couleur et une seule taille, exactement comme votre produit importé.

Ensuite, regardez ce produit dans Horizon avec la modification de code que vous avez déjà faite. S’il affiche bien « Noir » et « M », mais que le produit importé par Reputon ne les affiche pas, nous saurons que le problème vient de la façon dont Reputon crée le produit, et non du sélecteur de variantes de Horizon.

Si vous le souhaitez, montrez-moi simplement une capture d’écran de la section variantes/options du produit dans l’administration Shopify.

“Hi, here is a screenshot of my product variants section. Reputon imported the color images correctly, but did not create a Color option as a real Shopify variant — only the Size/Taille option exists. When I try to manually add a Color option with my own value (e.g. ‘Noir/couture Rouge’), Shopify forces me to use its color swatch system and won’t let me type a free value. How can I add a custom color option without using Shopify’s swatch metaobject?”

You don’t need to use the metafield. It just connects automatically. Just click the connector and disconnect it.

Or when you are choosing an option, click “custom”

It seems your importer “Reputon” is not functioning correctly for color. How many products are affected?

Also, please create a fresh new test product manually. You need to verify the variant picker in the product page is working correctly for single variant products.

"Thank you very much for your help! The solution worked perfectly — I disconnected the connector and was able to type the color value freely. The product page now shows ‘Couleur/Colour: Noir/couture Rouge’ correctly.

Regarding the display: it shows as static text rather than a clickable button, but that is normal Shopify behavior for a single variant value — impossible to do better even with custom code.

The root cause is confirmed: Reputon does not create variant options when there is only one value (no option in the app settings). So the fix must be done manually product by product. 9 products affected out of 39.

Thanks again!"

Showing a single value as a real button (not static text) is actually doable.

  • Set the variant picker to Buttons: Theme editor, open your product page, click the Variant picker block, set Selector style to Buttons.
  • Keep the single-value edit from earlier in this thread (remove the values.size == 1 block, change elsif to if).

Regards,
Ploqo

Hi Ploqo,

Thank you so much for this brilliant solution! The combination of removing the values.size == 1 block in variant-main-picker.liquid AND switching the Variant Picker to Buttons mode in the theme editor was the missing piece we needed. It works perfectly — single-value options now display as real buttons, giving customers a consistent and clear experience across all product pages.

Really appreciate you taking the time to share this!