diff --git a/admin/vendor-profile.php b/admin/vendor-profile.php index af0c162..b112fa0 100644 --- a/admin/vendor-profile.php +++ b/admin/vendor-profile.php @@ -29,17 +29,17 @@ if($_SESSION["user_type"]!="admin"){ } $vendor = getVendorbyId($_SESSION["vendorId"]); -$array = json_decode($vendor,true); +$vendorData = json_decode($vendor,true); $selectedBankAccount = null; -foreach ($array['bank_acount_details'] as $bankAccount) { +foreach ($vendorData['bank_acount_details'] as $bankAccount) { if ($bankAccount['bank_payout']) { $selectedBankAccount = $bankAccount; break; } } -if ($selectedBankAccount === null && !empty($array['bank_acount_details'])) { - $selectedBankAccount = $array['bank_acount_details'][0]; +if ($selectedBankAccount === null && !empty($vendorData['bank_acount_details'])) { + $selectedBankAccount = $vendorData['bank_acount_details'][0]; } $selectedBankAccountJSON = json_encode($selectedBankAccount); @@ -114,22 +114,6 @@ date_default_timezone_set('Asia/Manila'); - diff --git a/vendor-settings.php b/vendor-settings.php index 1f3a2b3..82c986c 100644 --- a/vendor-settings.php +++ b/vendor-settings.php @@ -295,13 +295,13 @@ if ($_SESSION["isCustomer"] == true) { - -
-
Bank Information
- -
+ +
+
Bank Information
+ +
-
+
@@ -544,7 +544,6 @@ if ($_SESSION["isCustomer"] == true) { - + + + + + + + - + + + + + + + diff --git a/vendor-uploads.php b/vendor-uploads.php index 826b0b6..36c1391 100644 --- a/vendor-uploads.php +++ b/vendor-uploads.php @@ -278,11 +278,11 @@ if ($_SESSION["isCustomer"] == true) {
- +
- @@ -467,7 +467,7 @@ if ($_SESSION["isCustomer"] == true) {
-->
- @@ -486,7 +486,7 @@ if ($_SESSION["isCustomer"] == true) {
- 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 . ''; + } } - } - ?> + ?> +
-
- - +