Free price: Allow to suggest a different price than the minimum (#3666)

* Free price: Allow to suggest a different price than the minimum

* Full implementation

* Widget tests

* Add min values to titles
This commit is contained in:
Raphael Michel
2023-10-27 13:36:01 +02:00
committed by GitHub
parent b32249d48b
commit 000c64755d
18 changed files with 205 additions and 23 deletions

View File

@@ -570,7 +570,7 @@ class AddOnsStep(CartMixin, AsyncAction, TemplateFlowStep):
rate=a.tax_rate,
)
else:
v.initial_price = v.display_price
v.initial_price = v.suggested_price
i.expand = any(v.initial for v in i.available_variations)
else:
i.initial = len(current_addon_products[i.pk, None])
@@ -584,7 +584,7 @@ class AddOnsStep(CartMixin, AsyncAction, TemplateFlowStep):
rate=a.tax_rate,
)
else:
i.initial_price = i.display_price
i.initial_price = i.suggested_price
if items:
formsetentry['categories'].append({