diff --git a/packages/Sarga/Shop/src/Repositories/ProductRepository.php b/packages/Sarga/Shop/src/Repositories/ProductRepository.php index b5d01113c..af9394878 100644 --- a/packages/Sarga/Shop/src/Repositories/ProductRepository.php +++ b/packages/Sarga/Shop/src/Repositories/ProductRepository.php @@ -112,8 +112,12 @@ class ProductRepository extends WProductRepository } if(isset($params['discount']) && $params['discount']){ - $qb->whereNotNull('product_flat.special_price') - ->where('product_flat.special_price','>',0); + $this->variantJoin($qb); + $qb->where(function($q){ + $q->where('product_flat.special_price','>',0) + ->orWhere('variants.special_price','>',0); + }); + } if (! core()->getConfigData('catalog.products.homepage.out_of_stock_items')) {