fix: qty filter not working if apply_multiple_pricing_rules is enabled
This commit is contained in:
parent
4984513597
commit
1e17d6a607
@ -67,13 +67,12 @@ def sorted_by_priority(pricing_rules, args, doc=None):
|
|||||||
if not pricing_rule.get('priority'):
|
if not pricing_rule.get('priority'):
|
||||||
pricing_rule['priority'] = 1
|
pricing_rule['priority'] = 1
|
||||||
|
|
||||||
if pricing_rule.get('apply_multiple_pricing_rules'):
|
pricing_rule_dict.setdefault(cint(pricing_rule.get("priority")), []).append(pricing_rule)
|
||||||
pricing_rule_dict.setdefault(cint(pricing_rule.get("priority")), []).append(pricing_rule)
|
|
||||||
|
|
||||||
for key in sorted(pricing_rule_dict):
|
for key in sorted(pricing_rule_dict):
|
||||||
pricing_rules_list.extend(pricing_rule_dict.get(key))
|
pricing_rules_list.extend(pricing_rule_dict.get(key))
|
||||||
|
|
||||||
return pricing_rules_list or pricing_rules
|
return pricing_rules_list
|
||||||
|
|
||||||
def filter_pricing_rule_based_on_condition(pricing_rules, doc=None):
|
def filter_pricing_rule_based_on_condition(pricing_rules, doc=None):
|
||||||
filtered_pricing_rules = []
|
filtered_pricing_rules = []
|
||||||
|
Loading…
Reference in New Issue
Block a user