{% extends CMS_TEMPLATE %} {% load i18n cms_tags pcart_core sekizai_tags %} {% block base_content %}
{% csrf_token %}
{% include "customers/includes/profile_menu.html" %}

{% trans "Comparison" %}

{% if comparisons %} {% save comparisons|length as comparisons_length %} {% for item in comparisons %} {% endfor %} {% for product_type in product_types %} {% for prop in product_type.properties.all %} {% create_list as prop_line %} {% for item in comparisons %} {% if item.product.product_type == product_type %} {% if item.variant %} {% with value=item.variant.properties|get_element:prop.title %} {% save prop_line|append_to_list:value as prop_line %} {% endwith %} {% else %} {% with value=item.product.properties|get_element:prop.title %} {% save prop_line|append_to_list:value as prop_line %} {% endwith %} {% endif %} {% else %} {% endif %} {% endfor %} {% if prop_line|to_set|length > 1 %} {% addtoblock "js" %} {% endaddtoblock %} {% endif %} {% endfor %} {% endfor %}
{% if item.variant %}

{{item.variant.title}}

{% else %}

{{item.product.title}}

{% endif %}
{{product_type}}
{{prop}}{{value|ignore_none}}{{value|ignore_none}}
{% else %}
{% trans "The comparison list is empty." %}
{% endif %}
{% endblock %}