100 lines
3.1 KiB
HTML
100 lines
3.1 KiB
HTML
title = "Sebet"
|
|
url = "/sebet"
|
|
layout = "master"
|
|
is_hidden = 0
|
|
|
|
[Cart]
|
|
==
|
|
<div class="toast" role="alert" aria-live="assertive" aria-atomic="true" id="toast-success">
|
|
<div class="toast-body" style="background: green;color:white;">
|
|
Haryt Ustunlikli Sebetden Pozuldy!!!
|
|
</div>
|
|
</div>
|
|
<div class="page-title-area page-title-img-two">
|
|
<div class="container">
|
|
<div class="page-title-item">
|
|
<h2>{{this.page.title}}</h2>
|
|
<ul>
|
|
<li>
|
|
<a href="/">Home</a>
|
|
</li>
|
|
<li>
|
|
<i class='bx bx-chevron-right'></i>
|
|
</li>
|
|
<li>{{this.page.title}}</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% set obCartElementList = Cart.get() %}
|
|
|
|
|
|
|
|
<section class="cart-area ptb-100">
|
|
<div class="container">
|
|
<div class="cart-wrap">
|
|
{% if obCartElementList.isNotEmpty() %}
|
|
|
|
<table class="table">
|
|
<thead class="thead">
|
|
<tr>
|
|
<!-- <th class="table-head" scope="col">Suraty</th> -->
|
|
<th class="table-head" scope="col">Haryt Ady</th>
|
|
<th class="table-head" scope="col">Bahasy</th>
|
|
<th class="table-head" scope="col">Mukdary</th>
|
|
<th class="table-head" scope="col">Jemi</th>
|
|
<th class="table-head" scope="col">Sazlamalar</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for obCartElement in obCartElementList %}
|
|
{% set obOffer = obCartElement.offer %}
|
|
|
|
<tr>
|
|
<td>{{ obOffer.product.name }}</td>
|
|
<td>{{ obOffer.price }} {{ obOffer.currency }}</td>
|
|
<td>{{ obCartElement.quantity }}</td>
|
|
<td>{{ obCartElement.price }} {{ obCartElement.currency }}</td>
|
|
<td>
|
|
<a href="javascript:;" onClick="onRemoveInCart({{obOffer.id}});">
|
|
<i class='bx bx-x'></i>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
<!-- <div class="shop-back">
|
|
<a href="#">Go for Order?</a>
|
|
</div> -->
|
|
<div class="total-shopping" style="margin-top: 70px;">
|
|
<h2>UMUMY SARGYTLAR</h2>
|
|
<h3>Umumy Baha: <span>{{ obCartElementList.getTotalPrice() }} {{ obCartElementList.getCurrency() }}</span></h3>
|
|
<a href="/">Taýýarla</a>
|
|
</div>
|
|
{% else %}
|
|
<h1>Sebet Bosh</h1>
|
|
{% endif %}
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<script>
|
|
|
|
function onRemoveInCart(prodId) {
|
|
|
|
$.request('onRemove', {
|
|
data: {'cart': [prodId]},
|
|
success: function() {
|
|
console.log('Finished!');
|
|
// Get the snackbar DIV
|
|
|
|
window.location.reload();
|
|
}
|
|
});
|
|
}
|
|
</script> |