rename cash payment method to 'in person' - it could also be called izettle, but lets keep the brandname out of it :) Orders with payment method IN_PERSON can be paid at the infodesk with izettle. While here update some text on the checkout page and update icons to FA
This commit is contained in:
parent
c6cb90e567
commit
7f05372bb9
28
src/shop/migrations/0063_auto_20200812_1732.py
Normal file
28
src/shop/migrations/0063_auto_20200812_1732.py
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
# Generated by Django 3.1 on 2020-08-12 15:32
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("shop", "0062_auto_20200811_1015"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="order",
|
||||||
|
name="payment_method",
|
||||||
|
field=models.CharField(
|
||||||
|
blank=True,
|
||||||
|
choices=[
|
||||||
|
("credit_card", "Credit card"),
|
||||||
|
("blockchain", "Blockchain"),
|
||||||
|
("bank_transfer", "Bank transfer"),
|
||||||
|
("in_person", "In Person"),
|
||||||
|
],
|
||||||
|
default="",
|
||||||
|
max_length=50,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
|
@ -87,15 +87,15 @@ class Order(CreatedUpdatedModel):
|
||||||
CREDIT_CARD = "credit_card"
|
CREDIT_CARD = "credit_card"
|
||||||
BLOCKCHAIN = "blockchain"
|
BLOCKCHAIN = "blockchain"
|
||||||
BANK_TRANSFER = "bank_transfer"
|
BANK_TRANSFER = "bank_transfer"
|
||||||
CASH = "cash"
|
IN_PERSON = "in_person"
|
||||||
|
|
||||||
PAYMENT_METHODS = [CREDIT_CARD, BLOCKCHAIN, BANK_TRANSFER, CASH]
|
PAYMENT_METHODS = [CREDIT_CARD, BLOCKCHAIN, BANK_TRANSFER, IN_PERSON]
|
||||||
|
|
||||||
PAYMENT_METHOD_CHOICES = [
|
PAYMENT_METHOD_CHOICES = [
|
||||||
(CREDIT_CARD, "Credit card"),
|
(CREDIT_CARD, "Credit card"),
|
||||||
(BLOCKCHAIN, "Blockchain"),
|
(BLOCKCHAIN, "Blockchain"),
|
||||||
(BANK_TRANSFER, "Bank transfer"),
|
(BANK_TRANSFER, "Bank transfer"),
|
||||||
(CASH, "Cash"),
|
(IN_PERSON, "In Person"),
|
||||||
]
|
]
|
||||||
|
|
||||||
payment_method = models.CharField(
|
payment_method = models.CharField(
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
{% extends 'shop_base.html' %}
|
|
||||||
|
|
||||||
{% load bootstrap3 %}
|
|
||||||
|
|
||||||
{% block title %}
|
|
||||||
Checkout | {{ block.super }}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block shop_content %}
|
|
||||||
|
|
||||||
<form method="POST">
|
|
||||||
{% csrf_token %}
|
|
||||||
{% bootstrap_button "Pay with credit card" name="credit_card" button_type="submit" button_class="btn-primary" %}
|
|
||||||
{% bootstrap_button "Pay with blockchain" name="blockchain" button_type="submit" button_class="btn-primary" %}
|
|
||||||
{% bootstrap_button "Pay with bank transfer" name="bank_transfer" button_type="submit" button_class="btn-primary" %}
|
|
||||||
</form>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
|
@ -3,13 +3,13 @@
|
||||||
{% load shop_tags %}
|
{% load shop_tags %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
Pay by Cash | {{ block.super }}
|
Pay In Person | {{ block.super }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block shop_content %}
|
{% block shop_content %}
|
||||||
|
|
||||||
<h2>Pay by Cash</h2>
|
<h2>Pay In Person</h2>
|
||||||
<p>To pay order #{{ order.id }} you need to <strong>locate an organiser</strong> (in person) and make the cash payment of <b>{{ order.total|currency }}</b>. You need to bring the <strong>order id #{{ order.id }}</strong> as well so we can mark your order as paid.</p>
|
<p>To pay order #{{ order.id }} you need to <strong>locate an organiser</strong> (in person) and make the payment of <b>{{ order.total|currency }}</b> with cash, card or mobilepay. You need to bring the <strong>order id #{{ order.id }}</strong> as well so we can mark your order as paid.</p>
|
||||||
|
|
||||||
<p>If physically finding an organiser is inconvenient for you (during events you can find us at the Infodesk, but between events geography can make things difficult) you should <a href="{% url 'shop:order_detail' pk=order.id %}">go back</a> and pick a different payment method.</p>
|
<p>If physically finding an organiser is inconvenient for you (during events you can find us at the Infodesk, but between events geography can make things difficult) you should <a href="{% url 'shop:order_detail' pk=order.id %}">go back</a> and pick a different payment method.</p>
|
||||||
<p>When your order has been marked as paid you will receive an invoice by email.</p>
|
<p>When your order has been marked as paid you will receive an invoice by email.</p>
|
|
@ -110,35 +110,35 @@ Details for Order #{{ order.id }} | {{ block.super }}
|
||||||
<p>
|
<p>
|
||||||
<input type="checkbox" name="accept_terms" />
|
<input type="checkbox" name="accept_terms" />
|
||||||
I accept the <a href="{% url 'general-terms' %}">general terms & conditions</a>.
|
I accept the <a href="{% url 'general-terms' %}">general terms & conditions</a>.
|
||||||
Finally I accept to adhere to our <a href="{% url 'conduct' %}">Code of Conduct</a>
|
I also accept to adhere to the <a href="{% url 'conduct' %}">Code of Conduct</a>
|
||||||
during events as well as in BornHack online channels.
|
during events as well as in BornHacks online channels.
|
||||||
</p>
|
</p>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<strong>Choose a payment option:</strong>
|
<strong>Please choose a payment option:</strong>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="btn-group btn-group-justified">
|
<div class="btn-group btn-group-justified">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
{% bootstrap_button "<i class='glyphicon glyphicon-bitcoin'></i> Blockchain" button_type="submit" button_class="btn-primary" name="payment_method" value="blockchain" %}
|
{% bootstrap_button "<i class='fab fa-bitcoin'></i> Blockchain" button_type="submit" button_class="btn-primary" name="payment_method" value="blockchain" %}
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
{% bootstrap_button "<i class='glyphicon glyphicon-piggy-bank'></i> Bank transfer" button_type="submit" button_class="btn-primary" name="payment_method" value="bank_transfer" %}
|
{% bootstrap_button "<i class='fas fa-piggy-bank'></i> Bank transfer" button_type="submit" button_class="btn-primary" name="payment_method" value="bank_transfer" %}
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
{% bootstrap_button "<i class='glyphicon glyphicon-menu-hamburger'></i> Cash" button_type="submit" button_class="btn-primary" name="payment_method" value="cash" %}
|
{% bootstrap_button "<i class='fas fa-coins'></i> In person" button_type="submit" button_class="btn-primary" name="payment_method" value="in_person" %}
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
{% bootstrap_button "<i class='glyphicon glyphicon-credit-card'></i> Credit card*" button_type="submit" button_class="btn-primary" name="payment_method" value="credit_card" %}
|
{% bootstrap_button "<i class='fas fa-credit-card'></i> Credit card" button_type="submit" button_class="btn-primary" name="payment_method" value="credit_card" %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div class="alert alert-info" style="margin-top: 5px; margin-bottom: -10px;">* Please consider the alternatives before choosing credit card. Credit cards are expensive and difficult for us to handle. Thank you!</div>
|
<div class="alert alert-info" style="margin-top: 5px; margin-bottom: -10px;">* If you have a Danish bank account then please choose bank transfer, is is the cheapest way for us. If you do not have a Danish bank account then credit card or blockchain payment is the best way.</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-footer">
|
<div class="panel-footer">
|
||||||
<i>Bank transfers take up to a week to get registered, but the other
|
<i>Bank transfers can take up to a week to get registered, but the other
|
||||||
payment methods should be more or less instant. Please
|
payment methods should be more or less instant. Please
|
||||||
<a href="{% url 'contact' %}">contact us</a> if your have questions.</i>
|
<a href="{% url 'contact' %}">contact us</a> if your have questions.</i>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,7 +2,6 @@ from django.urls import include, path
|
||||||
|
|
||||||
from .views import (
|
from .views import (
|
||||||
BankTransferView,
|
BankTransferView,
|
||||||
CashView,
|
|
||||||
CoinifyCallbackView,
|
CoinifyCallbackView,
|
||||||
CoinifyRedirectView,
|
CoinifyRedirectView,
|
||||||
CoinifyThanksView,
|
CoinifyThanksView,
|
||||||
|
@ -16,6 +15,7 @@ from .views import (
|
||||||
OrderListView,
|
OrderListView,
|
||||||
OrderMarkAsPaidView,
|
OrderMarkAsPaidView,
|
||||||
OrderReviewAndPayView,
|
OrderReviewAndPayView,
|
||||||
|
PayInPersonView,
|
||||||
ProductDetailView,
|
ProductDetailView,
|
||||||
ShopIndexView,
|
ShopIndexView,
|
||||||
)
|
)
|
||||||
|
@ -73,7 +73,7 @@ urlpatterns = [
|
||||||
BankTransferView.as_view(),
|
BankTransferView.as_view(),
|
||||||
name="bank_transfer",
|
name="bank_transfer",
|
||||||
),
|
),
|
||||||
path("pay/cash/", CashView.as_view(), name="cash"),
|
path("pay/in_person/", PayInPersonView.as_view(), name="in_person"),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -385,7 +385,9 @@ class OrderReviewAndPayView(
|
||||||
Order.BANK_TRANSFER: reverse_lazy(
|
Order.BANK_TRANSFER: reverse_lazy(
|
||||||
"shop:bank_transfer", kwargs={"pk": order.id}
|
"shop:bank_transfer", kwargs={"pk": order.id}
|
||||||
),
|
),
|
||||||
Order.CASH: reverse_lazy("shop:cash", kwargs={"pk": order.id}),
|
Order.IN_PERSON: reverse_lazy(
|
||||||
|
"shop:in_person", kwargs={"pk": order.id}
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
return HttpResponseRedirect(reverses[payment_method])
|
return HttpResponseRedirect(reverses[payment_method])
|
||||||
|
@ -570,10 +572,10 @@ class BankTransferView(
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
# Cash payment view
|
# In-person (izettle) payment view
|
||||||
|
|
||||||
|
|
||||||
class CashView(
|
class PayInPersonView(
|
||||||
LoginRequiredMixin,
|
LoginRequiredMixin,
|
||||||
EnsureUserOwnsOrderMixin,
|
EnsureUserOwnsOrderMixin,
|
||||||
EnsureUnpaidOrderMixin,
|
EnsureUnpaidOrderMixin,
|
||||||
|
@ -581,7 +583,7 @@ class CashView(
|
||||||
DetailView,
|
DetailView,
|
||||||
):
|
):
|
||||||
model = Order
|
model = Order
|
||||||
template_name = "cash.html"
|
template_name = "in_person.html"
|
||||||
|
|
||||||
|
|
||||||
# Coinify views
|
# Coinify views
|
||||||
|
|
Loading…
Reference in a new issue