aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKumar Priyansh <[email protected]>2019-06-03 06:23:12 +0530
committerKumar Priyansh <[email protected]>2019-06-03 06:23:12 +0530
commit2711412efe2b75342180e2cef4a52371ded3627f (patch)
treef186823ba96048f63ddcd6d8d2df3024c5349b5c
parent33d5841b58e2c7f8b69e07c404da809060f3dad6 (diff)
downloadfirebase-ecommerce-2711412efe2b75342180e2cef4a52371ded3627f.tar.xz
firebase-ecommerce-2711412efe2b75342180e2cef4a52371ded3627f.zip
Updated Empty Cart Function
-rw-r--r--dashboard/cart/index.html2
-rw-r--r--shared/cart.js5
2 files changed, 6 insertions, 1 deletions
diff --git a/dashboard/cart/index.html b/dashboard/cart/index.html
index 0771d44..d14a5ef 100644
--- a/dashboard/cart/index.html
+++ b/dashboard/cart/index.html
@@ -67,7 +67,7 @@
<h2 class="title">Firebase ECommerce</h2>
<button id="cart">View Dashboard</button>
<button id="signout">Signout</button>
- <div id="loader"></div>
+ <div id="loader">Loading Cart ...</div>
<script src="../../shared/jquery.js"></script>
<script src="https://www.gstatic.com/firebasejs/6.1.0/firebase.js"></script>
<script src="../../shared/firebaseConfig.js"></script>
diff --git a/shared/cart.js b/shared/cart.js
index 8393565..4d7b8ea 100644
--- a/shared/cart.js
+++ b/shared/cart.js
@@ -38,6 +38,11 @@ $(document).ready(function(){
showEmptyCart();
}
});
+
+ function showEmptyCart() {
+ $('#loader').html('<h1>Your Cart is Empty</h1><p>Click <a href="../">here</a> to shop for some products.</p>');
+ showAlert('Your cart is empty. Go add something.')
+ }
});