diff --git a/footer.php b/footer.php index 27ddb86..06eaa3c 100644 --- a/footer.php +++ b/footer.php @@ -140,10 +140,10 @@ diff --git a/header.php b/header.php index dfe6f6d..4d348aa 100644 --- a/header.php +++ b/header.php @@ -379,7 +379,6 @@ if ($_SESSION["userId"] <> "") { } else { ?>
  • Register
  • -
  • Checkout
  • Login
  • "") {
    - - - + + + + +
    • Home
    • @@ -207,7 +207,7 @@ if ($_SESSION["userId"] <> "") {
      -
      +
      "") {
      -
      +
      "") {
      -
      +
      "") {
      -
      +
      -
      Seller Productsss
      +
      Seller Products

      ${productCount}

      @@ -783,49 +783,58 @@ maxPriceInput.addEventListener('input', function() {
      --> - +
      diff --git a/vendor-user-tabs.php b/vendor-user-tabs.php index 28b07f3..6f2bb95 100644 --- a/vendor-user-tabs.php +++ b/vendor-user-tabs.php @@ -7,7 +7,7 @@ $current_page = basename($_SERVER['PHP_SELF']);
      - -
      -
      - - "> -
      -
      - " class="image"> - - - " alt="Product" style="border: 1px solid #eeeeee; height: 330px; object-fit: cover;"/> - - - - " id="removeItem">× - - -
      - - - 0) : ?> +

      No wishlist

      '; // Display "No wishlist" message if wishlist is empty + } else { + foreach ($customer['favorites']['products'] as $product) { + // raymart added vendorproduct feb 14 2024 + $vendorOfProduct = getVendorbyId($product['vendor_api_id']); + ?> +
      +
      + + "> + -
      -
      -
      ">
      - - - - - 0) { - echo ''; - echo '' . $product['regular_price'] . ''; - echo '' . $product['sale_price'] . ''; - echo ''; - } else { - echo '' . $product['regular_price'] . ''; - } - } elseif ($product['product_type'] === "variable") { - $lowest_regular_price = null; - $highest_regular_price = null; - $lowest_sale_price = null; - $highest_sale_price = null; +
      +
      ">
      + + + + + 0) { + echo ''; + echo '' . $product['regular_price'] . ''; + echo '' . $product['sale_price'] . ''; + echo ''; + } else { + echo '' . $product['regular_price'] . ''; + } + } elseif ($product['product_type'] === "variable") { + $lowest_regular_price = null; + $highest_regular_price = null; + $lowest_sale_price = null; + $highest_sale_price = null; - if (isset($variation_details) && is_array($variation_details)) { - foreach ($variation_details as $index => $variation) { - $regular_price = isset($variation['regular_price']) ? $variation['regular_price'] : 0; - $sale_price = isset($variation['sale_price']) ? $variation['sale_price'] : 0; + if (isset($variation_details) && is_array($variation_details)) { + foreach ($variation_details as $index => $variation) { + $regular_price = isset($variation['regular_price']) ? $variation['regular_price'] : 0; + $sale_price = isset($variation['sale_price']) ? $variation['sale_price'] : 0; - // Update the minimum and maximum prices only if they are not null - if ($lowest_regular_price === null || $regular_price < $lowest_regular_price) { - $lowest_regular_price = $regular_price; - } + // Update the minimum and maximum prices only if they are not null + if ($lowest_regular_price === null || $regular_price < $lowest_regular_price) { + $lowest_regular_price = $regular_price; + } - if ($highest_regular_price === null || $regular_price > $highest_regular_price) { - $highest_regular_price = $regular_price; - } + if ($highest_regular_price === null || $regular_price > $highest_regular_price) { + $highest_regular_price = $regular_price; + } - if ($lowest_sale_price === null || $sale_price < $lowest_sale_price) { - $lowest_sale_price = $sale_price; - } + if ($lowest_sale_price === null || $sale_price < $lowest_sale_price) { + $lowest_sale_price = $sale_price; + } - if ($highest_sale_price === null || $sale_price > $highest_sale_price) { - $highest_sale_price = $sale_price; + if ($highest_sale_price === null || $sale_price > $highest_sale_price) { + $highest_sale_price = $sale_price; + } } } - } - // Display the range of prices based on the presence of sale prices - if ($lowest_sale_price !== null && $highest_sale_price !== null && $lowest_sale_price > 0 && $highest_sale_price > 0) { - echo '' . '₱' . $lowest_sale_price . ' - ₱' . $highest_sale_price . ''; - } elseif ($lowest_regular_price !== null && $highest_regular_price !== null) { - echo '' . '₱' . $lowest_regular_price . ' - ₱' . $highest_regular_price . ''; + // Display the range of prices based on the presence of sale prices + if ($lowest_sale_price !== null && $highest_sale_price !== null && $lowest_sale_price > 0 && $highest_sale_price > 0) { + echo '' . '₱' . $lowest_sale_price . ' - ₱' . $highest_sale_price . ''; + } elseif ($lowest_regular_price !== null && $highest_regular_price !== null) { + echo '' . '₱' . $lowest_regular_price . ' - ₱' . $highest_regular_price . ''; + } } - } - ?> + ?> +
      -
      - - +