From 84f86370eb4559668ba7dd2fcc237021201a948a Mon Sep 17 00:00:00 2001 From: Stacy Date: Mon, 26 Feb 2024 18:11:53 +0800 Subject: [PATCH] product page enhancement and vendor dashboard --- checkouttest.php | 6 +- header.php | 8 +-- product-left-sidebar.php | 143 +++++++++++++++++++++++---------------- vendor-dashboard.php | 12 ++-- vendor-settings.php | 8 ++- 5 files changed, 106 insertions(+), 71 deletions(-) diff --git a/checkouttest.php b/checkouttest.php index 6a07a4f..f0ad9e4 100644 --- a/checkouttest.php +++ b/checkouttest.php @@ -605,7 +605,8 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"] Subtotal: -
+ + +
diff --git a/header.php b/header.php index 71d2a17..3477429 100644 --- a/header.php +++ b/header.php @@ -977,15 +977,15 @@
  • Top Collection
  • Categories
  • -
  • Offers
  • +
  • Top Vendors
  • Services
  • New Arrivals
  • -
  • Client - Review
  • -
  • Instagram Feed
  • + + diff --git a/product-left-sidebar.php b/product-left-sidebar.php index 1e39dd0..0c7ec8f 100644 --- a/product-left-sidebar.php +++ b/product-left-sidebar.php @@ -320,7 +320,9 @@ if (isset($_GET['id'])) { $productImage = $i; } ?> - + + + -
    + +
    -
    + + +
    As low as @@ -397,32 +402,32 @@ if (isset($_GET['id'])) {
      - -
    • - product - -

      - -
    • -
      + $main_product_image = isset($product_details["product_image"]) ? $product_details["product_image"] : 'https://upload.wikimedia.org/wikipedia/commons/6/65/No-Image-Placeholder.svg'; + ?> + +
    • + product + +

      + +
    • +
      - $variation) { - $variationImage = isset($variation["product_image"]) ? $variation["product_image"] : 'https://upload.wikimedia.org/wikipedia/commons/6/65/No-Image-Placeholder.svg'; -?> - -
    • - product - -

      - -
    • -
      - + $variation) { + $variationImage = isset($variation["product_image"]) ? $variation["product_image"] : 'https://upload.wikimedia.org/wikipedia/commons/6/65/No-Image-Placeholder.svg'; + ?> + +
    • + product + +

      + +
    • +
      +
    @@ -462,35 +467,57 @@ foreach ($variation_details as $index => $variation) { - + +
    -
    -
    -
    - " id="qty-input" /> -
    +
    -
    - -
    +
    + + +
    Add To Cart'; - echo ''; - } else { - if (!empty($product_details['regular_price']) || !empty($product_details['sale_price'])) { - echo '
    '; - echo ''; - } else { - echo ''; - } - } - } else { - echo '

    Please log in to add to cart.

    '; - } -?> + if ($_SESSION["isLoggedIn"]) { + if ($product_details['product_type'] === "variable") { + echo '
    -
    '; + echo ''; + echo '
    +
    '; + echo '
    '; + echo '
    + +
    '; + + } else { + if (!empty($product_details['regular_price']) || !empty($product_details['sale_price'])) { + echo '
    -
    '; + echo ''; + echo '
    +
    '; + echo '
    '; + echo ''; + echo '
    + +
    '; + } else { + echo ''; + } + } + } else { + echo ''; + } + ?> + + + @@ -509,10 +536,9 @@ foreach ($variation_details as $index => $variation) { // echo '

    Please log in to add to cart.

    '; // } ?> --> +
    - - diff --git a/vendor-settings.php b/vendor-settings.php index 3758f5f..b02ec41 100644 --- a/vendor-settings.php +++ b/vendor-settings.php @@ -144,12 +144,16 @@ if ($_SESSION["userId"] <> "") {
    -
    +
    - alt="vendor image"> + + + alt="vendor image">