[FIX] website_sale_aplicoop: toggle reparto desde carrito
This commit is contained in:
parent
2f57a5d14e
commit
97dc41d212
2 changed files with 13 additions and 10 deletions
|
|
@ -213,6 +213,14 @@
|
||||||
var cartKey = "eskaera_" + this.orderId + "_cart";
|
var cartKey = "eskaera_" + this.orderId + "_cart";
|
||||||
localStorage.setItem(cartKey, JSON.stringify(cart));
|
localStorage.setItem(cartKey, JSON.stringify(cart));
|
||||||
|
|
||||||
|
// Mantener sincronizado el carrito en memoria (sidebar de tienda)
|
||||||
|
if (window.groupOrderShop && window.groupOrderShop.cart !== undefined) {
|
||||||
|
window.groupOrderShop.cart = cart;
|
||||||
|
if (typeof window.groupOrderShop._updateCartDisplay === "function") {
|
||||||
|
window.groupOrderShop._updateCartDisplay();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Re-render checkout summary without reloading
|
// Re-render checkout summary without reloading
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
// Use the global function from checkout_labels.js
|
// Use the global function from checkout_labels.js
|
||||||
|
|
|
||||||
|
|
@ -349,6 +349,11 @@
|
||||||
<button type="button" class="btn btn-primary cart-btn-compact" id="save-cart-btn" t-attf-data-order-id="{{ group_order.id }}" data-bs-title="Save Cart" data-bs-toggle="tooltip">
|
<button type="button" class="btn btn-primary cart-btn-compact" id="save-cart-btn" t-attf-data-order-id="{{ group_order.id }}" data-bs-title="Save Cart" data-bs-toggle="tooltip">
|
||||||
<i class="fa fa-save cart-icon-size" />
|
<i class="fa fa-save cart-icon-size" />
|
||||||
</button>
|
</button>
|
||||||
|
<t t-if="group_order.home_delivery and delivery_product_id">
|
||||||
|
<button type="button" class="btn btn-outline-warning cart-btn-compact" id="home-delivery-btn" aria-label="Toggle home delivery" data-bs-title="Home Delivery" data-bs-toggle="tooltip">
|
||||||
|
<i class="fa fa-truck cart-icon-size" aria-hidden="true" />
|
||||||
|
</button>
|
||||||
|
</t>
|
||||||
<a t-attf-href="/eskaera/{{ group_order.id }}/checkout" class="btn btn-success cart-btn-compact" aria-label="Proceed to checkout" data-bs-title="Proceed to Checkout" data-bs-toggle="tooltip">
|
<a t-attf-href="/eskaera/{{ group_order.id }}/checkout" class="btn btn-success cart-btn-compact" aria-label="Proceed to checkout" data-bs-title="Proceed to Checkout" data-bs-toggle="tooltip">
|
||||||
<i class="fa fa-check cart-icon-size" aria-hidden="true" />
|
<i class="fa fa-check cart-icon-size" aria-hidden="true" />
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -518,16 +523,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="alert alert-warning alert-dismissible fade show" role="alert">
|
|
||||||
<div>
|
|
||||||
<i class="fa fa-exclamation-triangle" aria-hidden="true" t-translation="off" />
|
|
||||||
<span class="fw-bold">Important</span>:
|
|
||||||
</div>
|
|
||||||
<p>
|
|
||||||
Once you confirm this order, you will not be able to modify it. Please review carefully before confirming.
|
|
||||||
</p>
|
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close" />
|
|
||||||
</div>
|
|
||||||
<div class="checkout-actions d-grid gap-3" id="checkout-form-labels">
|
<div class="checkout-actions d-grid gap-3" id="checkout-form-labels">
|
||||||
<button class="btn btn-success btn-lg" id="confirm-order-btn" t-attf-data-order-id="{{ group_order.id }}" data-confirmed-label="Order saved as draft" data-pickup-label="Pickup Day" aria-label="Save order as draft" data-bs-title="Save Draft" data-bs-toggle="tooltip">
|
<button class="btn btn-success btn-lg" id="confirm-order-btn" t-attf-data-order-id="{{ group_order.id }}" data-confirmed-label="Order saved as draft" data-pickup-label="Pickup Day" aria-label="Save order as draft" data-bs-title="Save Draft" data-bs-toggle="tooltip">
|
||||||
<i class="fa fa-save" aria-hidden="true" t-translation="off" />
|
<i class="fa fa-save" aria-hidden="true" t-translation="off" />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue