Shopify themes, liquid, logos, and UX
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
{% comment %}
This is a Shopify Liquid section for displaying alternate color options for a product.
{% endcomment %}
{% schema %}
{
"name": "Product Alternate Colors",
"settings": [],
"blocks": [
{
"type": "product_handle",
"name": "Product Handle",
"settings": [
{
"type": "product",
"id": "product",
"label": "Product"
}
]
}
],
"presets": [
{
"name": "Product Alternative Colors",
"category": "Product"
}
]
}
{% endschema %}
<div class="product-block">
<p style="margin-bottom:10px;"><strong>Also Available In:</strong></p>
<div class="product-alt-colours">
{% for block in section.blocks %}
{% assign product = all_products[block.settings.product] %}
{% if product %}
<a href="{{ product.url }}" title="{{ product.title }}" data-bss-pl="active" data-handle="{{ product.handle }}">
<img
src="{{ product.featured_image | image_url: '90x90' }}"
alt="{{ product.title }}"
width="90"
height="90"
style="margin-left: 5px; border: 1px solid #264a5d;"
>
</a>
{% endif %}
{% endfor %}
</div>
</div>
{% if section.blocks.size == 0 %}
<p>No alternate colors available.</p>
{% endif %}
Above is the custom code for the desired (Also available in: block in the product information section of product template)section and got inspiration from this:- https://thecaistore.com/products/peach-cushy-thong-heels?variant=41027345252434
Can anyone help me? How to Implement this?? I'm using dawn theme.