From cd290dc2cfea9b2fcac4f8fc6485176531539c71 Mon Sep 17 00:00:00 2001 From: merdan Date: Sun, 13 Nov 2022 15:37:40 +0500 Subject: [PATCH] invoice fx --- .../Shop/src/Repositories/ProductRepository.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/Sarga/Shop/src/Repositories/ProductRepository.php b/packages/Sarga/Shop/src/Repositories/ProductRepository.php index 3a2318815..8e9838d13 100644 --- a/packages/Sarga/Shop/src/Repositories/ProductRepository.php +++ b/packages/Sarga/Shop/src/Repositories/ProductRepository.php @@ -266,7 +266,7 @@ class ProductRepository extends WProductRepository public function getDiscountedProducts($seller_id,$categoryId = null){ - $results = app(ProductFlatRepository::class)->scopeQuery(function ($query) use ($seller_id,$categoryId) { + $results = app(ProductFlatRepository::class)->scopeQuery(function ($query) use ($categoryId) { $channel = core()->getRequestedChannelCode(); $locale = core()->getRequestedLocaleCode(); @@ -276,17 +276,17 @@ class ProductRepository extends WProductRepository ->where('product_flat.status', 1) ->where('product_flat.visible_individually', 1) ->where('product_flat.channel', $channel) - ->where('product_flat.locale', $locale) - ->whereNotNull('product_flat.special_price') - ->where('product_flat.special_price','>',0) - ->join('marketplace_products', 'product_flat.product_id', '=', 'marketplace_products.product_id') - ->where('marketplace_products.marketplace_seller_id', $seller_id); + ->where('product_flat.locale', $locale); if ($categoryId) { $query->leftJoin('product_categories', 'product_categories.product_id', '=', 'product_flat.product_id') ->whereIn('product_categories.category_id', explode(',', $categoryId)); } return $query->inRandomOrder(); - })->paginate(10); + })->whereNotNull('product_flat.special_price') + ->where('product_flat.special_price','>',0) + ->join('marketplace_products', 'product_flat.product_id', '=', 'marketplace_products.product_id') + ->where('marketplace_products.marketplace_seller_id', $seller_id) + ->paginate(20); return $results; }