|
|
@@ -451,8 +451,7 @@ class AbstractConditionalOffer(models.Model):
|
|
451
|
451
|
return Product.objects.none()
|
|
452
|
452
|
|
|
453
|
453
|
queryset = self.condition.range.all_products()
|
|
454
|
|
- return queryset.filter(is_discountable=True).exclude(
|
|
455
|
|
- structure=Product.CHILD)
|
|
|
454
|
+ return queryset.filter(is_discountable=True).browsable()
|
|
456
|
455
|
|
|
457
|
456
|
@cached_property
|
|
458
|
457
|
def combined_offers(self):
|
|
|
@@ -970,8 +969,8 @@ class AbstractRange(models.Model):
|
|
970
|
969
|
Product = self.included_products.model
|
|
971
|
970
|
|
|
972
|
971
|
if self.includes_all_products:
|
|
973
|
|
- # Filter out blacklisted products
|
|
974
|
|
- return Product.objects.all().exclude(
|
|
|
972
|
+ # Filter out blacklisted
|
|
|
973
|
+ return Product.objects.exclude(
|
|
975
|
974
|
id__in=self.excluded_products.values("id")
|
|
976
|
975
|
)
|
|
977
|
976
|
|
|
|
@@ -998,7 +997,6 @@ class AbstractRange(models.Model):
|
|
998
|
997
|
~Q(excludes=self),
|
|
999
|
998
|
~Q(parent__excludes=self)
|
|
1000
|
999
|
)
|
|
1001
|
|
-
|
|
1002
|
1000
|
return selected_products.distinct()
|
|
1003
|
1001
|
|
|
1004
|
1002
|
@property
|