diff --git a/assets/favourites-page/favourite.html b/assets/favourites-page/favourite.html index 9891c88..987c408 100644 --- a/assets/favourites-page/favourite.html +++ b/assets/favourites-page/favourite.html @@ -93,9 +93,9 @@
nishchalb21@gmail.com
- + + - - + \ No newline at end of file diff --git a/assets/favourites-page/favourite.js b/assets/favourites-page/favourite.js index 3f2e354..9914e04 100644 --- a/assets/favourites-page/favourite.js +++ b/assets/favourites-page/favourite.js @@ -1,12 +1,12 @@ // Import wishlistData object containing the wishlistProducts array -import { wishlistData } from './wishlist.js'; -console.log(wishlistData); +import { wishlistData } from '../wishlist.js'; document.addEventListener('DOMContentLoaded', () => { const containerWished = document.getElementById("container-wished-products"); - const wishlistProducts = wishlistData.wishProducts || []; // Use the imported wishlistProducts array + const wishlistProducts = wishlistData.products || []; // Use the imported wishlistProducts array - wishlistProducts.forEach((wishproductCard) => { - containerWished.appendChild(wishproductCard); // Assuming wishproductCard is the product card element - }); + console.log(wishlistProducts); + // wishlistProducts.forEach((wishproductCard) => { + // containerWished.appendChild(wishproductCard); // Assuming wishproductCard is the product card element + // }); }); diff --git a/assets/favourites-page/headerswish.js b/assets/favourites-page/headerswish.js new file mode 100644 index 0000000..e69de29 diff --git a/assets/headers.js b/assets/headers.js new file mode 100644 index 0000000..6903971 --- /dev/null +++ b/assets/headers.js @@ -0,0 +1,26 @@ +// Inserting the top header +const headerTop = document.querySelector("#header-top"); +headerTop.innerHTML = ` +
+ + + + +
+
FREE SHIPPING THIS WEEK ORDER OVER - Rs.550
+
become a seller
`; + +// Inserting header bottom +const headerBottom = document.getElementById("header-bottom"); +headerBottom.innerHTML = ` +

Shopiji

+ + `; + diff --git a/assets/index.js b/assets/index.js index c2054dc..5bd97c3 100644 --- a/assets/index.js +++ b/assets/index.js @@ -1,30 +1,3 @@ -// Inserting the top header -const headerTop = document.querySelector("#header-top"); -headerTop.innerHTML = ` -
- - - - -
-
FREE SHIPPING THIS WEEK ORDER OVER - Rs.550
-
become a seller
`; - -// Inserting header bottom -const headerBottom = document.getElementById("header-bottom"); -headerBottom.innerHTML = ` -

Shopiji

- - `; - - // product card creation const productsContainer = document.querySelector("#products-cards-list"); diff --git a/assets/wishlist.js b/assets/wishlist.js index 7420c2b..b81257e 100644 --- a/assets/wishlist.js +++ b/assets/wishlist.js @@ -7,6 +7,8 @@ document.addEventListener('DOMContentLoaded', () => { element.addEventListener("click", (e) => { let wishedProduct = e.target.parentNode.closest(".product-card"); wishlistProducts.push(wishedProduct); + console.log("pushed"); + console.log(wishlistProducts); // Save wishlistProducts to localStorage localStorage.setItem('wishlist', JSON.stringify(wishlistProducts)); }); diff --git a/index.html b/index.html index 622f10c..e278582 100644 --- a/index.html +++ b/index.html @@ -159,9 +159,10 @@
nishchalb21@gmail.com
+ - - + +