From 89a85392a90f834f1d73b745a15d5526baae89e2 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 17 Oct 2019 16:39:42 +0200 Subject: [PATCH] Fixes --- doc/user/events/giftcards.rst | 14 ++++++++++++++ doc/user/index.rst | 3 ++- src/pretix/presale/checkoutflow.py | 2 +- src/tests/presale/test_checkout.py | 1 + 4 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 doc/user/events/giftcards.rst diff --git a/doc/user/events/giftcards.rst b/doc/user/events/giftcards.rst new file mode 100644 index 000000000..dcac228c0 --- /dev/null +++ b/doc/user/events/giftcards.rst @@ -0,0 +1,14 @@ +Gift cards +========== + +Gift cards, also known as "gift coupons" or "gift certificates" are a mechanism that allows you to sell tokens that +can later be used to pay for tickets. + +Gift cards are very different feature than **vouchers**. The difference is: + +* Vouchers can be used to give a discount. When a voucher is used, the price of a ticket is reduced by the configured + discount and sold at a lower price. They therefore reduce both revenue as well as taxes. Vouchers (in pretix) are + always specific to a certain product in an order. Vouchers are usually not sold but given out as part of a + marketing campaign or to specific groups of people. + +* Gift cards are not a discount. If you buy a €20 ticket with a €10 gift card, it is still a €20 ticket and diff --git a/doc/user/index.rst b/doc/user/index.rst index ce5467a84..872407b9e 100644 --- a/doc/user/index.rst +++ b/doc/user/index.rst @@ -12,5 +12,6 @@ wanting to use pretix to sell tickets. events/settings events/structureguide events/widget + events/giftcards faq - markdown \ No newline at end of file + markdown diff --git a/src/pretix/presale/checkoutflow.py b/src/pretix/presale/checkoutflow.py index e35295ed7..00e34ab85 100644 --- a/src/pretix/presale/checkoutflow.py +++ b/src/pretix/presale/checkoutflow.py @@ -712,7 +712,7 @@ class ConfirmStep(CartMixin, AsyncAction, TemplateFlowStep): [p.id for p in self.positions], self.cart_session.get('email'), translation.get_language(), self.invoice_address.pk, meta_info, request.sales_channel, self.cart_session.get('gift_cards'), - self.cart_session['shown_total']) + self.cart_session.get('shown_total')) def get_success_message(self, value): create_empty_cart_id(self.request) diff --git a/src/tests/presale/test_checkout.py b/src/tests/presale/test_checkout.py index ac948cd93..7198fc98a 100644 --- a/src/tests/presale/test_checkout.py +++ b/src/tests/presale/test_checkout.py @@ -1379,6 +1379,7 @@ class CheckoutTestCase(BaseCheckoutTestCase, TestCase): cr1.voucher = v cr1.save() + self.client.get('/%s/%s/checkout/confirm/' % (self.orga.slug, self.event.slug), follow=True) response = self.client.post('/%s/%s/checkout/confirm/' % (self.orga.slug, self.event.slug), follow=True) doc = BeautifulSoup(response.rendered_content, "lxml") self.assertEqual(len(doc.select(".thank-you")), 1)