Skip to content

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

Add layout to thank you page

weronka85c93748aa8b
diff --git a/saleor/order/views.py b/saleor/order/views.py
index c372c8b04b..f8aba5702d 100644
--- a/saleor/order/views.py
+++ b/saleor/order/views.py
@@ -126,5 +126,5 @@ def create_password(request, token):
if not user.email == email:
user.email = email
user.save()
- ctx = {'form': form}
+ ctx = {'form': form, 'email': email}
return TemplateResponse(request, 'order/create_password.html', ctx)
diff --git a/saleor/static/img/pirate-mail.png b/saleor/static/img/pirate-mail.png
new file mode 100644
index 0000000000..3f0dbc94a1
Binary files /dev/null and b/saleor/static/img/pirate-mail.png differ
diff --git a/saleor/static/img/pirate-mail2x.png b/saleor/static/img/pirate-mail2x.png
new file mode 100644
index 0000000000..996963dfa5
Binary files /dev/null and b/saleor/static/img/pirate-mail2x.png differ
diff --git a/saleor/static/scss/demo/components/_buttons.scss b/saleor/static/scss/demo/components/_buttons.scss
index 2581862d70..e8dc329468 100644
--- a/saleor/static/scss/demo/components/_buttons.scss
+++ b/saleor/static/scss/demo/components/_buttons.scss
@@ -26,6 +26,7 @@
padding: $global-padding $global-padding * 2;
font-size: $font-size-h5;
background-color: transparent;
+ color: $body-color;
&:hover {
border-color: $body-color;
color: $body-color;
diff --git a/saleor/static/scss/demo/components/_checkout.scss b/saleor/static/scss/demo/components/_checkout.scss
index fc2c2fe3e9..c2b0cecd99 100644
--- a/saleor/static/scss/demo/components/_checkout.scss
+++ b/saleor/static/scss/demo/components/_checkout.scss
@@ -67,3 +67,69 @@
}
}
}
+
+.thankyoupage {
+ text-align: center;
+ margin-top: $global-margin * 6;
+ span {
+ color: $gray;
+ }
+ &__pirate-mail {
+ position: absolute;
+ left: 0;
+ top: -3rem;
+ @include media-breakpoint-down(sm) {
+ position: relative;
+ top: 1rem;
+ margin-bottom: $global-margin * 2;
+ }
+ }
+ &__form {
+ margin-top: $global-margin * 6;
+ background-color: $light-gray;
+ @include media-breakpoint-down(sm) {
+ margin-top: $global-margin * 3;
+ }
+ .col-md-6 {
+ padding: $global-padding * 4 0 $global-padding * 4 $global-padding * 2;
+ &:last-of-type {
+ padding-right: $global-padding * 2;
+ }
+ @include media-breakpoint-down(sm) {
+ &:first-of-type {
+ padding-bottom: 0;
+ }
+ padding-bottom: $global-padding * 3;
+ padding-top: $global-padding * 3;
+ padding-right: $global-padding * 2;
+ }
+ }
+ form {
+ border-right: 1px solid $gray;
+ padding: 0 $global-padding * 4 0 $global-padding * 2;
+ @include media-breakpoint-down(sm) {
+ border-right: 0;
+ border-bottom: 1px solid $gray;
+ padding-bottom: $global-padding * 3;
+ padding-right: $global-padding * 2;
+ }
+ p {
+ color: $gray;
+ }
+ button {
+ margin-top: $global-margin * 2;
+ }
+ }
+ }
+ &__image {
+ img {
+ margin: $global-margin * 5 0 $global-margin * 2.8;
+ @include media-breakpoint-down(sm) {
+ margin-top: $global-margin * 3;
+ }
+ @include media-breakpoint-down(md) {
+ margin-bottom: $global-margin * 4.3;
+ }
+ }
+ }
+}
diff --git a/templates/order/create_password.html b/templates/order/create_password.html
index 7f5787c2a8..ec65b5b34f 100644
--- a/templates/order/create_password.html
+++ b/templates/order/create_password.html
@@ -7,35 +7,37 @@
{% block title %}{% trans "Create password" %} — {{ block.super }}{% endblock %}
-{% block content %}
-<div class="row login">
- <div class="col-lg-10 offset-lg-1 col-xl-8 offset-xl-2">
- <div class="row">
- <div class="col-md-6">
- <form method="post" action="" novalidate>
- {% csrf_token %}
- <fieldset>
- <h2>{% trans 'Create an account' %}</h2>
+{% block content %}
+ <div class="row thankyoupage">
+ <div class="col-xl-10 offset-xl-1">
+ <img class="thankyoupage__pirate-mail" src="{% static 'img/pirate-mail.png' %}" srcset="{% static 'img/pirate-mail.png' %} 1x, {% static 'img/pirate-mail2x.png' %} 2x">
+ <h1>{% trans "Thank you for your order!" %}</h1>
+ <p>{% trans "We’ve sent a confirmation email with details to" %} <span>{{ email }}</span><br>
+ {% trans "In any problems and questions contact us." %}</p>
+ <div class="row thankyoupage__form">
+ <div class="col-md-6">
+ <form method="post" action="" novalidate>
+ {% csrf_token %}
+ <fieldset>
+ <h3>{% trans 'Create an account' %}</h3>
+ <p>{% trans "Make your shopping experience even better! Save your shipping and payment details for faster checkout" %}</p>
{% bootstrap_form form %}
- </fieldset>
- <div class="row login__btn-group">
- <div class="col-sm-12">
- <button class="btn primary">
- {% trans "Create an account" %}
- </button>
+ </fieldset>
+ <div class="row login__btn-group">
+ <div class="col-sm-12">
+ <button class="btn primary">
+ {% trans "Create an account" %}
+ </button>
+ </div>
</div>
- </div>
- </form>
- </div>
- <div class="col-md-6">
- <div class="login__register-link">
- <h2>{% trans "Continue shopping" %}</h2>
+ </form>
+ </div>
+ <div class="col-md-6 thankyoupage__image">
+ <h3>{% trans "Continue shopping" %}</h3>
<img class="checkout-pirate" src="{% static 'img/pirate_login.png' %}" srcset="{% static 'img/pirate-checkout.png' %} 1x, {% static 'img/pirate-checkout2x.png' %} 2x">
<p><a href="{% url 'checkout:index' %}" class="btn secondary">{% trans "Continue shopping" %}</a></p>
</div>
</div>
</div>
-
</div>
-</div>
{% endblock %}
\ No newline at end of file