Date: Sun, 1 Oct 2017 20:01:15 +1100
Subject: [PATCH 36/40] Draw more attention to the need to select complimentary
items
A big complaint from 2017 was that people overlooked things like
shirts and dinner tickets as those are complimentary, so they assumed
they didn't need to choose them.
This change adds some labels and some explanatory text to try to make
this more clear.
---
pinaxcon/templates/registrasion/discount_list.html | 10 +++++++---
pinaxcon/templates/registrasion/review.html | 6 +++---
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/pinaxcon/templates/registrasion/discount_list.html b/pinaxcon/templates/registrasion/discount_list.html
index 8fafb241..00db6b2c 100644
--- a/pinaxcon/templates/registrasion/discount_list.html
+++ b/pinaxcon/templates/registrasion/discount_list.html
@@ -1,5 +1,6 @@
{% if discounts %}
-Discounts and Complimentary Items
+
+
Discounts and Complimentary Items
{% regroup discounts by discount.description as discounts_grouped %}
@@ -11,9 +12,12 @@
{% endfor %}
{% endfor %}
-
Any applicable discounts will be applied automatically when you check out.
+
+ Note that you must choose your items below, even if they are complimentary.
+ Any applicable discounts will be applied automatically when you check out.
+
-
+
{% endif %}
diff --git a/pinaxcon/templates/registrasion/review.html b/pinaxcon/templates/registrasion/review.html
index 9a9ef144..376a73ea 100644
--- a/pinaxcon/templates/registrasion/review.html
+++ b/pinaxcon/templates/registrasion/review.html
@@ -33,8 +33,8 @@
{% missing_categories as missing %}
{% if missing %}
-
-
+
+
You have not selected anything from the following
categories. If your ticket includes any of these, you still need to
make a selection:
@@ -42,7 +42,7 @@
{% include "registrasion/_category_list.html" with categories=missing %}
-
+
{% endif %}
From 362ed28be2b7169dac61384127b193d838e70e78 Mon Sep 17 00:00:00 2001
From: James Polley
Date: Sun, 1 Oct 2017 22:54:04 +1100
Subject: [PATCH 37/40] Alter guided_registrasion logic to handle new page
This is required for the new method of accepting terms and conditions
---
vendor/registrasion/registrasion/forms.py | 6 ++++-
vendor/registrasion/registrasion/views.py | 32 +++++++++++++++++------
2 files changed, 29 insertions(+), 9 deletions(-)
diff --git a/vendor/registrasion/registrasion/forms.py b/vendor/registrasion/registrasion/forms.py
index 879d6d5c..32575080 100644
--- a/vendor/registrasion/registrasion/forms.py
+++ b/vendor/registrasion/registrasion/forms.py
@@ -262,8 +262,12 @@ class _CheckboxProductsForm(_ProductsForm):
@classmethod
def set_fields(cls, category, products):
for product in products:
+ if product.price:
+ label='%s -- $%s' % (product.name, product.price)
+ else:
+ label='%s' % (product.name)
field = forms.BooleanField(
- label='%s -- $%s' % (product.name, product.price),
+ label=label,
required=False,
)
cls.base_fields[cls.field_name(product)] = field
diff --git a/vendor/registrasion/registrasion/views.py b/vendor/registrasion/registrasion/views.py
index 4d6a078f..2f72034b 100644
--- a/vendor/registrasion/registrasion/views.py
+++ b/vendor/registrasion/registrasion/views.py
@@ -1,6 +1,9 @@
import datetime
import zipfile
import os
+import logging
+
+from django.contrib import messages
from . import forms
from . import util
@@ -43,7 +46,6 @@ from registrasion.contrib.badger import (
InvalidTicketChoiceError
)
-
_GuidedRegistrationSection = namedtuple(
"GuidedRegistrationSection",
(
@@ -107,9 +109,10 @@ def guided_registration(request, page_number=None):
PAGE_PROFILE = 1
PAGE_TICKET = 2
- PAGE_PRODUCTS = 3
- PAGE_PRODUCTS_MAX = 4
- TOTAL_PAGES = 4
+ PAGE_TERMS = 3
+ PAGE_PRODUCTS = 4
+ PAGE_PRODUCTS_MAX = 5
+ TOTAL_PAGES = 5
ticket_category = inventory.Category.objects.get(
id=settings.TICKET_PRODUCT_CATEGORY
@@ -136,12 +139,18 @@ def guided_registration(request, page_number=None):
products = inventory.Product.objects.filter(
productitem__cart=cart.cart
)
- products = products.filter(category=ticket_category)
+ tickets = products.filter(category=ticket_category)
- if products.count() == 0:
+ logger.debug("tickets count %s" % tickets.count())
+ logger.debug("products: %s" % products.count())
+ if tickets.count() == 0:
# If no ticket, they can only see the profile or ticket page.
max_page = PAGE_TICKET
redirect_page = PAGE_TICKET
+ elif products.count() == 1:
+ # They have a ticket, now to accept terms and conditions
+ max_page = PAGE_TERMS
+ redirect_page = PAGE_TERMS
else:
# If there's a ticket, they should *see* the general products page#
# but be able to go to the overflow page if needs be.
@@ -180,6 +189,12 @@ def guided_registration(request, page_number=None):
sections = _guided_registration_products(
request, GUIDED_MODE_TICKETS_ONLY
)
+ elif page_number == PAGE_TERMS:
+ # Accept terms
+ title = "Terms and Conditions"
+ sections = _guided_registration_products(
+ request, GUIDED_MODE_TERMS
+ )
elif page_number == PAGE_PRODUCTS:
# Select additional items
title = "Additional items"
@@ -219,8 +234,9 @@ def guided_registration(request, page_number=None):
GUIDED_MODE_TICKETS_ONLY = 2
-GUIDED_MODE_ALL_ADDITIONAL = 3
-GUIDED_MODE_EXCLUDE_COMPLETE = 4
+GUIDED_MODE_TERMS = 3
+GUIDED_MODE_ALL_ADDITIONAL = 4
+GUIDED_MODE_EXCLUDE_COMPLETE =5
@login_required
From b0de856255618a688db8178154b78cf3e22b50bd Mon Sep 17 00:00:00 2001
From: James Polley
Date: Sun, 1 Oct 2017 22:54:46 +1100
Subject: [PATCH 38/40] Clarify wording about complimentary products
---
pinaxcon/templates/registrasion/discount_list.html | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/pinaxcon/templates/registrasion/discount_list.html b/pinaxcon/templates/registrasion/discount_list.html
index 00db6b2c..9cba9f37 100644
--- a/pinaxcon/templates/registrasion/discount_list.html
+++ b/pinaxcon/templates/registrasion/discount_list.html
@@ -3,6 +3,7 @@
Discounts and Complimentary Items
+The following discounts and complimentary items are available to you. If you wish to take advantage of this offer, you must choose your items below. This discounts will be applied automatically when you check out.
{% regroup discounts by discount.description as discounts_grouped %}
{% for discount_type in discounts_grouped %}
{{ discount_type.grouper }}
@@ -12,10 +13,6 @@
{% endfor %}
{% endfor %}
-
- Note that you must choose your items below, even if they are complimentary.
- Any applicable discounts will be applied automatically when you check out.
-
From 0103f9a91f631c1ac13941e12bde6ffc38e794e8 Mon Sep 17 00:00:00 2001
From: James Polley
Date: Sun, 1 Oct 2017 23:10:44 +1100
Subject: [PATCH 39/40] Remove erroneous debug logging statements
---
vendor/registrasion/registrasion/views.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/vendor/registrasion/registrasion/views.py b/vendor/registrasion/registrasion/views.py
index 2f72034b..dc3c5a6a 100644
--- a/vendor/registrasion/registrasion/views.py
+++ b/vendor/registrasion/registrasion/views.py
@@ -141,8 +141,6 @@ def guided_registration(request, page_number=None):
)
tickets = products.filter(category=ticket_category)
- logger.debug("tickets count %s" % tickets.count())
- logger.debug("products: %s" % products.count())
if tickets.count() == 0:
# If no ticket, they can only see the profile or ticket page.
max_page = PAGE_TICKET
From abe4f5ad7ad2603e40292693272dffffa16208af Mon Sep 17 00:00:00 2001
From: James Polley
Date: Mon, 2 Oct 2017 00:02:15 +1100
Subject: [PATCH 40/40] Fix some rules that were overly generous
---
.../management/commands/populate_inventory.py | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/pinaxcon/registrasion/management/commands/populate_inventory.py b/pinaxcon/registrasion/management/commands/populate_inventory.py
index 0607cc04..a1a36a32 100644
--- a/pinaxcon/registrasion/management/commands/populate_inventory.py
+++ b/pinaxcon/registrasion/management/commands/populate_inventory.py
@@ -646,7 +646,6 @@ class Command(BaseCommand):
)
pdns_by_staff.group.set([
self.group_team,
- self.group_volunteers,
])
pdns_by_staff.categories.set([self.pdns_category, ])
@@ -655,7 +654,7 @@ class Command(BaseCommand):
cond.CategoryFlag,
("description", ),
description="GottaGettaTicketFirst",
- condition=cond.FlagBase.ENABLE_IF_TRUE,
+ condition=cond.FlagBase.DISABLE_IF_FALSE,
enabling_category = self.ticket
)
needs_a_ticket.categories.set([
@@ -798,15 +797,14 @@ class Command(BaseCommand):
])
free_category(ticket_student_inclusions, self.t_shirt)
- # Team & volunteer ticket inclusions
+ # Team ticket inclusions
ticket_staff_inclusions = self.find_or_make(
cond.IncludedProductDiscount,
("description", ),
- description="Complimentary for ticket holder (staff/volunteer)",
+ description="Complimentary for ticket holder staff)",
)
ticket_staff_inclusions.enabling_products.set([
self.ticket_team,
- self.ticket_volunteer,
])
free_category(ticket_staff_inclusions, self.penguin_dinner)