[FIX] website_sale: 0.00 total is showing in empty cart if logged in
Before this commit, if you go on /shop/cart and your cart is empty, it will show the total (Subtotal, Taxes, Total) as $ 0.00. Indeed, the code is retrieving a 'sale.order' if you are connected and you already have a draft sale order on DB (eg: you just add something to cart and emptied it afterward). - Add product to your cart and proceed to checkout - On checkout cart, remove the product, your cart is now empty - Reload the page (you should still be on /shop/cart) or go to /shop/cart - You now see the zero prices (Subtotal, Taxes, Total) Now, we will hide this if you have an order but no line on that order. This closes #20896
This commit is contained in:
@@ -1396,7 +1396,7 @@
|
||||
|
||||
<!-- Page Shop my cart and payment total -->
|
||||
<template id="total">
|
||||
<div id="cart_total" t-if="website_sale_order">
|
||||
<div id="cart_total" t-if="website_sale_order and website_sale_order.website_order_line">
|
||||
<div class="row" id="order_total_untaxed">
|
||||
<span class="col-xs-6 text-right text-muted">Subtotal:</span>
|
||||
<span class="col-xs-6 text-left text-muted">
|
||||
|
||||
Reference in New Issue
Block a user