[FIX] website_sale: hide checkout btn on emptied cart in all languages
When an user goes to its cart and removes all the items, the checkout button is hidden so that the user cannot start an order with no product. This behavior was not working in languages which are not the default language of the website, as the button was found in JS relying on the fact it started by "/shop/checkout", while it can be something like "/fr_FR/shop/checkout". Closes https://github.com/odoo/odoo/issues/21722
This commit is contained in:
@@ -190,7 +190,7 @@ $('.oe_website_sale').each(function () {
|
||||
}
|
||||
else {
|
||||
$q.parent().parent().addClass("hidden");
|
||||
$('a[href^="/shop/checkout"]').addClass("hidden")
|
||||
$('a[href*="/shop/checkout"]').addClass("hidden");
|
||||
}
|
||||
$q.html(data.cart_quantity).hide().fadeIn(600);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user