diff --git a/functions.php b/functions.php
index 42a2e32..dde830a 100644
--- a/functions.php
+++ b/functions.php
@@ -1363,7 +1363,7 @@ function addVendor(
$country,
$email,
$phone,
- $dateRegistered,
+ $dateRegistered
) {
$curl = curl_init();
diff --git a/product-left-sidebar.php b/product-left-sidebar.php
index fdd1c8f..9202a4f 100644
--- a/product-left-sidebar.php
+++ b/product-left-sidebar.php
@@ -334,54 +334,17 @@ if (isset($_GET['id'])) {
As low as
0) {
- echo '' . $product_details['regular_price'] . ' ';
- echo '' . $product_details['sale_price'] . ' ';
- } else {
- echo '' . $product_details['regular_price'] . ' ';
- }
- } elseif ($product_details['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;
-
- // 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 ($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;
- }
- }
- }
-
- // 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 . ' ';
- }
- }
+ // 02-13-24 Jun Jihad Removed Logic to DIsplay Price Range of Variable Products
+ if (isset($product_details['sale_price']) && $product_details['sale_price'] > 0) {
+ echo '' . $product_details['regular_price'] . ' ';
+ echo '' . $product_details['sale_price'] . ' ';
+ } elseif (!isset($product_details['regular_price']) || $product_details['regular_price'] <= 0) {
+ echo 'Contact Seller for Price ';
+ } else {
+ echo '' . $product_details['regular_price'] . ' ';
+ }
+ // 02-13-24 Jun Jihad Removed Logic to DIsplay Price Range of Variable Products
?>
-
-
-
Stocks Available
@@ -389,68 +352,83 @@ if (isset($_GET['id'])) {
-
+
+
+
+
VARIATION
+
+
+
-
-
-
VARIATION
-
-
- $variation) {
- $variationImage = isset($variation["product_image"]) ? $variation["product_image"] : 'https://upload.wikimedia.org/wikipedia/commons/6/65/No-Image-Placeholder.svg';
- ?>
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ $variation) {
+ $variationImage = isset($variation["product_image"]) ? $variation["product_image"] : 'https://upload.wikimedia.org/wikipedia/commons/6/65/No-Image-Placeholder.svg';
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -460,25 +438,43 @@ if (isset($variation_details) && is_array($variation_details)) {
- Add To Cart';
- echo '
Contact seller ';
- } elseif ($product_details['regular_price'] && $product_details['regular_price'] !== "") {
- // For non-variable products with a regular price, show "Add to Cart" button
+
+ Add To Cart';
+ echo '
Contact seller ';
+ } else {
+ if (!empty($product_details['regular_price']) || !empty($product_details['sale_price'])) {
echo '
';
echo '
Add To Cart ';
} else {
- // For non-variable products without a regular price, show "Contact seller" button
echo '
Contact seller ';
}
- } else {
- // If user is not logged in, prompt to log in
- echo '
Please log in to add to cart.
';
}
- ?>
-
+ } else {
+ echo '
Please log in to add to cart.
';
+ }
+?>
+
+
+
+
+
diff --git a/selected_variation.php b/selected_variation.php
new file mode 100644
index 0000000..69b0b96
--- /dev/null
+++ b/selected_variation.php
@@ -0,0 +1,13 @@
+ true]);
diff --git a/user-profile-tabs.php b/user-profile-tabs.php
index 337f506..ab38f3a 100644
--- a/user-profile-tabs.php
+++ b/user-profile-tabs.php
@@ -1,4 +1,4 @@
-