diff --git a/assets/js/tester11.js b/assets/js/tester11.js index 3560698..40b3fde 100644 --- a/assets/js/tester11.js +++ b/assets/js/tester11.js @@ -690,7 +690,6 @@ function popupAddToCart(product, productVendor, token, email, password, customer Unit Price: ${response.items[0].price} Subtotal: ${totalAmount} - // raymart feb 26 2024
-
diff --git a/checkouttest.php b/checkouttest.php index 39c262a..91ec43d 100644 --- a/checkouttest.php +++ b/checkouttest.php @@ -940,21 +940,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"] }); - '; - } else { - // $cartItems is not empty, display the "Place Order" button - echo ' - - Place Order - '; - } - ?> - - + Place Order
@@ -1414,32 +1400,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"] for (let i = 0; i < 8; i++) { const randomIndex = Math.floor(Math.random() * refchar.length); uniqueRef += refchar.charAt(randomIndex); - // added marhc 7 2024 } - - const selectedFName = document.getElementById('selectedFName').innerText; - const selectedLName = document.getElementById('selectedLName').innerText; - const selectedContact = document.getElementById('selectedContact').innerText; - const sBuilding = document.getElementById('sBuilding').innerText; - const sStreet = document.getElementById('sStreet').innerText; - const sCity = document.getElementById('sCity').innerText; - const sBarangay = document.getElementById('sBarangay').innerText; - const sProvince = document.getElementById('sProvince').innerText; - const sCountry = document.getElementById('sCountry').innerText; - if ( - selectedFName.trim() === "" || - selectedLName.trim() === "" || - selectedContact.trim() === "" || - sBuilding.trim() === "" || - sStreet.trim() === "" || - sCity.trim() === "" || - sBarangay.trim() === "" || - sProvince.trim() === "" || - sCountry.trim() === "" - ) { - alert("Please select address."); - return; // Stop further execution - } newArray.forEach(async (orderId) => { console.log(orderId) const token = ''; diff --git a/shop-list-left-sidebar-test.php b/shop-list-left-sidebar-test.php new file mode 100644 index 0000000..17dbeff --- /dev/null +++ b/shop-list-left-sidebar-test.php @@ -0,0 +1,1011 @@ + "") { + $_SESSION["isLoggedIn"] = true; + $customer_data = getCustomerbyLoginId($_SESSION["userId"]); +} else { + $_SESSION["isLoggedIn"] = false; +} +$productSearchResult = $_SESSION["productSearchResult"]; +$vendorSearchResult = $_SESSION["vendorSearchResult"]; + + + +// 02-19-2024 Jun Jihad Search Filter +$filteredProducts = []; + +if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['category'])) { + $filteredProducts = []; + $minPrice = isset($_GET['minPrice']) && $_GET['minPrice'] !== '' ? floatval($_GET['minPrice']) : null; + $maxPrice = isset($_GET['maxPrice']) && $_GET['maxPrice'] !== '' ? floatval($_GET['maxPrice']) : null; + + // echo "Min Price: " . ($minPrice !== null ? $minPrice : "null") . "
"; + // echo "Max Price: " . ($maxPrice !== null ? $maxPrice : "null") . "
"; + + $selectedCategories = isset($_GET['category']) ? $_GET['category'] : []; + + if (!empty($selectedCategories) && (($minPrice == null) && ($maxPrice == null))) { + foreach ($selectedCategories as $selectedCategory) { + $category = strtolower(trim($selectedCategory)); + foreach ($productSearchResult['results'] as $result) { + $product = $result['product']; + + $productCategory = strtolower(trim($product['product_category'])); + + if ( + $productCategory == $category + ) { + $filteredProducts[] = $result; + } + } + } + } elseif (!empty($selectedCategories) && (!empty($minPrice) || !empty($maxPrice))) { + if ($minPrice === null) { + $minPrice = 0; + } + if ($maxPrice === null) { + $maxPrice = PHP_FLOAT_MAX; + } + foreach ($selectedCategories as $selectedCategory) { + $category = strtolower(trim($selectedCategory)); + foreach ($productSearchResult['results'] as $result) { + $product = $result['product']; + $productPrice = isset($product['sale_price']) ? $product['sale_price'] : $product['regular_price']; + $productCategory = strtolower(trim($product['product_category'])); + if ( + $productCategory = $category && (($productPrice >= $minPrice) && + ($productPrice <= $maxPrice)) + ) { + $filteredProducts[] = $result; + } + } + } + } + else { + foreach ($productSearchResult['results'] as $result) { + $product = $result['product']; + $productPrice = isset($product['sale_price']) ? $product['sale_price'] : $product['regular_price']; + if ($minPrice === null) { + $minPrice = 0; + } + + if ($maxPrice === null) { + $maxPrice = PHP_FLOAT_MAX; + } + if (($minPrice === null || $productPrice >= $minPrice) && + ($maxPrice === null || $productPrice <= $maxPrice) + ) { + $filteredProducts[] = $result; + } + } + } +} else { + $filteredProducts = $productSearchResult['results']; +} +?> + + + + + + + + + oBanana B2B - Elevate Your Business + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+ + + + + + +
+
+
+
+
+
+

Shop

+
+
+ + + +
+
+
+
+
+
+ + + +
+
+
+
+ +
+
+
+ + +
+
+
+ Sort by +
+ +
+
+
+ + + +
+
+
Vendor Search Results
+ + +
+ +
+
+
+
+
+ + <?php echo $vendor['user_login']; ?> + + + +
+ +
+
+
Seller Products
+ +

+
+
+
+
+
Seller since
+

+
+
+
+ +
+
+
+ +
+
+
+ + + + +
+
+
+ +
+
+
+
+ "> + + edit + + edit + + + +
+ + +
+
+
+
+
">
+
+ + 0) : ?> + + + + + + Inquire + + Inquire + + +
+
+
+ +
+
+ +
+ Showing - of item(s) +
    + + 1) { + ?> +
  • 1
  • + 2) { + ?> +
  • ...
  • + $minPrice, 'maxPrice' => $maxPrice); + if (isset($_POST['category'])) { + $filterParams['category'] = $_POST['category']; + } + $paginationUrl = '?' . http_build_query(array_merge($_GET, $_POST, array('page' => $page))); + + + ?> +
  • + +
  • ...
  • + +
  • + +
