Untitled

mail@pastecode.io avatar
unknown
liquid
a year ago
841 B
2
Indexable
Never
{%- if product.metafields.custom.andre_varianter.value -%}
  <p style="text-transform: uppercase; letter-spacing: 0.3em; font-size: 0.8em;">
    Varianter:
  </p>
  {%- for alt_product in product.metafields.custom.andre_varianter.value -%}
    
    <p style="display: inline-block;padding: 0px 0px;margin: 0 5px;">
      {%- if alt_product.available -%}
        <a 
          href="{{ alt_product.url }}" 
          title="{{ alt_product.title }}"
        >
          <img 
            src="{{ alt_product.featured_image | img_url: '100x100', crop: 'center', format: 'pjpg' }}" 
            alt="{{ alt_product.title }}" 
            loading="lazy" 
            style="border-radius: 50%; {% if alt_product == product %}border: 1px solid black;{% endif %}"
          >
        </a>
      {%- endif -%}
    </p>
  {%- endfor -%}
{%- endif -%}