diff --git a/packages/Sarga/Shop/src/Repositories/ProductRepository.php b/packages/Sarga/Shop/src/Repositories/ProductRepository.php index 73c7697..305812c 100644 --- a/packages/Sarga/Shop/src/Repositories/ProductRepository.php +++ b/packages/Sarga/Shop/src/Repositories/ProductRepository.php @@ -77,6 +77,7 @@ class ProductRepository extends WProductRepository { $channel = core()->getRequestedChannelCode(); + $params = request()->input(); $locale = core()->getRequestedLocaleCode(); if (config('scout.driver') == 'algolia') { @@ -138,16 +139,6 @@ class ProductRepository extends WProductRepository } }); - /* added for api as per the documentation */ - if (isset($params['name'])) { - $query->where('product_flat.name', 'like', '%' . urldecode($params['name']) . '%'); - } - - /* added for api as per the documentation */ - if (isset($params['url_key'])) { - $query->where('product_flat.url_key', 'like', '%' . urldecode($params['url_key']) . '%'); - } - # sort direction $orderDirection = 'asc'; if (isset($params['order']) && in_array($params['order'], ['desc', 'asc'])) {