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(); + +
-
- - -
+
+
+ + +
+
+ - + + +'; + } 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 -
+
@@ -496,6 +496,11 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate /> Home
+
  • +
    + /> Apparel +
    +
  • /> Heavy Equipment diff --git a/vendor-all-product-list.php b/vendor-all-product-list.php index 9519ddb..e4fd24f 100644 --- a/vendor-all-product-list.php +++ b/vendor-all-product-list.php @@ -66,6 +66,28 @@ $products = productList(); + @@ -116,9 +138,23 @@ $products = productList();
    -
    + + +
    + +
    + +
    - alt="vendor image"> + + + alt="vendor image"> + + vendor image + +
    - edit + edit - edit + edit @@ -198,21 +242,21 @@ $products = productList(); echo 'Placeholder Image'; } ?> --> - - - - - - - - - + + + + + + + + + - - + + - - + + @@ -223,6 +267,14 @@ $products = productList();
    + +
  • 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)) {
    -
    + + +
    + +
    + +
    - alt="vendor image"> + + + + alt="vendor image"> + + vendor image +
    - edit - " alt="edit" /> + + ?> edit - + - + @@ -329,11 +358,25 @@ if (is_array($vendorOrderss)) { const totalItems = ; const totalPages = Math.ceil(totalItems / itemsPerPage); + //03-11-2024 Stacy modified for the pagination UI function showPage(page) { const startIndex = (page - 1) * itemsPerPage; const endIndex = startIndex + itemsPerPage; const tableRows = document.querySelectorAll('#orderItemsBody tr'); + + // for pagination button + const pager = document.querySelectorAll('.page-btn') + pager.forEach((row, index) => { + if (index!==page-1) { + row.style.backgroundColor="white"; + row.style.color="black"; + } else { + row.style.backgroundColor="#007bff"; + row.style.color="white"; + } + }); + // document.querySelector('.page-' + page).style.backgroundColor="red"; tableRows.forEach((row, index) => { if (index >= startIndex && index < endIndex) { row.style.display = 'table-row'; @@ -347,7 +390,10 @@ if (is_array($vendorOrderss)) { const paginationContainer = document.getElementById('pagination'); for (let i = 1; i <= totalPages; i++) { - const pageButton = document.createElement('button'); + // created a tag + const pageButton = document.createElement('a'); + // created class for a tag + pageButton.className = "page-btn page-" + i pageButton.textContent = i; pageButton.addEventListener('click', () => showPage(i)); paginationContainer.appendChild(pageButton); @@ -365,7 +411,7 @@ if (is_array($vendorOrderss)) {
    @@ -399,7 +445,7 @@ if (is_array($vendorOrderss)) { if (!empty($image_urls)) { $first_image_url = trim($image_urls[0]); ?> - edit + edit + ?> + diff --git a/vendor-list.php b/vendor-list.php index efd4ef4..4e4c895 100644 --- a/vendor-list.php +++ b/vendor-list.php @@ -59,6 +59,30 @@ $products = productList(); }); } + + @@ -171,7 +195,18 @@ $products = productList();
    +
    @@ -183,7 +218,7 @@ $products = productList(); vendor imgvendor imgvendor img
    + + + + + + +
    - - - + 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)) {