How to Hide a Product Variant with a Single Option on Sense Theme

Topic summary

Goal: hide one product variant (with a single option) in the Sense theme without deleting it, as it’s required for fulfillment.

Proposed approach: add a conditional in the theme code to control rendering based on option count.

  • Check the number of option values for a variant.
  • If option.values.size == 1 → do not render that variant.
  • Else → render the default code.

Technical note: the suggestion uses a Liquid if-condition (Shopify templating) to skip output when a variant has only one option.

Latest update: the requester asked where to find/edit this code in the theme, but location details were not provided.

Status: unresolved/ongoing.

  • Action item pending: identify the correct theme file/section to apply the conditional.
  • Key question unanswered: where in the Sense theme should this Liquid conditional be implemented.

Artifacts: a small code snippet is central to the suggested fix (Liquid if-condition on option.values.size).

Summarized with AI on January 24. AI used: gpt-5.

Hello, I’m using the Sense theme. I need to hide one of the variants (which has a single option) of the product from the store. I just need to hide it, I cannot remove it because it is needed at the backend with the fulfiller.

Thank you for your help!

Hello @hassanshahid ,

You have to make it conditional.
First check how many options a variant have.
Once get the result then use it within the if condition e.g.

{% if option.values.size == 1%}
// do nothing 
{% else %}
// default code
{% endif %}

Thanks

Where can I find/edit this code?

Thank you for your answer!