From f56d67ec9c82712c14c86ff9c60d220ec9815936 Mon Sep 17 00:00:00 2001 From: Mira Weller Date: Sat, 8 Jun 2024 02:40:17 +0200 Subject: [PATCH] add todo notes --- src/pretix/base/models/items.py | 1 + src/pretix/presale/checkoutflow.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/pretix/base/models/items.py b/src/pretix/base/models/items.py index 97e80d4ac3..3099683030 100644 --- a/src/pretix/base/models/items.py +++ b/src/pretix/base/models/items.py @@ -168,6 +168,7 @@ class ItemCategory(LoggedModel): ) print("potential_discounts_dict", potential_discounts_dict) potential_discounts = {info for lst in potential_discounts_dict.values() for info in lst} + # TODO sum up the max_counts and pass them on (also pass on the discount_rules so we can calculate actual discounted prices later) potential_discount_items = {item.pk for (discount_rule, max_count, i) in potential_discounts for item in discount_rule.benefit_limit_products.all()} return self.items.filter(pk__in=potential_discount_items) diff --git a/src/pretix/presale/checkoutflow.py b/src/pretix/presale/checkoutflow.py index ab508c082c..30c0467720 100644 --- a/src/pretix/presale/checkoutflow.py +++ b/src/pretix/presale/checkoutflow.py @@ -656,6 +656,8 @@ class AddOnsStep(CartMixin, AsyncAction, TemplateFlowStep): if self.request.customer else None ), ) + # TODO calculate discounted price + # TODO set item.order_max for benefit_only_apply_to_cheapest_n_matches discounted items return items def get_context_data(self, **kwargs):