From 7e20684c0f85d3eab5ee390f7b7e7c66ff17deb0 Mon Sep 17 00:00:00 2001 From: jitendra Date: Fri, 15 Feb 2019 19:43:03 +0530 Subject: [PATCH] Issue Fixed (If product visiblity is set as false than products are showing on new and featured section) --- .../Webkul/Product/src/Repositories/ProductRepository.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/Webkul/Product/src/Repositories/ProductRepository.php b/packages/Webkul/Product/src/Repositories/ProductRepository.php index 13c6c3975..b7ae59d29 100755 --- a/packages/Webkul/Product/src/Repositories/ProductRepository.php +++ b/packages/Webkul/Product/src/Repositories/ProductRepository.php @@ -87,7 +87,7 @@ class ProductRepository extends Repository parent::__construct($app); } - /** + /**->where('product_flat.visible_individually', 1) * Specify Model class name * * @return mixed @@ -520,6 +520,7 @@ class ProductRepository extends Repository return $query->distinct() ->addSelect('product_flat.*') ->where('product_flat.status', 1) + ->where('product_flat.visible_individually', 1) ->where('product_flat.new', 1) ->where('product_flat.channel', $channel) ->where('product_flat.locale', $locale) @@ -544,6 +545,7 @@ class ProductRepository extends Repository return $query->distinct() ->addSelect('product_flat.*') ->where('product_flat.status', 1) + ->where('product_flat.visible_individually', 1) ->where('product_flat.featured', 1) ->where('product_flat.channel', $channel) ->where('product_flat.locale', $locale) @@ -567,6 +569,7 @@ class ProductRepository extends Repository return $query->distinct() ->addSelect('product_flat.*') ->where('product_flat.status', 1) + ->where('product_flat.visible_individually', 1) ->where('product_flat.channel', $channel) ->where('product_flat.locale', $locale) ->whereNotNull('product_flat.url_key')