[FIX] website_sale_aplicoop: enable add to cart
This commit is contained in:
parent
130a5ff6c4
commit
d58c621ef1
1 changed files with 5 additions and 8 deletions
|
|
@ -150,7 +150,7 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
(function() {
|
(function() {
|
||||||
'use strict';
|
'use strict';
|
||||||
console.log('[eskaera_page] Loading translated labels for category selector');
|
// console.log('[eskaera_page] Loading translated labels for category selector');
|
||||||
|
|
||||||
// Fetch translated labels from endpoint
|
// Fetch translated labels from endpoint
|
||||||
fetch('/eskaera/labels', {
|
fetch('/eskaera/labels', {
|
||||||
|
|
@ -162,13 +162,13 @@
|
||||||
})
|
})
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(labels => {
|
.then(labels => {
|
||||||
console.log('[eskaera_page] Labels received:', labels);
|
//console.log('[eskaera_page] Labels received:', labels);
|
||||||
|
|
||||||
// Update category selector first option text
|
// Update category selector first option text
|
||||||
var categorySelect = document.getElementById('realtime-category-select');
|
var categorySelect = document.getElementById('realtime-category-select');
|
||||||
if (categorySelect && categorySelect.options[0] && labels && labels.all_categories) {
|
if (categorySelect && categorySelect.options[0] && labels && labels.all_categories) {
|
||||||
categorySelect.options[0].text = labels.all_categories;
|
categorySelect.options[0].text = labels.all_categories;
|
||||||
console.log('[eskaera_page] Updated category selector to:', labels.all_categories);
|
// console.log('[eskaera_page] Updated category selector to:', labels.all_categories);
|
||||||
} else {
|
} else {
|
||||||
console.log('[eskaera_page] Could not update category selector');
|
console.log('[eskaera_page] Could not update category selector');
|
||||||
console.log(' categorySelect:', !!categorySelect);
|
console.log(' categorySelect:', !!categorySelect);
|
||||||
|
|
@ -212,7 +212,7 @@
|
||||||
</template>
|
</template>
|
||||||
<template id="eskaera_shop" name="Eskaera Shop">
|
<template id="eskaera_shop" name="Eskaera Shop">
|
||||||
<t t-call="website.layout">
|
<t t-call="website.layout">
|
||||||
<div id="wrap" class="eskaera-shop-page oe_structure oe_empty" data-name="Eskaera Shop" t-attf-data-delivery-product-id="{{ delivery_product_id }}" t-attf-data-delivery-product-name="{{ delivery_product_name }}" t-attf-data-delivery-product-price="{{ delivery_product_price }}" t-attf-data-home-delivery-enabled="{{ 'true' if group_order.home_delivery else 'false' }}">
|
<div id="wrap" class="eskaera-shop-page oe_structure oe_empty" data-name="Eskaera Shop" t-attf-data-delivery-product-id="{{ delivery_product_id or '' }}" t-attf-data-delivery-product-name="{{ delivery_product_name or '' }}" t-attf-data-delivery-product-price="{{ delivery_product_price or '' }}" t-attf-data-home-delivery-enabled="{{ 'true' if group_order.home_delivery else 'false' }}">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row mb-4">
|
<div class="row mb-4">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
|
|
@ -346,9 +346,6 @@
|
||||||
<div class="card-header d-flex justify-content-between align-items-center gap-1">
|
<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>
|
<h6 class="mb-0 cart-title-sm" id="cart-title">My Cart</h6>
|
||||||
<div class="btn-group cart-btn-group gap-0" role="group">
|
<div class="btn-group cart-btn-group gap-0" role="group">
|
||||||
<button type="button" class="btn btn-warning cart-btn-compact" id="home-delivery-btn" t-attf-data-order-id="{{ group_order.id }}" data-bs-title="Home Delivery" data-bs-toggle="tooltip">
|
|
||||||
<i class="fa fa-truck cart-icon-size" />
|
|
||||||
</button>
|
|
||||||
<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>
|
||||||
|
|
@ -685,7 +682,7 @@
|
||||||
<button class="qty-increase" type="button" t-attf-data-product-id="{{ product.id }}" aria-label="Increase quantity">
|
<button class="qty-increase" type="button" t-attf-data-product-id="{{ product.id }}" aria-label="Increase quantity">
|
||||||
<i class="fa fa-plus" />
|
<i class="fa fa-plus" />
|
||||||
</button>
|
</button>
|
||||||
<button t-attf-class="add-to-cart-btn {{ 'btn-disabled' if product.is_out_of_stock else '' }}" type="button" t-attf-disabled="{{ 'disabled' if product.is_out_of_stock else '' }}" 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 }}">
|
<button t-attf-class="add-to-cart-btn {{ 'btn-disabled' if product.is_out_of_stock else '' }}" type="button" t-att-disabled="product.is_out_of_stock or None" 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 }}">
|
||||||
<i t-attf-class="fa {{ 'fa-ban' if product.is_out_of_stock else 'fa-shopping-cart' }}" aria-hidden="true" />
|
<i t-attf-class="fa {{ 'fa-ban' if product.is_out_of_stock else 'fa-shopping-cart' }}" aria-hidden="true" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue