view fx
This commit is contained in:
parent
1159060f78
commit
093765c26c
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue