Hello i am using a shopify store with theme kalles v.3
i want to add product variants down of the product image on the collection page
my current code is this:
{%- comment %}{%- if product.available == false and product.price == 0 %}{% continue %}{% endif -%}{% endcomment -%}
{%- liquid
assign pr_id = product.id
assign pr_options = product.options_with_values
assign color_count = 0
if pr_options.size > 0 and show_color
assign color_ck = settings.color_ck | append:‘,color,colors,couleur,colour’
assign get_color = color_ck | downcase | replace: ’ ,', ‘,’ | replace: ‘, ‘, ‘,’ | split: ‘,’ | uniq
for option in pr_options
assign name = option.name | downcase
if get_color contains name
assign color_count = option.values.size
if show_cl_type == ‘2’
assign pr_option = forloop.index
assign nt_option = ‘option’| append:pr_option
assign color_variants = product.variants | where: “available” | map:nt_option | uniq
assign color_count = color_variants.size
endif
break
endif
endfor
endif
assign countdown = time_meta| default:product.metafields.meta.countdown
assign images_0 = product.images[0] | default:settings.placeholder_img -%}
{%- if settings.within_cat and collection -%}
{%- assign pr_url = product.url | within:collection -%}
{%- else -%}
{%- assign pr_url = product.url -%}
{%- endif -%}
{%- assign pr_url_js = pr_url |split:’?’ | first -%}
{{product.title}}
{%- render 'product_price',product:product,inc_price:inc_price -%} {%- if use_rating -%}{%- render 'rating',product:product,inc_rating:inc_rating -%}{%- endif -%} {%- if color_count > 0 -%} {%- endif -%}any help? thanks