Skip to content

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

Add checkout steps

weronka0bca506d2ef1
diff --git a/saleor/static/img/saleor-logo.svg b/saleor/static/img/saleor-logo.svg
new file mode 100644
index 0000000000..c98bb4de15
--- /dev/null
+++ b/saleor/static/img/saleor-logo.svg
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 282.3 60.9" enable-background="new 0 0 282.3 60.9" xml:space="preserve">
+<path fill="white" id="XMLID_124_" d="M267.7,37.7c6.1-2.8,10-9.2,10-16.7c0-5.7-2-10.1-6.2-14.1c-4.1-4-9.1-5.7-14.9-5.7h-27.2v15.9
+ c-1-2.9-3.5-5.7-6.1-8.2C217,3,209.5,0,200.4,0s-16.5,3-22.9,8.9c-1.2,1.1-2.1,2.3-3.1,3.5V1.2h-43v44h-19v-44h-16v47.2L77.3,1.2
+ H62.6L48.4,35.8c-1.8-4.7-6-8.2-13.2-10.8c-3.7-1.4-8.4-2.8-10.4-3.2c-1-0.3-2-0.6-3-1c-1.8-0.8-2.4-1.7-2.4-3.4
+ c0-2.1,2.3-3.6,6.4-3.6c4.5,0,8,1.5,10.6,4.6l10.6-9C42.3,3.1,35,0,25.3,0c-5.8,0-10.8,1.5-14.9,4.6c-4.1,3.1-6.2,7.4-6.2,13
+ c0,7.9,4.6,13.6,13.6,17c2.8,1,7,2.3,9.3,3c1.2,0.3,2.4,0.8,3.5,1.2c2.3,0.9,3.3,2,3.3,3.6c0,2.8-2.6,4.2-7.9,4.2
+ c-6.2,0-11.6-3-14.7-7.3L0,48c2.3,3.5,5.5,6.4,9.7,8.9c4.3,2.4,9.7,3.6,16.3,3.6c5.3,0,9.7-1.1,13.3-2.7l-0.6,1.4h16.9l3.1-7h22.6
+ l3,7h91.1v-9.9c0,0.9,1.4,1.8,2.3,2.7c6.3,5.9,13.8,8.9,22.9,8.9s16.4-3,22.7-8.9c2.7-2.5,5.1-5.3,6.1-8.2v15.5h16v-18h6.4h0.2
+ l12,18h18.4L267.7,37.7z M62.8,39.2L69.9,21L77,39.2H62.8z M147.4,15.2h24.9c-1.6,3-2.7,5-3.4,8h-21.5V15.2z M147.4,45.2v-9h21.3
+ c0.6,4,1.8,6,3.5,9H147.4z M211.9,41.8c-3.1,3.1-6.9,4.7-11.3,4.7c-4.5,0-8.3-1.5-11.4-4.6c-3.1-3.1-4.6-6.9-4.6-11.4
+ c0-4.4,1.6-8.2,4.7-11.3c3.1-3.2,6.9-4.8,11.3-4.8s8.2,1.6,11.3,4.8c3.2,3.2,4.8,7,4.8,11.3C216.7,34.8,215.1,38.6,211.9,41.8z
+ M254.8,28.2h-9.4v-13h10.7c3.1,0,5.6,2.4,5.6,6.2C261.7,25.8,259.1,28.2,254.8,28.2z"/>
+</svg>
diff --git a/saleor/static/scss/storefront/components/_breadcrumbs.scss b/saleor/static/scss/storefront/components/_breadcrumbs.scss
index 548ae551cc..90cb75e83c 100644
--- a/saleor/static/scss/storefront/components/_breadcrumbs.scss
+++ b/saleor/static/scss/storefront/components/_breadcrumbs.scss
@@ -11,4 +11,29 @@
color: $body-color;
}
}
+ &-checkout {
+ background-color: $gray;
+ margin-bottom: $global-margin * 2;
+ color: $white;
+ li {
+ margin-right: $global-margin;
+ text-transform: uppercase;
+ &.active {
+ font-weight: 900;
+ }
+ &.disabled {
+ color: $light-gray;
+ }
+ &:not(:last-of-type):after {
+ display: none;
+ }
+ a {
+ color: $white;
+ &:hover {
+ text-decoration: none;
+ color: $light-gray;
+ }
+ }
+ }
+ }
}
diff --git a/saleor/static/scss/storefront/components/_checkout.scss b/saleor/static/scss/storefront/components/_checkout.scss
index a18df2997f..d60635b98a 100644
--- a/saleor/static/scss/storefront/components/_checkout.scss
+++ b/saleor/static/scss/storefront/components/_checkout.scss
@@ -2,30 +2,30 @@
margin-bottom: $global-margin * 5;
&__header {
background-color: $gray;
- padding: $global-padding 0;
- margin-bottom: $global-margin * 2;
+ padding: $global-padding * 1.5 0 $global-padding;
+ text-transform: uppercase;
@include media-breakpoint-down(sm) {
- margin-bottom: $global-margin * 2;
& ~ .maincontent {
margin-top: 0;
}
}
img {
- float: left;
- @include media-breakpoint-down(sm) {
- max-height: 22px;
- margin-top: $global-margin / 2;
- }
+ max-width: 8rem;
+ display: inline-block;
+ vertical-align: text-bottom;
}
- h1 {
+ p {
display: inline-block;
- color: $white;
+ color: $light-gray;
margin-left: $global-margin;
+ font-weight: 700;
@include media-breakpoint-down(sm) {
- font-size: $font-size-h2;
margin-top: $global-margin / 2;
}
}
+ a:hover {
+ text-decoration: none;
+ }
}
&__review {
background-color: $light-gray;
@@ -61,6 +61,13 @@
.primary {
margin-top: $global-margin;
}
+ &__edit-link {
+ margin-top: $global-margin / 2;
+ a {
+ color: $dark-gray;
+ text-decoration: underline;
+ }
+ }
&__payment-method-form, form {
label {
margin-bottom: $global-margin / 2;
diff --git a/templates/checkout/details.html b/templates/checkout/details.html
index 8346ceecd9..903111877f 100644
--- a/templates/checkout/details.html
+++ b/templates/checkout/details.html
@@ -10,13 +10,14 @@
<header class="checkout__header">
<div class="container">
<a href="/">
- <img src="{% static "img/testeor-logo-white.svg" %}" alt="Testeor - Saleor demo store">
+ <img src="{% static 'img/saleor-logo.svg' %}">
</a>
- <h1>{% trans "Easy checkout" %}</h1>
+ <p>{% trans "Easy checkout" %}</p>
</div>
</header>
{% endblock %}
+
{% block footer %}
{% endblock %}
diff --git a/templates/checkout/shipping_address.html b/templates/checkout/shipping_address.html
index 55b1f48ce2..6da4bd8c20 100644
--- a/templates/checkout/shipping_address.html
+++ b/templates/checkout/shipping_address.html
@@ -2,6 +2,19 @@
{% load i18n %}
{% load bootstrap_form from bootstrap3 %}
+{% block header %}
+ {{ block.super }}
+ <div class="breadcrumbs-checkout">
+ <div class="container">
+ <ul class="breadcrumbs list-unstyled">
+ <li class="active">1. {% trans "Shipping address" %}</li>
+ <li class="disabled">2. {% trans "Shipping method" %}</li>
+ <li class="disabled">3. {% trans "Billing address" %}</li>
+ </ul>
+ </div>
+ </div>
+{% endblock header %}
+
{% block forms %}
<form method="post" novalidate class="checkout__shipping">
{% csrf_token %}
diff --git a/templates/checkout/shipping_method.html b/templates/checkout/shipping_method.html
index 44349b9bd7..cc5c9e4fe0 100644
--- a/templates/checkout/shipping_method.html
+++ b/templates/checkout/shipping_method.html
@@ -3,9 +3,23 @@
{% load gross from prices_i18n %}
{% load bootstrap_form from bootstrap3 %}
+{% block header %}
+ {{ block.super }}
+ <div class="breadcrumbs-checkout">
+ <div class="container">
+ <ul class="breadcrumbs list-unstyled">
+ <li><a href="{% url 'checkout:shipping-address' %}">1. {% trans "Shipping address" %}</a></li>
+ <li class="active">2. {% trans "Shipping method" %}</li>
+ <li class="disabled">3. {% trans "Billing address" %}</li>
+ </ul>
+ </div>
+ </div>
+{% endblock header %}
+
{% block forms %}
<h1>{% trans "Shipping address" %}</h1>
{% include "userprofile/snippets/address-short.html" with address=checkout.shipping_address only %}
+ <p class="checkout__edit-link"><a href="{% url 'checkout:shipping-address' %}">{% trans "Select other address" %}</a></p>
<form method="post" class="checkout__shipping-method" novalidate>
{% csrf_token %}
<h1>{% trans "Shipping method" %}</h1>
diff --git a/templates/checkout/summary.html b/templates/checkout/summary.html
index 256b2cc184..2010997688 100644
--- a/templates/checkout/summary.html
+++ b/templates/checkout/summary.html
@@ -1,6 +1,19 @@
{% extends "checkout/details.html" %}
{% load i18n %}
+{% block header %}
+ {{ block.super }}
+ <div class="breadcrumbs-checkout">
+ <div class="container">
+ <ul class="breadcrumbs list-unstyled">
+ <li><a href="{% url 'checkout:shipping-address' %}">1. {% trans "Shipping address" %}</a></li>
+ <li><a href="{% url 'checkout:shipping-method' %}">2. {% trans "Shipping method" %}</a></li>
+ <li class="active">3. {% trans "Billing address" %}</li>
+ </ul>
+ </div>
+ </div>
+{% endblock header %}
+
{% block forms %}
<form method="post" novalidate>
{% csrf_token %}