Вёрстка
2
Вклад в тег
// Swiper JS Внутри карточки магазига //
var myswiper2 = new Swiper('.swiper-container-item', {
slidesPerView: 1,
spaceBetween: 4,
slidesPerGroup: 1,
loop: true,
loopFillGroupWithBlank: true,
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
});
// Swiper JS Modal //
$('#product_view').on('shown.bs.modal', function(e) {
myswiper2.update();
//var $invoker = $(e.relatedTarget);
//swiper.slideTo($invoker.data('slider'));
//swiper.update();
});
function displayCart() {
var cartArray = shoppingCart.listCart();
var output = "" + "<div ><input class='input-send' name='phone' value='' placeholder='Номер телефона' requaired>" + "<input class='input-send' name='name' value='' placeholder='Ваша почта' requaired>" + "<button class='sendspan' type='submit'>Отправить заказ</button></div>";
for (var i in cartArray) {
output += "<div class='form-group'>"
+ "<img src=" + cartArray[i].name + ">"
+ "<div class='input-group'><button class='minus-item input-group-addon' data-name=" + cartArray[i].name + ">-</button>"
+ "<input name='mutch' type='number' class='item-count form-control' data-name='" + cartArray[i].name + "' value='" + cartArray[i].count + "' requaired>"
+ "<button class='plus-item btn input-group-addon' data-name=" + cartArray[i].name + ">+</button></div>"
+ "<div name='price' requaired>" + cartArray[i].total + "</div>"
+ "<button class='delete-item btn btn-danger' data-name=" + cartArray[i].name + ">×</button>"
+ "<p class='form-message'></p>"
+ "<div id='message'></div>"
+ "</div>"
+ "<input class='offer' name='offer[]' value='Артикул: " + cartArray[i].name + " | Количество: " + cartArray[i].count + " | Сумма: " + cartArray[i].total + "' requaired>"
+ "</div>";
}
$('.show-cart').html(output);
$('.total-cart').html(shoppingCart.totalCart());
$('.total-count').html(shoppingCart.totalCount());
}
+ "<input class='offer' name='offer[]' value='Артикул: " + cartArray[i].name + " | Количество: " + cartArray[i].count + " | Сумма: " + cartArray[i].total + "' requaired>"