{% if option.name == "Color" and product.metafields.custom.color_products %}
{%- assign _product_ajax_linked_products = product.metafields.custom.color_products.value -%}
{%- for _product_ajax_linked_product in _product_ajax_linked_products -%}
{% assign linkitem = _product_ajax_linked_product %}
{% if linkitem.handle != product.handle and linkitem.available %}
{%- for linkoption in linkitem.options_with_values -%}
{% if linkoption.name == "Color" %}
{%- for linkvalue in linkoption.values -%}
<input
type="radio"
>
<label onclick="location.href = '{{ linkitem.handle }}';" for="{{ input_id }}">
{{ linkvalue -}}
{{ label_unavailable }}
</label>
{%- endfor -%}
{% endif %}
{%- endfor -%}
{% endif %}
{%- endfor -%}
{% endif %}
Shopify, Shopify Apps, Magento, WordPress, Codeigniter, Joomla, Big Commerce | PHP
Friday, 2 May 2025
Show other color's from metafiel with separate products in Shopify liquid code
Subscribe to:
Posts (Atom)