Интегрированные плагины
Автоопределение и выбор города
Общие настройки
Для корректного вывода плагина в шапке сайта переключите значение настройки
Вывод плагина
на Вручную
.
Город и уведомление
Замените HTML код в разделе Шаблоны.
{strip}
{* UTILS *}
{include "{$wa->site->themePath(waRequest::getTheme())}u-utils.html"}
<div class="b-cityselect__wrapper b-cityselect__wrapper--{$current_theme} {if !empty($settings.by_hook)}b-cityselect__wrapper--{$settings.by_hook|escape}{/if}">
<button class="b-cityselect__city i-cityselect__city_change btn btn-dark-theme-link p-0 gap-2 border-0" type="button">
<i class="icon icon-md">{call include_icon icon="common/pin"}</i>
{if empty($is_mobile)}<span class="i-cityselect__city fs-sm text-nowrap">{$location.city}</span>{/if}
</button>
{if !empty($location.need_detect) || $show_notifier=='force'}
<div class="b-cityselect__notifier b-cityselect__notifier--{$current_theme}">
<div class="b-cityselect__notifier_triangle"></div>
<div class="b-cityselect__notifier_title">Ваш город <b class="i-cityselect__city">{$location.city}</b>?</div>
<div class="b-cityselect__notifier_buttons nowrap">
<input type="button" class="btn btn-theme btn-sm uni-btn uni-btn--red b-cityselect__city_yes i-cityselect__city_yes" value="Да">
<input type="button" class="b-cityselect__city_no btn btn-outline-theme btn-sm uni-btn i-cityselect__city_no" value="Нет">
</div>
</div>
{if !empty($location.need_detect)}
<script>if (typeof shop_cityselect !== 'undefined') { shop_cityselect.detect() } else { document.addEventListener("DOMContentLoaded", function() { shop_cityselect.detect() }) }</script>
{/if}
{/if}
</div>
{/strip}
Всплывающее окно выбора города
Замените HTML код в разделе Шаблоны.
{strip}
{* UTILS *}
{include "{$wa->site->themePath(waRequest::getTheme())}u-utils.html"}
<div id="cityselect__change" class="b-cityselect__change b-cityselect__change--{$current_theme|escape} i-cityselect__change" >
<a href="" data-remodal-action="cancel" class="remodal-close remodal_quickview b-cityselect__change_close i-cityselect__change_close"><i class="material-icons b-cityselect__change_icon">close</i><i class="fa fa-times b-cityselect__change_icon--{$current_theme}"></i></a>
<div class="b-cityselect__change_info">
<i class="fas fa fa-map-marker fa-map-marker-alt"></i> Ваш город: <span class="i-cityselect__city">{$location.city}</span>
</div>
{if empty($settings.token)}<div class="b-cityselect__change_error error text-danger">Ошибка! не указан API-ключ в настройках плагина</div>{/if}
<div class="b-cityselect__change_city_wrapper">
<input type="text" class="b-cityselect__change_input i-cityselect__input form-control" placeholder="[`Введите название Вашего города`]" value="">
</div>
{if !empty($settings.cities)}
<div class="b-cityselect__list_wrapper">
<ul class="b-cityselect__list">
{foreach $settings.cities as $city}
<li><a href="#" data-city="{$city.city|escape}" data-region_kladr_id="{$city.region|escape}" data-postal_code="{$city.zip|escape}" class="i-cityselect__set_city {if $city.bold}bold{/if}">{$city.city}</a></li>
{/foreach}
</ul>
</div>
{else}
<div class="b-cityselect__list_spacer"></div>
{/if}
</div>
{/strip}