[FIX] website_sale_aplicoop: move cart before products
This commit is contained in:
parent
496e8918cb
commit
2caf7673d7
1 changed files with 34 additions and 32 deletions
|
|
@ -267,6 +267,34 @@
|
|||
</t>
|
||||
</div>
|
||||
<div class="row g-2">
|
||||
<div class="col-lg-3 mb-4 mb-lg-0">
|
||||
<div class="card sticky-top cart-sticky-position" aria-label="Cart Summary">
|
||||
<div class="card-header d-flex justify-content-between align-items-center gap-1">
|
||||
<h6 class="mb-0 cart-title-sm" id="cart-title">My Cart</h6>
|
||||
<div class="btn-group cart-btn-group gap-0" role="group">
|
||||
<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" />
|
||||
</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" t-att-aria-label="_('Toggle home delivery')" t-att-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">
|
||||
<i class="fa fa-check cart-icon-size" aria-hidden="true" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body cart-body-lg" id="cart-items-container" t-attf-data-order-id="{{ group_order.id }}" aria-labelledby="cart-title" aria-live="polite" aria-relevant="additions removals">
|
||||
<p class="text-muted">This order's cart is empty</p>
|
||||
</div>
|
||||
<div class="card-footer bg-white text-center">
|
||||
<a t-attf-href="/eskaera/{{ group_order.id }}/checkout" class="btn btn-success checkout-btn-lg" data-bs-title="Proceed to Checkout" data-bs-toggle="tooltip">
|
||||
Proceed to Checkout
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-9">
|
||||
<div class="oe_structure oe_empty" data-name="Before Products Filter" />
|
||||
<t t-if="products">
|
||||
|
|
@ -298,34 +326,6 @@
|
|||
</t>
|
||||
<div class="oe_structure oe_empty mt-4" data-name="After Products" />
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="card sticky-top cart-sticky-position" aria-label="Cart Summary">
|
||||
<div class="card-header d-flex justify-content-between align-items-center gap-1">
|
||||
<h6 class="mb-0 cart-title-sm" id="cart-title">My Cart</h6>
|
||||
<div class="btn-group cart-btn-group gap-0" role="group">
|
||||
<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" />
|
||||
</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">
|
||||
<i class="fa fa-check cart-icon-size" aria-hidden="true" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body cart-body-lg" id="cart-items-container" t-attf-data-order-id="{{ group_order.id }}" aria-labelledby="cart-title" aria-live="polite" aria-relevant="additions removals">
|
||||
<p class="text-muted">This order's cart is empty</p>
|
||||
</div>
|
||||
<div class="card-footer bg-white text-center">
|
||||
<a t-attf-href="/eskaera/{{ group_order.id }}/checkout" class="btn btn-success checkout-btn-lg" data-bs-title="Proceed to Checkout" data-bs-toggle="tooltip">
|
||||
Proceed to Checkout
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -489,9 +489,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<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 }}" t-att-data-confirmed-label="_('Order saved as draft')" t-att-data-pickup-label="_('Pickup Day')" t-att-aria-label="_('Save order as draft')" t-att-data-bs-title="_('Save Draft')" data-bs-toggle="tooltip">
|
||||
<i class="fa fa-save" aria-hidden="true" t-translation="off" />
|
||||
<span>Save Draft</span>
|
||||
<span t-esc="_('Save Draft')" />
|
||||
</button>
|
||||
<a t-attf-href="/eskaera/{{ group_order.id }}" class="btn btn-outline-secondary btn-lg" aria-label="Back to cart page" data-bs-title="Back to Cart" data-bs-toggle="tooltip">
|
||||
<i class="fa fa-arrow-left" aria-hidden="true" t-translation="off" />
|
||||
|
|
@ -636,6 +636,8 @@
|
|||
<t t-set="safe_uom_category" t-value="product_display_info.get(product.id, {}).get('safe_uom_category', '')" />
|
||||
<t t-set="quantity_step" t-value="product_display_info.get(product.id, {}).get('quantity_step', 1)" />
|
||||
<t t-set="order_id_safe" t-value="group_order.id if group_order else ''" />
|
||||
<t t-set="out_of_stock_label" t-value="_('Out of stock')" />
|
||||
<t t-set="add_to_cart_label" t-value="_('Add %(product_name)s to cart') % {'product_name': product.name}" />
|
||||
<form
|
||||
class="add-to-cart-form"
|
||||
t-attf-data-order-id="{{ order_id_safe }}"
|
||||
|
|
@ -660,8 +662,8 @@
|
|||
class="add-to-cart-btn"
|
||||
type="button"
|
||||
t-att-data-out-of-stock="'true' if product.is_out_of_stock else 'false'"
|
||||
t-attf-aria-label="{{ 'Out of stock' if product.is_out_of_stock else 'Add %s to cart' % product.name }}"
|
||||
t-attf-title="{{ 'Out of stock' if product.is_out_of_stock else 'Add %s to cart' % product.name }}"
|
||||
t-att-aria-label="out_of_stock_label if product.is_out_of_stock else add_to_cart_label"
|
||||
t-att-title="out_of_stock_label if product.is_out_of_stock else add_to_cart_label"
|
||||
>
|
||||
<i t-attf-class="fa {{ 'fa-ban text-muted' if product.is_out_of_stock else 'fa-shopping-cart' }}" aria-hidden="true" />
|
||||
</button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue