diff --git a/src/Pages/Shop.js b/src/Pages/Shop.js index 8779e0d..d915314 100644 --- a/src/Pages/Shop.js +++ b/src/Pages/Shop.js @@ -813,6 +813,12 @@ function Shop() { ref.current.scrollIntoView({ behavior: "smooth", block: "start" }); } }; + + + const handleAddToCart = (product) => { + dispatch(addToCart(product)); + toast.success(`₹{product.name} added to cart!`); + const toggleHeart = (product) => { const isInWishlist = wishlistItems.some(item => item.id === product.id); @@ -824,6 +830,7 @@ function Shop() { dispatch(addToWishlist(product)); toast.success(`${product.name} added to wishlist!`, { autoClose: 2000 }); } + }; @@ -969,10 +976,17 @@ function Shop() { }} > + className={`fa-heart ${ wishlistItems.some(item => item.id === product.id) ? "fas" : "far" }`} > + {product.name} + + ₹{product.price.toFixed(2)} + handleAddToCart(product)}> + Add to Cart + + handleAddToCart(product)}> + Buy Now + + ${product.price.toFixed(2)} + ))} diff --git a/src/Pages/cake.js b/src/Pages/cake.js index 4117041..1c757de 100644 --- a/src/Pages/cake.js +++ b/src/Pages/cake.js @@ -331,7 +331,7 @@ function Cake() { {product.name} - ${product.price.toFixed(2)} + ₹{product.price.toFixed(2)} {!quantities[product.id] ? ( <> handleAddToCart(product)}> diff --git a/src/Pages/cart.js b/src/Pages/cart.js index fafbc0e..a0a6ed9 100644 --- a/src/Pages/cart.js +++ b/src/Pages/cart.js @@ -183,7 +183,7 @@ function Cart() { {item.name} - ${item.price.toFixed(2)} + ₹{item.price.toFixed(2)} Total: - ${totalPrice.toFixed(2)} + ₹{totalPrice.toFixed(2)} SGST (9%): - ${SGST.toFixed(2)} + ₹{SGST.toFixed(2)} CGST (9%): - ${CGST.toFixed(2)} + ₹{CGST.toFixed(2)} Final Price: - ${finalPrice.toFixed(2)} + ₹{finalPrice.toFixed(2)} diff --git a/src/Pages/checkOut.js b/src/Pages/checkOut.js index 69a64fc..3258f1f 100644 --- a/src/Pages/checkOut.js +++ b/src/Pages/checkOut.js @@ -135,7 +135,7 @@ function Checkout() { {cartItems.map((item) => ( {item.name} x {item.quantity} - ${(item.price * item.quantity).toFixed(2)} + ₹{(item.price * item.quantity).toFixed(2)} ))} Total: ${totalPrice.toFixed(2)} diff --git a/src/Pages/coffee.js b/src/Pages/coffee.js index e7522b7..5f31d7d 100644 --- a/src/Pages/coffee.js +++ b/src/Pages/coffee.js @@ -435,7 +435,7 @@ function Coffee() { {product.name} - ${product.price.toFixed(2)} + ₹{product.price.toFixed(2)} {!quantities[product.id] ? ( handleAddToCart(product)}> Add to Cart diff --git a/src/Pages/favorites.js b/src/Pages/favorites.js index cae391e..a3dc544 100644 --- a/src/Pages/favorites.js +++ b/src/Pages/favorites.js @@ -158,7 +158,7 @@ function Favorites() { {item.name} - ${item.price} + ₹{item.price} removeFromFavorites(item.id)} diff --git a/src/Pages/milkshake.js b/src/Pages/milkshake.js index 2a02fe1..a2557d6 100644 --- a/src/Pages/milkshake.js +++ b/src/Pages/milkshake.js @@ -304,14 +304,14 @@ function Milkshake() { }} > {product.name} - ${product.price.toFixed(2)} + ₹{product.price.toFixed(2)} {!quantities[product.id] ? ( handleAddToCart(product)}> Add to Cart diff --git a/src/Pages/soup.js b/src/Pages/soup.js index 0c26ed6..21dc02b 100644 --- a/src/Pages/soup.js +++ b/src/Pages/soup.js @@ -267,14 +267,14 @@ function Soup() { }} > {product.name} - ${product.price.toFixed(2)} + ₹{product.price.toFixed(2)} {!quantities[product.id] ? ( handleAddToCart(product)}> Add to Cart
{item.name} x {item.quantity}
${(item.price * item.quantity).toFixed(2)}
₹{(item.price * item.quantity).toFixed(2)}
${item.price}
₹{item.price}