如果我有一个提供10%折扣的报价 而且我还有一张优惠券,可在同一产品中提供10%的折扣。
当我将这两个优惠添加到我的购物篮中时,优惠券折扣不适用。 如果我更改优惠的优先级,则可以添加优惠券,但不提供单一优惠折扣。
我需要将这两个优惠应用到购物篮中。
我为凭证优惠创建了自定义条件。然后,我尝试消耗0数量的报价。 但它没有按我预期的那样工作
class CustomCouponCondition(CountCondition):
'''
oscar_customize.offer.models.CustomCouponCondition
'''
name = "Custom Coupon Conditions"
class Meta:
proxy = True
def consume_items(self, offer, basket, affected_lines):
for __, line in self.get_applicable_lines(offer, basket, most_expensive_first=True):
line.consume(0, offer=offer)