cargando carrito desde backend

This commit is contained in:
2025-10-29 23:30:33 +01:00
parent ae2904aa71
commit feff9ee94a
23 changed files with 848 additions and 183 deletions

View File

@ -7,6 +7,7 @@
<input type="hidden" class="direccion-cp" th:value="${direccion.cp}" />
<input type="hidden" class="direccion-pais-code3" th:value="${direccion.pais.code3}" />
<input type="hidden" class="item-tirada" th:value="${unidades != null ? unidades : ''}" />
<input type="hidden" class="is-palets" th:value="${isPalets != null ? isPalets : ''}" />
<div class="row g-3 align-items-start flex-nowrap">
<div class="col">
@ -17,17 +18,24 @@
<span class="text-muted fw-normal d-block text-break"
th:text="#{'direcciones.telefono'} + ': ' + ${direccion.telefono}"></span>
</div>
<div th:if="${unidades != null}" class="col-auto ms-auto text-end">
<span id="units-text" class="mb-2 fw-semibold d-block text-muted text-uppercase" th:if="${unidades == 1}"
th:text="|${unidades} #{cart.shipping.ud}|"></span>
<div class="col-auto ms-auto text-end">
<div th:if="${unidades != null}">
<span id="units-text" class="mb-2 fw-semibold d-block text-muted text-uppercase" th:if="${unidades == 1}"
th:text="|${unidades} #{cart.shipping.ud}|"></span>
<!-- plural -->
<span id="units-text" class="mb-2 fw-semibold d-block text-muted text-uppercase" th:unless="${unidades == 1}"
th:text="|${unidades} #{cart.shipping.uds}|"></span>
<!-- plural -->
<span id="units-text" class="mb-2 fw-semibold d-block text-muted text-uppercase" th:unless="${unidades == 1}"
th:text="|${unidades} #{cart.shipping.uds}|"></span>
</div>
<div th:if="${isPalets != null and isPalets==1}">
<i class="icon-shipment las la-pallet la-3x text-muted"></i>
</div>
<div th:if="${isPalets == null or isPalets == 0}">
<i class="icon-shipment las la-box la-3x text-muted"></i>
</div>
</div>
</div>
<div
class="d-flex flex-wrap align-items-center gap-2 py-1 bg-light rounded-bottom border-top mt-auto actions-row">
<div class="d-flex flex-wrap align-items-center gap-2 py-1 bg-light rounded-bottom border-top mt-auto actions-row">
<a href="javascript:void(0)" class="d-block text-body p-1 px-2 btn-delete-direccion"
data-id="${this._esc(d.id ?? '')}">
<i class="ri-delete-bin-fill text-muted align-bottom me-1"></i>