Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Links for products from the same collection

Artur Smęte5c5217c96d1
diff --git a/saleor/product/templates/product/details.html b/saleor/product/templates/product/details.html
index 4207bee561..4af335508f 100644
--- a/saleor/product/templates/product/details.html
+++ b/saleor/product/templates/product/details.html
@@ -48,8 +48,10 @@
</p>
<hr>
<h3>{% trans "Available Colors" %}</h3>
- {% for color in product.get_available_colors %}
- <span class="label" style="background-color: #{{ color.color }}">{{ color.name }}</span>
+ {% for collection_product in product.get_products_from_collection %}
+ <a href="{{ collection_product.get_absolute_url }}">
+ <span class="label" style="background-color: #{{ collection_product.color.color }}">{{ collection_product.color.name }}</span>
+ </a>
{% endfor %}
<hr>
<h3>{% trans "Order" %}</h3>