From 093765c26c8594da65618d60a12e5ea1a334e3d0 Mon Sep 17 00:00:00 2001 From: merdan Date: Tue, 30 Jan 2024 15:20:49 +0500 Subject: [PATCH] view fx --- .../src/Repositories/ProductFlatRepository.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/TPS/Shop/src/Repositories/ProductFlatRepository.php b/packages/TPS/Shop/src/Repositories/ProductFlatRepository.php index a584a5d3c..4410a1019 100644 --- a/packages/TPS/Shop/src/Repositories/ProductFlatRepository.php +++ b/packages/TPS/Shop/src/Repositories/ProductFlatRepository.php @@ -15,8 +15,8 @@ class ProductFlatRepository extends WPFRepository public function getDiscountedProducts($count = 4){ return $this->where('locale', app()->getLocale()) ->where('channel', core()->getCurrentChannelCode()) - ->whereNotNull('special_price') - ->whereNotNull('special_price_to') + ->whereNotNull('product_flat.special_price') + ->whereNotNull('product_flat.special_price_to') ->limit($count) ->inRandomOrder() ->get(); @@ -25,11 +25,11 @@ class ProductFlatRepository extends WPFRepository public function weeklyOffers($count = 8){ return $this->where('locale', app()->getLocale()) ->where('channel', core()->getCurrentChannelCode()) - ->whereNotNull('special_price') - ->whereNotNull('special_price_to') - ->whereNotNull('special_price_from') - ->whereDate('special_price_from','<=',Carbon::today()) - ->whereDate('special_price_to','>=',Carbon::today()) + ->whereNotNull('product_flat.special_price') + ->whereNotNull('product_flat.special_price_to') + ->whereNotNull('product_flat.special_price_from') + ->whereDate('product_flat.special_price_from','<=',Carbon::today()) + ->whereDate('product_flat.special_price_to','>=',Carbon::today()) ->limit($count) ->inRandomOrder() ->get();