diff --git a/admin/assets/img/favicon/favicon.png b/admin/assets/img/favicon/favicon.png
new file mode 100644
index 0000000..5b99811
Binary files /dev/null and b/admin/assets/img/favicon/favicon.png differ
diff --git a/admin/index.php b/admin/index.php
index 65db273..df56492 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -40,7 +40,9 @@ if($_SESSION["user_type"]!="admin"){
-
+
+
+
diff --git a/admin/user-card.php b/admin/user-card.php
index 6f1ae59..228c3a3 100644
--- a/admin/user-card.php
+++ b/admin/user-card.php
@@ -48,7 +48,8 @@ $users = getUsers();
-
Ekka - Admin Dashboard HTML Template.
+
+ oBanana B2B - Admin Dashboard
@@ -66,7 +67,9 @@ $users = getUsers();
-
+
+
+
diff --git a/admin/vendor-card-action.php b/admin/vendor-card-action.php
new file mode 100644
index 0000000..8bcbaf1
--- /dev/null
+++ b/admin/vendor-card-action.php
@@ -0,0 +1,8 @@
+ "") {
$_SESSION["isLoggedIn"] = true;
- //$customer_data = getCustomerbyLoginId($_SESSION["userId"]);
+ $customer_data = getCustomerbyLoginId($_SESSION["userId"]);
} else {
$_SESSION["isLoggedIn"] = false;
header("location: login.php");
@@ -14,6 +14,8 @@ if ($_SESSION["user_type"] != "admin") {
header("location: login.php?alert=Only admins allowed here!");
}
$products = productList();
+
+$vendorSearchResult = $_SESSION["vendorSearchResult"];
?>
@@ -64,7 +66,8 @@ $products = productList();
-
+
+
@@ -89,17 +92,22 @@ $products = productList();
+
+
+
@@ -665,10 +673,49 @@ $products = productList();
$start = ($currentpage - 1) * $vendorsPerPage;
$end = $start + $vendorsPerPage - 1;
+
+
+ $vendorsCopy = $vendors;
+ // var_dump($vendorsCopy
+ // );
+
+
+ // 03-07-2024 added searh filter
+ if (!empty($_GET['search']) ) {
+ $filteredProducts=[];
+ foreach ($vendorsCopy as $result) {
+ $vendorName = strtolower($result['user_login']);
+ if (
+ // $result['user_login'] == $_GET['search']
+ strpos($vendorName,$_GET['search'])!==false
+ ) {
+ $filteredProducts[] = $result;
+ // var_dump("herees");
+
+ // var_dump($_GET['search']);
+ } else{
+ // var_dump("none");
+
+ }
+ }
+
+ $vendors = $filteredProducts;
+ $totalVendors = count($filteredProducts);
+ $vendorsPerPage = 20;
+ }
+ else{
+ // $vendors=$vendorsCopy;
+ }
+
+ if ($totalVendors == 0) {
+ echo '
No vendor found.
';
+ }
+
// $vendors = vendorList();
for ($x = $start; $x <= $end && $x < $totalVendors; $x++) {
$vendor = $vendors[$x];
?>
+
@@ -894,7 +941,8 @@ $products = productList();
-
+
+
+';
+ } else {
+ echo '
+
Place Order
+';
+ }
+ ?>
@@ -1401,6 +1410,30 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
const randomIndex = Math.floor(Math.random() * refchar.length);
uniqueRef += refchar.charAt(randomIndex);
}
+
+ 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 = '';
@@ -1454,7 +1487,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
'Authorization': "Bearer " + token,
},
});
- // added marhc 7 2024
+
if (!patchResponse.ok) {
throw new Error(`Error updating payment status: ${patchResponse.status} ${patchResponse.statusText}`);
}
diff --git a/shop-list-left-sidebar.php b/shop-list-left-sidebar.php
index de45a38..b8db52d 100644
--- a/shop-list-left-sidebar.php
+++ b/shop-list-left-sidebar.php
@@ -258,7 +258,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
-
diff --git a/vendor-dashboard.php b/vendor-dashboard.php
index eebf84f..9e1c126 100644
--- a/vendor-dashboard.php
+++ b/vendor-dashboard.php
@@ -72,6 +72,24 @@ if (is_array($vendorOrderss)) {
+
+
@@ -125,9 +143,23 @@ if (is_array($vendorOrderss)) {
-
-
-
+
diff --git a/vendor-refund-history.php b/vendor-refund-history.php
index 35246cd..ac67554 100644
--- a/vendor-refund-history.php
+++ b/vendor-refund-history.php
@@ -66,7 +66,7 @@ if (is_array($vendorOrderss)) {