product_flat special price fix

This commit is contained in:
merdan 2024-01-30 16:44:43 +05:00
parent a8040c25e5
commit 1b07c6c50b
1 changed files with 4 additions and 4 deletions

View File

@ -283,12 +283,12 @@ class ProductRepository extends PRepository
->where([['product_flat.channel','=', $channel],['product_flat.locale', '=',$locale]])
->whereNotNull(['product_flat.url_key','product_flat.special_price'])
->where(function($query){
$query->whereNull('special_price_from')
->orWhere('special_price_from', '>=', Carbon::now());
$query->whereNull('product_flat.special_price_from')
->orWhere('product_flat.special_price_from', '>=', Carbon::now());
})
->where(function($query){
$query->whereNull('special_price_to')
->orWhere('special_price_to', '<=', Carbon::now());
$query->whereNull('product_flat.special_price_to')
->orWhere('product_flat.special_price_to', '<=', Carbon::now());
});