Need help with variants

Highlighted
New Member
2 0 0

Hey, can you guys help me? So say I added a product that contains 6 colors, whenever I click let's say Black color, it will show the black color, but it will also show every color available underneath it, I want only Black color to appear when clicked, I am using Brooklyn theme, any help would be appreciatedScreenshot_1.png

0 Likes
Shopify Partner
255 48 53

Hello 

{%- assign featured_alt = product.selected_or_first_available_variant.option1 -%}

{%- for image in product.images -%}
{%- if image.alt == featured_alt or image == featured_image -%}
// your code goes here
{%- endif -%}
{%- endfor -%}

Want to modify or custom changes on store hire me.
My Email: guleriathakur43@gmail.com
If helpful then please Like and Accept Solution.
If you happy and want to donate small, click here: Paypal
1 Like
New Member
2 0 0

hey thanks for the help, just where do I paste the code? cheers

0 Likes

Hey @lexistore,

 

Is this something you would like to achieve in your store? Please check below link and let me know your thoughts.

https://perennialsolution.myshopify.com/products/travel-fox-mens-900-nappa-leather-round-toe-lace-up...

Thanks & Regards
Perennial Solution

Would like to add new functionality or customize an existing one, please hire us.
If helpful then please Like and Accept Solution .
Email: infoperennialsolution@gmail.com
Skype: infoperennialsolution
0 Likes