Merge branch 'master' of https://github.com/bagisto/bagisto into patch-2

This commit is contained in:
Shubham Mehrotra 2020-06-23 16:54:11 +05:30
commit 292c32c37b
2 changed files with 15 additions and 5 deletions

View File

@ -110,7 +110,7 @@
type="search"
class="form-control"
placeholder="{{ __('velocity::app.header.search-text') }}"
:value="unescape(searchedQuery.term) ? unescape(searchedQuery.term.split('+').join(' ')) : ''" />
:value="searchedQuery.term ? searchedQuery.term.split('+').join(' ') : ''" />
<image-search-component></image-search-component>
@ -404,7 +404,7 @@
localStorage.searchedImageUrl = self.uploadedImageUrl;
queryString = localStorage.searched_terms = analysedResult.join('_');
self.$root.hideLoader();
window.location.href = "{{ route('shop.search.index') }}" + '?term=' + queryString + '&image-search=1';

View File

@ -17,7 +17,10 @@
@endpush
@section('content-wrapper')
<div class="container category-page-wrapper">
<div
style="padding-left: 50px !important;"
class="container category-page-wrapper"
>
<section class="search-container row category-container">
@if (request('image-search'))
<image-search-result-component></image-search-result-component>
@ -81,8 +84,8 @@
</h3>
<div class="term-list">
<a v-for="term in searched_terms" :href="'{{ route('shop.search.index') }}?term=' + term">
@{{ term }}
<a v-for="term in searched_terms" :href="'{{ route('shop.search.index') }}?term=' + term.slug">
@{{ term.name }}
</a>
</div>
</div>
@ -102,6 +105,13 @@
created: function() {
this.searched_terms = localStorage.searched_terms.split('_');
this.searched_terms = this.searched_terms.map(term => {
return {
name: term,
slug: term.split(' ').join('+'),
}
});
}
});
</script>