Changeset - 2db0d9542642
[Not reviewed]
0 2 0
Tobias - 6 years ago 2018-09-30 05:58:47
tobias@localhost.localdomain
Make discount heading even smaller
2 files changed with 9 insertions and 7 deletions:
0 comments (0 inline, 0 general)
pinaxcon/templates/registrasion/discount_list.html
Show inline comments
 
{% if discounts %}
 
<div class="my-4 py-4 px-4 bg-primary text-secondary">
 
  <h2>Discounts and Complimentary Items</h2>
 
  <h4>Discounts and Complimentary Items</h4>
 
  <p>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. The discounts will be applied automatically when you check out.</p>
 
  {% regroup discounts by discount.description as discounts_grouped %}
 
  {% for discount_type in discounts_grouped %}
vendor/registrasion/registrasion/views.py
Show inline comments
 
from collections import defaultdict
 
import datetime
 
import zipfile
 
import os
...
 
@@ -291,21 +292,22 @@ def _guided_registration_products(request, mode):
 
    seen_categories = []
 

	
 
    with BatchController.batch(request.user):
 
        available_products = list(ProductController.available_products(
 
        available_products = ProductController.available_products(
 
            request.user,
 
            products=all_products,
 
        ))
 
        )
 

	
 
        if len(available_products) == 0:
 
            return []
 

	
 
        available_by_category = defaultdict(list)
 
        for product in available_products:
 
            available_by_category[product.category].append(product)
 

	
 
        has_errors = False
 

	
 
        for category in cats:
 
            products = [
 
                i for i in available_products
 
                if i.category == category
 
            ]
 
            products = available_by_category[category]
 

	
 
            prefix = "category_" + str(category.id)
 
            p = _handle_products(request, category, products, prefix)
0 comments (0 inline, 0 general)