<div id="msmcd-dropdown" class="dropdown" data-msmcddropdown="false">
<a class="btn btn-secondary dropdown-toggle w-100" href="#" role="button" id="dropdownMiniCart"
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{'ms2_minicart' | lexicon} <span class="badge badge-light ms2_total_count">{$total_count}</span>
</a>
<div id="mcd-mini-cart" class="dropdown-menu w-100" aria-labelledby="dropdownMiniCart">
{$output}
</div>
</div>
<div id="msMiniCart" class="{$total_count > 0 ? 'full' : ''}">
{if $cart}
<div class="MiniCart__title">
Ваш заказ:
</div>
{/if}
{if $cart}
<div class="cart__inner mt-50">
{foreach $cart as $k => $item}
<div class="cart__item">
<div class="cart__img">
{if $item.img?}
<img class="align-self-center mb-3" src="{$item.img}" alt="{$item.pagetitle}">
{else}
<img class="mb-product-img mb-3" src="{'assets_url' | option}components/minishop2/img/web/ms2_small.png"
srcset="{'assets_url' | option}components/minishop2/img/web/ms2_small@2x.png 2x"
alt="{$item.pagetitle}" width="50" />
{/if}
</div>
<div class="cart__title">
{$item.pagetitle}
</div>
<div class="cart__number">
[[-!msProducts?
&tpl=`msMCDProductsRowInputTpl`
]]
</div>
{if $item.price}
<div class="cart__price">
<span>{$item.count}</span> × <span>{$item.price}</span> = <span>{$item.sum}</span> {'ms2_frontend_currency' | lexicon}
</div>
{else}
<div class="cart__price">
Цена отсутствует
</div>
{/if}
<div class="card__close">
<form method="post" class="ms2_form">
<input type="hidden" name="key" value="{$k}">
<input type="hidden" name="msmcd_id" value="{$item.id}">
<button class="btn-close" type="submit" name="ms2_action" value="cart/remove">
<img src="assets/img/arrows_circle_remove.svg" alt="">
</button>
</form>
</div>
</div>
{if 'msmcd_change_count_mini_cart' | option}
<form method="post" id="msmcd-mc-{$item.id}" class="ms2_form">
<input type="hidden" name="key" value="{$k}">
<input type="hidden" name="msmcd_id" value="{$item.id}">
<div class="d-flex justify-content-center">
<div class="btn-group">
<input type="number" min="0" name="count" value="{$item.count}"
placeholder="0" class="input-sm form-control msmcd-count" />
</div>
<div class="btn-group">×</div>
<div class="btn-group"><span>{$item.price}</span></div>
<div class="btn-group">=</div>
<div class="btn-group"><span>{$item.sum}</span></div> {'ms2_frontend_currency' | lexicon}
</div>
<button class="btn btn-default msmcd-action" type="submit"
name="ms2_action" value="cart/change" style="display: none;"></button>
</form>
{else}
{/if}
{/foreach}
</div>
{/if}
{if $cart}
<div class="cart__total mt-50">
{'ms2_minicart_goods' | lexicon} <strong class="ms2_total_count">{$total_count}</strong> {'ms2_frontend_count_unit' | lexicon}
{'ms2_minicart_cost' | lexicon} <strong class="ms2_total_cost">{$total_cost}</strong> {'ms2_frontend_currency' | lexicon}
<br>
По поводу товаров без цены уточняйте у менеджера
</div>
{/if}
</div>
<form class="ms2_form" id="msOrder" method="post">
<div class="row">
<div class="msOrder__inner">
{foreach ['email','receiver','phone'] as $field}
<div class="form-group row input-parent">
<div class="col-md-8">
<input class="checkout-input" type="text" id="{$field}" placeholder="{('ms2_frontend_' ~ $field) | lexicon}"
name="{$field}" value="{$form[$field]}"
class="form-control{($field in list $errors) ? ' error' : ''}">
</div>
</div>
{/foreach}
<input type="hidden" name="payment" value="1" id="payment_1" checked>
<input type="hidden" name="delivery" value="1" id="delivery_1" checked>
</div>
</div>
<button type="submit" name="ms2_action" value="order/submit" class="btn btn-2">
{'ms2_frontend_order_submit' | lexicon}
</button>
</form>
<div id="msCart">
Cпасибо за заказ менеджер свяжеться с вами в ближайшее время.
</div>
const inp = document.querySelector("input-number")
let result = inp.value;
const increment = document.getElementById("btn-minus")
const decrement = document.getElementById('btn-plus')
increment.addEventListener("click", function(){
result = Number(inp.value) + 1;
inp.value = result
})
decrement.addEventListener('click', function(){
result = Number(inp.value) - 1;
inp.value = result
})
<div class="btn-count">
<span class="input-group-btn">
<button type="button" class="btn-number btn-minus" disabled="disabled" data-type="minus">-</button>
</span>
<input type="text" name="count" id="count-108" class="form-control input-number" value="1" data-min="1" data-max="99999999">
<span class="input-group-btn">
<button type="button" class="btn-number btn-plus" data-type="plus">+</button>
</span>
</div>
{set $items = json_decode($itemAdmin | resource: ' itemAdmin ', true)}
{foreach $items as $item}
{if $item.off != 1}
<div class="admin__item">
<div class="admin__item-inner">
<div class="admin__left">
<img src="/assets/manager/{$item.image}" alt="">
</div>
<div class="admin__right">
<div class="title">
{$item.title}
</div>
<div class="post mt-10">
{$item.post}
</div>
<div class="phone mt-20">
<img src="assets/img/web/phone (1).png" alt="">
<a href="tel:{$item.phone}">
{$item.phone}
</a>
</div>
<div class="mail mt-10">
<img src="assets/img/web/mail (2).png" alt="">
<a href="mailto:{$item.mail}">{$item.mail}</a>
</div>
{if $item.chart}
<div class="chart mt-10">
<img src="assets/img/web/calendar_edit.png" alt="">
<div class="chart__desc">
{$item.chart}
</div>
</div>
{/if}
<div class="admin__btn">
<div class="btn btn-admin">
Подробнее
<img src="assets/img/web/arrow_forward_ios.png" alt="">
</div>
</div>
</div>
</div>
<div class="admin__desc mt-50">
{$item.desc}
</div>
</div>
{/if}
{/foreach}
{if $_modx->resource.itemMainSlider}
<div class="slider">
<div class="slider__inner">
<div class="swiper mainSlider">
<div class="swiper-wrapper">
{set $items = json_decode($itemMainSlider | resource: ' itemMainSlider ', true)}
{foreach $items as $item}
{if $item.off != 1}
<div class="swiper-slide">
{if $item.image}
<img src="/assets/manager/{$item.image}" alt="">
{else}
<img src="assets/manager/img/4a23ac2db98f5028a7a7efe98b44b63e.png" alt="">
{/if}
<div class="slider__content">
<div class="title">
{$item.title}
</div>
<div class="desc">
{$item.desc}
</div>
<div class="link mt-75">
<a class="btn btn-1" href="{$item.link}">{$item.linkTitile}</a>
</div>
</div>
</div>
{/if}
{/foreach}
</div>
<div class="slider-navigation">
<div class="swiper-pagination"></div>
</div>
</div>
</div>
</div>
{else}
<div class="slider">
<div class="slider__inner">
<div class="swiper mainSlider">
<div class="swiper-wrapper">
<div class="swiper-slide">
<img src="assets/manager/img/4a23ac2db98f5028a7a7efe98b44b63e.png" alt="">
<div class="slider__content">
<div class="title">
{$_modx->resource.pagetitle}
</div>
</div>
</div>
</div>
<div class="slider-navigation">
<div class="swiper-pagination"></div>
</div>
</div>
</div>
</div>
{/if}