updates
This commit is contained in:
parent
4049c2c550
commit
f2d4a68366
|
|
@ -1,23 +1,3 @@
|
|||
@php
|
||||
$searchQuery = request()->input();
|
||||
|
||||
if ($searchQuery && ! empty($searchQuery)) {
|
||||
$searchQuery = implode('&', array_map(
|
||||
function ($v, $k) {
|
||||
if (is_array($v)) {
|
||||
return $k.'[]='.implode('&'.$k.'[]=', $v);
|
||||
} else {
|
||||
return $k.'='.$v;
|
||||
}
|
||||
},
|
||||
$searchQuery,
|
||||
array_keys($searchQuery)
|
||||
));
|
||||
} else {
|
||||
$searchQuery = false;
|
||||
}
|
||||
@endphp
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.header.locale.before') !!}
|
||||
<div class="pull-left">
|
||||
<div class="dropdown">
|
||||
|
|
@ -49,9 +29,9 @@
|
|||
@endif>
|
||||
|
||||
@foreach (core()->getCurrentChannel()->locales as $locale)
|
||||
@if (isset($searchQuery) && $searchQuery)
|
||||
@if (isset($serachQuery))
|
||||
<option
|
||||
value="?{{ $searchQuery }}&locale={{ $locale->code }}"
|
||||
value="?{{ $serachQuery }}&locale={{ $locale->code }}"
|
||||
{{ $locale->code == app()->getLocale() ? 'selected' : '' }}>
|
||||
{{ $locale->name }}
|
||||
</option>
|
||||
|
|
@ -78,8 +58,8 @@
|
|||
class="btn btn-link dropdown-toggle control locale-switcher styled-select"
|
||||
onchange="window.location.href = this.value">
|
||||
@foreach (core()->getCurrentChannel()->currencies as $currency)
|
||||
@if (isset($searchQuery) && $searchQuery)
|
||||
<option value="?{{ $searchQuery }}¤cy={{ $currency->code }}" {{ $currency->code == core()->getCurrentCurrencyCode() ? 'selected' : '' }}>{{ $currency->code }}</option>
|
||||
@if (isset($serachQuery))
|
||||
<option value="?{{ $serachQuery }}¤cy={{ $currency->code }}" {{ $currency->code == core()->getCurrentCurrencyCode() ? 'selected' : '' }}>{{ $currency->code }}</option>
|
||||
@else
|
||||
<option value="?currency={{ $currency->code }}" {{ $currency->code == core()->getCurrentCurrencyCode() ? 'selected' : '' }}>{{ $currency->code }}</option>
|
||||
@endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue