Hi,
I’m using impulse theme, I wanted to use variants image as swatches. I want variant images to automatically come instead of colors.
Thank you in advance.
Hi,
I’m using impulse theme, I wanted to use variants image as swatches. I want variant images to automatically come instead of colors.
Thank you in advance.
You can refer to the following URL.
Hope this helps.
Thanks!
Thank you for your response.
But this is not what I’m looking for it’s the manual way. I want the complete variant image as a swatch image.
Here is my variant-button.liquid code.
{%- assign swatch_file_extension = ‘png’ -%}
{%- assign is_color = false -%}
{%- assign color_swatch_drop = option_drop -%}
{%- assign color_option_index = 0 -%}
{%- if settings.product_color_swatches -%}
{%- for option in product.options_with_values -%}
{%- if option == color_swatch_drop -%}
{%- assign color_option_index = forloop.index0 -%}
{%- assign downcased_option = color_swatch_drop.name | downcase -%}
{%- if downcased_option contains ‘color’ or downcased_option contains ‘colour’ -%}
{%- assign is_color = true -%}
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
Did you ever find a solution for this?
@kristen9145 For any “Color” or “Colour” option make swatch image files that match the variant option name
https://archetypethemes.co/blogs/impulse/how-do-i-set-up-color-swatches
It would be an advanced customization to do it automatically using the variant images you’ve already added to the product admin and to do with any option name besides “Color” or “Colour”.
Contact me if you need this advanced customization work, provide topic url and store url to paull.newton+shopifyforums@gmail.com