Fixed urldecode issue in search temm
This commit is contained in:
parent
7e826bef00
commit
f9e174ea70
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,8 @@ class SearchRepository extends Repository
|
|||
return 'Webkul\Product\Contracts\Product';
|
||||
}
|
||||
|
||||
public function searchAttributes() {
|
||||
public function searchAttributes()
|
||||
{
|
||||
}
|
||||
|
||||
public function search($data) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue