From 8982f54971c3d48b055c91105e77abd575370acf Mon Sep 17 00:00:00 2001 From: raymart Date: Thu, 29 Feb 2024 15:05:09 +0800 Subject: [PATCH] index files; improve the CSS styles for the Product Image to ensure uniformity --- assets/js/{tester10.js => tester11.js} | 34 +++++++++--------- catalog-single-vendor.php | 5 +-- index.php | 48 ++++++++++++++++---------- product-left-sidebar.php | 2 +- same_day_delivery.php | 2 +- shop-list-left-sidebar.php | 14 ++++---- vendor-list.php | 6 ++-- 7 files changed, 64 insertions(+), 47 deletions(-) rename assets/js/{tester10.js => tester11.js} (94%) diff --git a/assets/js/tester10.js b/assets/js/tester11.js similarity index 94% rename from assets/js/tester10.js rename to assets/js/tester11.js index 09875d9..3560698 100644 --- a/assets/js/tester10.js +++ b/assets/js/tester11.js @@ -681,23 +681,23 @@ function popupAddToCart(product, productVendor, token, email, password, customer // If the cart item already exists, update its content using innerHTML cartItem.innerHTML = ` - -product - -
-${response.items[0].product.name} - -Unit Price: ${response.items[0].price} - -Subtotal: ${totalAmount} -
-
-
- -
+
-
-x -
-`; + + product + +
+ ${response.items[0].product.name} + + Unit Price: ${response.items[0].price} + + Subtotal: ${totalAmount} + // raymart feb 26 2024 +
+
-
+ +
+
+ +
+ `; document.getElementById(`qty-input-${response.items[0]._id}`).value = updatedQuantity; } else { // If the cart item doesn't exist, create a new one diff --git a/catalog-single-vendor.php b/catalog-single-vendor.php index c9b3e87..2c56d2b 100644 --- a/catalog-single-vendor.php +++ b/catalog-single-vendor.php @@ -97,6 +97,7 @@ if ($_SESSION["userId"] <> "") {
+
@@ -228,7 +229,7 @@ if ($_SESSION["userId"] <> "") {
-
+
@@ -1114,7 +1115,7 @@ if ($_SESSION["userId"] <> "") { '; + echo ''; } else { echo ''; } diff --git a/index.php b/index.php index 585ec0e..6a19e28 100644 --- a/index.php +++ b/index.php @@ -225,7 +225,9 @@ if ($_SESSION["userId"] <> "") { ?>
-
+ +
+
"> @@ -235,7 +237,7 @@ if ($_SESSION["userId"] <> "") { if (!empty($image_urls)) { $first_image_url = trim($image_urls[0]); ?> - edit + edit "") { --> -
+
@@ -328,7 +330,9 @@ if ($_SESSION["userId"] <> "") { ?>
-
+ +
+
"> @@ -338,7 +342,7 @@ if ($_SESSION["userId"] <> "") { if (!empty($image_urls)) { $first_image_url = trim($image_urls[0]); ?> - edit + edit "") { -
+ @@ -433,7 +437,9 @@ if ($_SESSION["userId"] <> "") { ?>
-
+ +
+
"> @@ -443,7 +449,7 @@ if ($_SESSION["userId"] <> "") { if (!empty($image_urls)) { $first_image_url = trim($image_urls[0]); ?> - edit + edit "") { --> -
+
@@ -536,7 +542,9 @@ if ($_SESSION["userId"] <> "") { ?>
-
+ +
+
"> @@ -546,7 +554,7 @@ if ($_SESSION["userId"] <> "") { if (!empty($image_urls)) { $first_image_url = trim($image_urls[0]); ?> - edit + edit "") { --> -
+
@@ -985,7 +993,7 @@ if ($_SESSION["userId"] <> "") {
-
+
vendor img
@@ -1013,7 +1021,9 @@ if ($_SESSION["userId"] <> "") { $randomProducts = array_slice($vendorProducts, 0, 4); foreach ($randomProducts as $product) { ?> -
+ +
+ ">product img
@@ -1142,7 +1152,9 @@ if ($_SESSION["userId"] <> "") { ?>
-
+ +
+
"> @@ -1152,7 +1164,7 @@ if ($_SESSION["userId"] <> "") { if (!empty($image_urls)) { $first_image_url = trim($image_urls[0]); ?> - edit + edit "") { " alt="Product" /> --> -
+
@@ -1819,7 +1831,7 @@ if ($_SESSION["userId"] <> "") { '; + echo ''; } else { echo ''; } diff --git a/product-left-sidebar.php b/product-left-sidebar.php index b4ffbf2..953f918 100644 --- a/product-left-sidebar.php +++ b/product-left-sidebar.php @@ -1945,7 +1945,7 @@ if (isset($_GET['id'])) { '; + echo ''; } else { echo ''; } diff --git a/same_day_delivery.php b/same_day_delivery.php index 95416dc..bda04b7 100644 --- a/same_day_delivery.php +++ b/same_day_delivery.php @@ -900,7 +900,7 @@ if ($_SESSION["userId"] <> "") { '; + echo ''; } else { echo ''; } diff --git a/shop-list-left-sidebar.php b/shop-list-left-sidebar.php index 64e7732..67d7980 100644 --- a/shop-list-left-sidebar.php +++ b/shop-list-left-sidebar.php @@ -170,6 +170,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
+ @@ -337,13 +338,14 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate Product -->
- - + +
-
">
+ +
" style="width: 90%; text-wrap: wrap;">
0) : ?> @@ -773,7 +775,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate -
+ @@ -1000,7 +1002,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate '; + echo ''; } else { echo ''; } diff --git a/vendor-list.php b/vendor-list.php index 3897c62..efd4ef4 100644 --- a/vendor-list.php +++ b/vendor-list.php @@ -71,6 +71,7 @@ $products = productList();
+
@@ -189,8 +190,9 @@ $products = productList(); ?>
-
-
+ +
+