Fix: Restore website functionality - all pages and APIs working
This commit is contained in:
@@ -359,7 +359,11 @@
|
||||
if (cartBadge) {
|
||||
const count = this.getCartCount();
|
||||
cartBadge.textContent = count;
|
||||
cartBadge.style.display = count > 0 ? "flex" : "none";
|
||||
if (count > 0) {
|
||||
cartBadge.classList.add("show");
|
||||
} else {
|
||||
cartBadge.classList.remove("show");
|
||||
}
|
||||
}
|
||||
|
||||
// Update wishlist badge
|
||||
@@ -367,7 +371,11 @@
|
||||
if (wishlistBadge) {
|
||||
const count = this.wishlist.length;
|
||||
wishlistBadge.textContent = count;
|
||||
wishlistBadge.style.display = count > 0 ? "flex" : "none";
|
||||
if (count > 0) {
|
||||
wishlistBadge.classList.add("show");
|
||||
} else {
|
||||
wishlistBadge.classList.remove("show");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -463,14 +471,14 @@
|
||||
const footer = document.querySelector("#cartPanel .dropdown-foot");
|
||||
if (!footer) return;
|
||||
|
||||
if (total === 0) {
|
||||
if (total === 0 || total === null) {
|
||||
footer.innerHTML =
|
||||
'<a href="/shop" class="btn-outline">Continue Shopping</a>';
|
||||
} else {
|
||||
footer.innerHTML = `
|
||||
<div class="cart-total">
|
||||
<span>Total:</span>
|
||||
<strong>$${total.toFixed(2)}</strong>
|
||||
<strong>${window.Utils.formatCurrency(total)}</strong>
|
||||
</div>
|
||||
<a href="/shop" class="btn-text">Continue Shopping</a>
|
||||
<button class="btn-primary-full" onclick="alert('Checkout coming soon!')">
|
||||
|
||||
Reference in New Issue
Block a user