invoice fx

This commit is contained in:
merdan 2022-11-13 15:37:40 +05:00
parent a75cb5a528
commit cd290dc2cf
1 changed files with 7 additions and 7 deletions

View File

@ -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;
}