Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Cleanup order templates
Michal Ociepka6078b62950ac
diff --git a/checkout/steps.py b/checkout/steps.pyindex 72c1c49795..c97faef8ea 100644--- a/checkout/steps.py+++ b/checkout/steps.py@@ -1,7 +1,5 @@-from django.contrib import messagesfrom django.core.exceptions import ValidationErrorfrom django.db import models-from django.shortcuts import redirectfrom order.forms import ManagementForm, DigitalDeliveryForm, DeliveryFormfrom order.models import DigitalDeliveryGroup, ShippedDeliveryGroupfrom saleor.utils import BaseStepdiff --git a/order/templates/order/address.html b/order/templates/order/address.htmldeleted file mode 100644index a61a42e423..0000000000--- a/order/templates/order/address.html+++ /dev/null@@ -1,31 +0,0 @@-{% extends "order/details.html" %}--{% load as_bootstrap from bootstrap %}--{% block forms %}-<form method="post" class="form-horizontal">- {% csrf_token %}- {{ forms.management|as_bootstrap }}- {% if user.is_authenticated %}- <fieldset>- <legend>Select address:</legend>- {{ forms.address_list|as_bootstrap }}- </fieldset>- {% endif %}- <fieldset>- <legend>Complete address:</legend>- {{ forms.address|as_bootstrap }}- </fieldset>- {% block extra_forms %}{% endblock %}-- <div class="form-actions">- <button type="submit" class="btn btn-primary">- Save changes- </button>- <button type="button" class="btn">- Cancel- </button>- </div>-</form>-{% endblock forms %}-diff --git a/order/templates/order/details.html b/order/templates/order/details.htmlindex 56aad25984..364b0f0b18 100644--- a/order/templates/order/details.html+++ b/order/templates/order/details.html@@ -4,7 +4,7 @@{% block content %}<ul class="nav nav-tabs">- {% for stepitem in checkout %}+ {% for stepitem in order %}<li class="{% if stepitem == step %}active{% else %}disabled{% endif %}"><a href="{{ stepitem.get_absolute_url }}"><i class="{% if stepitem %}icon-ok{% else %}icon-remove{% endif %}"></i> {{ stepitem }}</a></li>diff --git a/order/templates/order/digitaldelivery.html b/order/templates/order/payment.htmlsimilarity index 74%rename from order/templates/order/digitaldelivery.htmlrename to order/templates/order/payment.htmlindex 6f56004c75..03a888b6a3 100644--- a/order/templates/order/digitaldelivery.html+++ b/order/templates/order/payment.html@@ -1,18 +1,15 @@{% extends "order/details.html" %}{% load as_bootstrap from bootstrap %}+{% load gross from prices %}{% block forms %}<form method="post" class="form-horizontal">{% csrf_token %}- {{ forms.email|as_bootstrap }}<div class="form-actions"><button type="submit" class="btn btn-primary">Save changes</button>- <button type="button" class="btn">- Cancel- </button></div></form>{% endblock forms %}diff --git a/order/templates/order/shipping.html b/order/templates/order/shipping.htmldeleted file mode 100644index 8c5a4166de..0000000000--- a/order/templates/order/shipping.html+++ /dev/null@@ -1,12 +0,0 @@-{% extends "order/address.html" %}--{% load as_bootstrap from bootstrap %}--{% block extra_forms %}-<fieldset>- <legend>- Delivery method:- </legend>- {{ forms.delivery|as_bootstrap }}-</fieldset>-{% endblock extra_forms %}diff --git a/order/templates/order/summary.html b/order/templates/order/summary.htmldeleted file mode 100644index ef3d5c0a7f..0000000000--- a/order/templates/order/summary.html+++ /dev/null@@ -1,54 +0,0 @@-{% extends "order/details.html" %}--{% load as_bootstrap from bootstrap %}-{% load gross from prices %}--{% block forms %}-<h2>Billing address</h2>-{% with address=order.billing_address %}-<p>- {{ address.first_name }} {{ address.last_name }}- <br />- {{ address.street_address_1 }}{% if address.street_address_2 %}{{ address.street_address_2 }}{% endif %}- <br />- {{ address.postal_code }} {{ address.city }}- <br />- {{ address.country_area }} {{ address.country }}- <br />- {{ address.phone }}-</p>-<table class="table table-bordered">- <thead>- <tr>- <th>Name</th><th>Price per item</th><th>Quantity</th><th>Total</th><th>Delivery price</th>- </tr>- </thead>- <tbody>- {% for group in order.groups.all %}- {% for item in group.items.all %}- <tr>- {% if forloop.first %}- <td>{{ item }}</td><td>{% gross item.get_price_per_item %}</td><td>{{ item.quantity }}</td><td>{% gross item.get_total %}</td><td rowspan="{{ group.items.all|length }}">{% gross group.price %}</td>- {% else %}- <td>{{ item }}</td><td>{% gross item.get_price_per_item %}</td><td>{{ item.quantity }}</td><td>{% gross item.get_total %}</td>- {% endif %}- </tr>- {% endfor %}- {% endfor %}- </tbody>- <tfoot>- <tr>- <td>Total</td><td colspan="4">{% gross order.get_total %}</td>- </tr>- </tfoot>-</table>-{% endwith %}-<form method="post" class="form-horizontal">- {% csrf_token %}- <div class="form-actions">- <button type="submit" class="btn btn-primary">- Save changes- </button>- </div>-</form>-{% endblock forms %}