diff --git a/about-us.php b/about-us.php index 04b7976..7be0321 100644 --- a/about-us.php +++ b/about-us.php @@ -183,7 +183,7 @@ -
+ -
+ @@ -437,7 +437,7 @@ -
+ diff --git a/admin/login.php b/admin/login.php index f3565b9..4577757 100644 --- a/admin/login.php +++ b/admin/login.php @@ -31,7 +31,8 @@ if ($_SESSION["isLoggedIn"] == true and $_SESSION["user_type"] == "admin"){ - + + diff --git a/admin/order-history.php b/admin/order-history.php index 5846190..f3b9085 100644 --- a/admin/order-history.php +++ b/admin/order-history.php @@ -46,7 +46,8 @@ $allorders = json_encode($orders, true); - + + diff --git a/header.php b/header.php index 27c737d..2d002dc 100644 --- a/header.php +++ b/header.php @@ -140,6 +140,8 @@ if ($_SESSION["userId"] <> "") { line-height: 1; } + +
@@ -180,6 +182,7 @@ if ($_SESSION["userId"] <> "") {
+ +
@@ -308,6 +312,7 @@ if ($_SESSION["userId"] <> "") {
+
@@ -428,19 +433,30 @@ if ($_SESSION["userId"] <> "") {
- + + + Unit Price:
Subtotal:
-
-
-
- -
+
+
+
- +
+ +
+ +
- + + +
diff --git a/product-left-sidebar.php b/product-left-sidebar.php index 2849855..996e769 100644 --- a/product-left-sidebar.php +++ b/product-left-sidebar.php @@ -490,25 +490,31 @@ if (isset($_GET['id'])) { $product_price = (!empty($product_details['sale_price'])) ? $product_details['sale_price'] : $product_details['regular_price'] ; if ($_SESSION["isLoggedIn"]) { if ($product_details['product_type'] === "variable") { - echo '
-
'; + echo '
-
'; echo ''; - echo '
+
'; - echo '
'; + echo '" id="qty-input" />'; + echo '
+
'; + echo '
'; echo ''; echo '
'; } else { if (!empty($product_details['regular_price']) || !empty($product_details['sale_price'])) { - echo '
-
'; + echo '
-
'; echo ''; - echo '
+
'; - // echo '
'; - echo '
'; + echo '" id="qty-input" />'; + echo '
+
'; + echo '
'; echo '
'; @@ -518,7 +524,8 @@ if (isset($_GET['id'])) { } } else { echo ''; + echo '
'; } ?> -
-
-
- -
+
- -
- -
- `; + + product + +
+ ${response.items[0].product.name} + + Unit Price: ${response.items[0].price} + + Subtotal: ${totalAmount} + +
+
-
+ +
+
+ + +
+ +
+ `; getLatestOrders() updateCartItemCount() cartList.appendChild(newOrder); @@ -1166,23 +1177,29 @@ if (isset($_GET['id'])) { var totalAmount = response.items[0].price * updatedQuantity; // 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} + +
+
-
+ +
+
+ + +
+ +
+ `; 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/user-profile.php b/user-profile.php index e7d66fb..334725b 100644 --- a/user-profile.php +++ b/user-profile.php @@ -250,7 +250,7 @@ if ($_SESSION["isVendor"] == true) { diff --git a/vendor-settings.php b/vendor-settings.php index e81fa6c..3d976e4 100644 --- a/vendor-settings.php +++ b/vendor-settings.php @@ -21,6 +21,12 @@ if ($_SESSION["userId"] <> "") { $_SESSION["isLoggedIn"] = false; header("location: login.php"); } + +if ($_SESSION["isCustomer"] == true) { + header("location: user-profile.php"); +} + + ?> @@ -220,7 +226,7 @@ if ($_SESSION["userId"] <> "") {
-
Contact number
+
Contact nubmer
@@ -298,7 +304,7 @@ if ($_SESSION["userId"] <> "") { @@ -513,7 +519,7 @@ if ($_SESSION["userId"] <> "") {