{% load i18n %} {% load thumbnail %} {% load currency_filters %} {% load purchase_info_tags %} {% load widget_tweaks %}
{% if basket_warnings %}
{% trans "Important messages about items in your basket" %}
{% for warning in basket_warnings %}
{{ warning }}
{% endfor %} {% endif %} {% if upsell_messages %}
{% for upsell in upsell_messages %} {% with message=upsell.message url=upsell.offer.get_absolute_url offer_name=upsell.offer.name %} {% comment %}
{{ message }} to qualify for the {{ offer_name }} special offer
{% endcomment %}
{{ message }}
{% endwith %} {% endfor %}
{% endif %}

{% trans "Basket" %}

{% if not basket.is_empty %}
{% block basket_form_headers %}

{% trans "What's in your bag" %}

{% trans "Quantity" %}

{% trans "Price" %}

{% trans "Total" %}

{% endblock %} {% block basket_form_main %}
{% csrf_token %} {{ formset.management_form }} {% for form in formset %} {% with line=form.instance product=form.instance.product %} {% purchase_info_for_line request line as session %}
{{ form.id }} {% with image=product.primary_image %} {% thumbnail image.original "200x200" upscale=False as thumb %} {% if product.get_product_class.front_end_view %} {{ product.get_title }} {% else %} {{ product.get_title }} {% endif %} {% endthumbnail %} {% endwith %}

{% if product.get_product_class.front_end_view %} {{ line.product.get_title }} {% else %} {{ line.product.get_title }} {% endif %}

{% if product.subscription %} {% endif %} {% if product.get_product_class.name == 'Rewards' %} {% endif %}
{% comment %} {{ session.availability.message }} {% endcomment %} {% for attribute in line.attributes.all %} {% if attribute.option.code == 'subscription-interval' %} {% if product.subscription == True %} {{ attribute.option.name }}: Every {{ attribute.value }} days {% endif %} {% elif attribute.option.code == 'surprise' %} {% if product.subscription == True %} {{ attribute.option.name }}: {% if attribute.value %}Yes{% else %}No{% endif %} {% endif %} {% else %} {{ attribute.option.name }}: {{ attribute.value }} {% endif %} {% endfor %} {% for item in line.product.attribute_values.all %} {% if item.attribute.use_for_variations %} {{ item.attribute }}: {{ item.value }} {% endif %} {% endfor %}
{% render_field form.quantity class+="input-quantity" %}
{% trans "Remove" %}
{{ form.save_for_later }} {{ form.DELETE }}
{% for field_errors in form.errors.values %} {% for error in field_errors %} {{ error }} {% endfor %} {% endfor %}
{% if not line.unit_price_incl_tax and not line.unit_tax_excl_tax %}

{% else %}

{% if line.is_tax_known %} {{ line.unit_price_incl_tax|currency:line.price_currency }} {% else %} {{ line.unit_price_excl_tax|currency:line.price_currency }} {% endif %}

{% endif %}
{% if not line.line_price_incl_tax and not line_price_excl_tax %}

{% else %}

{% if line.is_tax_known %} {{ line.line_price_incl_tax|currency:line.price_currency }} {% else %} {{ line.line_price_excl_tax|currency:line.price_currency }} {% endif %}

{% endif %}

{% endwith %} {% endfor %}
{% endblock %}
{% block vouchers %} {# Hide the entire section if a custom BasketView doesn't pass in a voucher form #} {% if voucher_form %}

{% trans "Voucher/promo code" %}

Gift Card

{% csrf_token %} {% include "partials/form_fields.html" with form=gift_card_form %} {% trans "or" %} {% trans "cancel" %}
{% endif %} {% endblock vouchers %}
{% block baskettotals %}

{% trans "Total" %}

{% include 'basket/partials/basket_totals.html' with editable=1 %} {% endblock baskettotals %} {% block formactions %} {% endblock formactions %}
{% else %} {% block emptybasket %} {% if user.is_authenticated %}

{% trans "Your basket is empty." %} {% trans "Continue shopping" %}

{% else %}

{% trans "Please login to view your basket - " %} {% trans "Login Here" %}

{% endif %} {% endblock %} {% endif %} {% block savedbasket %} {% if user.is_authenticated and saved_formset %}

{% trans "Wishlist" %}

{% csrf_token %} {{ saved_formset.management_form }} {% for form in saved_formset %} {% purchase_info_for_product request form.instance.product as session %}
{{ form.id }} {% with image=form.instance.product.primary_image %} {% thumbnail image.original "100x100" upscale=False as thumb %} {{ form.instance.product.get_title }} {% endthumbnail %} {% endwith %}

{{ form.instance.description }}

{{ session.availability.message }}

{% trans "Remove" %}
{{ form.move_to_basket }} {{ form.DELETE }}
{% purchase_info_for_product request form.instance.product as saved %}

{% if saved.price.is_tax_known %} {{ saved.price.incl_tax|currency:saved.price.currency }} {% else %} {{ saved.price.excl_tax|currency:saved.price.currency }} {% endif %}

{% endfor %}
{% endif %} {% endblock %}