Fixed urldecode issue in search temm

This commit is contained in:
jitendra 2019-04-18 17:16:36 +05:30
parent 7e826bef00
commit f9e174ea70
2 changed files with 5 additions and 3 deletions

View File

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

View File

@ -33,7 +33,8 @@ class SearchRepository extends Repository
return 'Webkul\Product\Contracts\Product';
}
public function searchAttributes() {
public function searchAttributes()
{
}
public function search($data) {