+
+ + +
+ +
+ +
+
+
+

Filter Products By

+
+
+ +
+
+

Category

+
+
+
+ + + +
+ + +
+
+ + + + + +
+
+
+
+
+
+ + + + + + + + + + + + +
+
+
+
+ +
+
+ 3 +
+
+ +
+
+ 4 +
+
+ +
+ +
+
+
+ + + +
+ payment image +
+

Someone in new just bought

+
stylish baby shoes
+

10 Minutes ago

+
+ × +
+ + + +
+ +
+
+ 3 +
+
+ + + +
+ +
+ +
+ Need Help? +

Chat with us on WhatsApp

+
+ + +
+ + +
+
+
+ whatsapp icon +
+
+
+ +
+ + + +
+
+
+

Features

+
+ + icon + +
+
+

Color Scheme

+
    +
  • +
  • +
  • +
  • +
  • +
+
+
+

Backgrounds

+ +
+
+

Full Screen mode

+
+
+
Mode
+
On
+
Off
+
+
+
+
+

Dark mode

+
+
+
Mode
+
On
+
Off
+
+
+
+
+

RTL mode

+
+
+
Rtl
+
On
+
Off
+
+
+
+
+

Clear local storage

+ Clear Cache & Default +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + '; + } else { + echo ''; + } + ?> + + + + \ No newline at end of file diff --git a/shop-list-left-sidebar.php b/shop-list-left-sidebar.php index 67d7980..e8987b8 100644 --- a/shop-list-left-sidebar.php +++ b/shop-list-left-sidebar.php @@ -307,6 +307,8 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate for ($x = $startIndex; $x <= $endIndex; $x++) { $product = $filteredProducts[$x]['product']; + $productWithoutSpecs = $product; + unset($productWithoutSpecs['specifications']); $vendorOfProduct = getVendorbyId($product['vendor_api_id']); // $product_image = !empty($product["product_image"]) ? $product["product_image"] : "https://upload.wikimedia.org/wikipedia/commons/thumb/6/65/No-Image-Placeholder.svg/330px-No-Image-Placeholder.svg.png"; $sale_price = isset($product['sale_price']) ? $product['sale_price'] : null; @@ -338,8 +340,8 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate Product -->
- - + +
diff --git a/user-history.php b/user-history.php index cb9c830..e2ac230 100644 --- a/user-history.php +++ b/user-history.php @@ -363,7 +363,9 @@ if ($_SESSION["userId"] <> "") { Refund Requested'; - } else { + } elseif ($order['return_order']['status'] === 'To Ship') { + echo 'For Refund'; + }else { echo 'Return/Refund'; } ?> @@ -383,7 +385,6 @@ if ($_SESSION["userId"] <> "") { -