Fix cart quantity update: reload page to reflect accurate totals

Partial DOM update was missing item row totals, shipping recalc, and
grand total. Reload ensures all numbers are always correct.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-14 20:29:31 +00:00
parent ca2f612421
commit ecf5a7ab67
+1 -9
View File
@@ -162,15 +162,7 @@ $total = $subtotal + $shippingCost;
<script>
function updateCartDisplay(data) {
if (data.cart_items && data.cart_items.length === 0) {
location.reload();
}
if (data.subtotal !== undefined) {
document.getElementById('cart-subtotal').textContent = '$' + parseFloat(data.subtotal).toFixed(2);
}
if (data.total !== undefined) {
document.getElementById('cart-total').textContent = '$' + parseFloat(data.total).toFixed(2);
}
location.reload();
}
</script>