Редактирование количества, подсчет итога

This commit is contained in:
yurec 2022-06-06 23:07:58 +05:00
parent 3d461e6d52
commit 1765caff7e
1 changed files with 16 additions and 5 deletions

View File

@ -35,23 +35,26 @@
{section name=customer loop=$cart}{if $cart[customer].id}
<div class="card mb-3" style="width: 100%;">
<div class="card mb-3" style="width: 100%;" id="card-{$cart[customer].id}">
<div class="row g-0">
<div class="col-md-4">
<a href="/tovar_show/{$cart[customer].pages_id}" target="_blank"><img src="img/nofoto.jpg" class="img-fluid rounded-start lazy" alt="..." data-original="/img/tovar/{$cart[customer].fileName}.jpg"></a>
</div>
<div class="col-md-8">
<div class="col-md-6">
<div class="card-body">
<h5 class="card-title">{$cart[customer].txt}</h5>
<form class="quantity-scale m-l-20" style="display: block; margin-top: 40px;">
<div class="value-button" id="decrease" onclick="decreaseValue()">-</div>
<input type="number" id="number" class="kolvo_in_cart" value="{$cart[customer].kolvo}" />
<div class="value-button" id="increase" onclick="increaseValue()">+</div>
<div class="value-button div-change" data-t="min" data-id="{$cart[customer].id}">-</div>
<input type="number" id="number-{$cart[customer].id}" style="text-align: center; border:1px solid lightgray; border-radius: 5px;" class="kolvo_in_cart ml-2 mr-2" value="{$cart[customer].kolvo}" />
<div class="value-button div-change" data-t="plus" data-id="{$cart[customer].id}">+</div>
</form>
<!--p class="card-text">Это более широкая карта с вспомогательным текстом ниже в качестве естественного перехода к дополнительному контенту. Этот контент немного длиннее.</p -->
<p class="card-text" style="display: block; margin-top: 40px;"><span class="product__price product__price--large">{$cart[customer].cena} руб.</span></p>
</div>
</div>
<div class="col-md-2">
<button class="btn mt-5 btn--small btn--radius btn--green btn--green-hover-black btn--uppercase font--bold button-del" type="button" data-id="{$cart[customer].id}">Удалить</button>
</div>
</div>
</div>
@ -61,6 +64,14 @@
</div>
</div>
<!-- /категрии -->
<section class="container mt-3" style="border-top: 3px solid black;">
<h3>Итого: <span id="span-itog"></span> руб.</h3>
<button class="btn mt-5 btn--small btn--radius btn--green btn--green-hover-black btn--uppercase font--bold" style="width: 300px;" type="button">Оформить</button>
</section>
{/if}
<!-- div class="page-pagination">
<ul class="page-pagination__list">