Skip to content

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

Show size only when product has size field

Artur Smętca4ddc25bf4d
diff --git a/saleor/product/templates/product/details.html b/saleor/product/templates/product/details.html
index d41cc0ef80..bb0a808005 100644
--- a/saleor/product/templates/product/details.html
+++ b/saleor/product/templates/product/details.html
@@ -43,7 +43,9 @@
</p>
<p>
{% for variant in product.variants.all %}
- {{ variant.get_size_display }}
+ {% if variant.size %}
+ {{ variant.get_size_display }}
+ {% endif %}
{% if product.stock == 0 %}
<link itemprop="availability" href="http://schema.org/OutOfStock" /> <span class="label label-danger">{% trans "Out of stock" %}</span>
{% else %}