How to display: none; Spotlight theme variant picker.

I have a variant that is required for third-party app (printify) but it is not needed to be displayed for my store as it’s the only single variant available. How do I update the Spotlight theme to hide a variant with only 1 option? I have seen answers for the Dawn theme but this doesn’t correlate fully with the Spotlight theme.

Thanks in advance

Hello @BlackT

Can you please share the store URL and password so i can check and find the solution for your issue…

@parth_ghelani Thanks.

URL: https://www.blackteesonly.store

all you want is to hide variant selector if there is only single variant or default variant, am i right ?

1 Like

Can you just DM me so we can discuss more about it ?

Hey bro, i got the solution for your issue…

Great. Is it complicated? I can’t see a DM option.

a little bit complicated.
But you only need to follow below steps:

  1. Go to admin > Online Store > Edit code.

  2. In the code directory, find the file named “product-variant-picker.liquid” in snippets.

  3. Copy the below code and replace it with the current code.

{% comment %}
  Renders product variant-picker

  Accepts:
  - product: {Object} product object.
  - block: {Object} passing the block information.
  - product_form_id: {String} Id of the product form to which the variant picker is associated.
  Usage:
  {% render 'product-variant-picker', product: product, block: block, product_form_id: product_form_id %}
{% endcomment %}
{%- unless product.has_only_default_variant -%}
  
{%- endunless -%}
  1. Don’t forget to save the file after changes.

Hope this solution works best for your issue.

Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

Best Regards

Parth ghelani