add todo notes

This commit is contained in:
Mira Weller
2024-06-08 02:40:17 +02:00
parent c156581ad1
commit f56d67ec9c
2 changed files with 3 additions and 0 deletions

View File

@@ -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)

View File

@@ -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):