mirror of
https://github.com/myronblair/tomsjavajive
synced 2026-06-30 17:50:32 -05:00
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:
@@ -162,15 +162,7 @@ $total = $subtotal + $shippingCost;
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
function updateCartDisplay(data) {
|
function updateCartDisplay(data) {
|
||||||
if (data.cart_items && data.cart_items.length === 0) {
|
location.reload();
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user