diff --git a/packages/Webkul/Product/src/Repositories/ProductRepository.php b/packages/Webkul/Product/src/Repositories/ProductRepository.php index 95c9dab43..736406593 100755 --- a/packages/Webkul/Product/src/Repositories/ProductRepository.php +++ b/packages/Webkul/Product/src/Repositories/ProductRepository.php @@ -586,7 +586,8 @@ class ProductRepository extends Repository * * @return Collection */ - public function searchProductByAttribute($term) { + public function searchProductByAttribute($term) + { $results = app('Webkul\Product\Repositories\ProductFlatRepository')->scopeQuery(function($query) use($term) { $channel = request()->get('channel') ?: (core()->getCurrentChannelCode() ?: core()->getDefaultChannelCode()); @@ -599,7 +600,7 @@ class ProductRepository extends Repository ->where('product_flat.channel', $channel) ->where('product_flat.locale', $locale) ->whereNotNull('product_flat.url_key') - ->where('product_flat.name', 'like', '%' . $term . '%') + ->where('product_flat.name', 'like', '%' . urldecode($term) . '%') ->orderBy('product_id', 'desc'); })->paginate(16); diff --git a/packages/Webkul/Product/src/Repositories/SearchRepository.php b/packages/Webkul/Product/src/Repositories/SearchRepository.php index 1d6b4254a..c0eb60189 100755 --- a/packages/Webkul/Product/src/Repositories/SearchRepository.php +++ b/packages/Webkul/Product/src/Repositories/SearchRepository.php @@ -33,7 +33,8 @@ class SearchRepository extends Repository return 'Webkul\Product\Contracts\Product'; } - public function searchAttributes() { + public function searchAttributes() + { } public function search($data) {