From 38ff115b1f007017568aca36c63647c5a678364a Mon Sep 17 00:00:00 2001 From: Stacy Date: Wed, 13 Mar 2024 10:59:15 +0800 Subject: [PATCH] placeholder for vendor & customer image, paginations, vendor search button, modified admin icon & modified vendor user tabs --- admin/assets/img/favicon/favicon.png | Bin 0 -> 1647 bytes admin/index.php | 4 +- admin/user-card.php | 7 ++- admin/vendor-card-action.php | 8 +++ admin/vendor-card.php | 77 +++++++++++++++++++---- category-slider.php | 2 +- checkouttest.php | 35 ++++++++++- shop-list-left-sidebar.php | 7 ++- vendor-all-product-list.php | 90 +++++++++++++++++++++------ vendor-dashboard.php | 80 +++++++++++++++++++----- vendor-list.php | 60 +++++++++++++++--- vendor-refund-history.php | 46 +++++++++++--- vendor-settings.php | 13 ++-- vendor-uploads.php | 28 +++++++-- vendor-user-tabs.php | 1 + 15 files changed, 381 insertions(+), 77 deletions(-) create mode 100644 admin/assets/img/favicon/favicon.png create mode 100644 admin/vendor-card-action.php diff --git a/admin/assets/img/favicon/favicon.png b/admin/assets/img/favicon/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..5b9981194535ce46901c9b743e0cd67880b57817 GIT binary patch literal 1647 zcmV-#29WuQP)77OF(zP>Oj4$4 zp{BKoV*F}_puV)e)Phuq5N!QG3%*p)JVXUwD#Zt(FPexpT8b?c{2H4|W17;T#gNAN z=toB`e- zN60zA89+b7n*EkH?Wd)KqksRu0H!Y9e#@4=n|}tv9iTG7762g^TLALegt-jJ96$#I zC%YM+SKYqZap1jK<&=IFlqc4R_S zhHeB1hy+$l1K1tM4mKx@T0^mP%9`1SO)?G0e;^r|^< z;lklcqU3>3eeSQnD^lv}Ko4s1ZbSwgs=k>2HvQ&~fsW4kr{v;eGG{Ua=pgd|lWf8O z5Rw5=@HgHUgMYX*_}^cxn}qs43=a*QM4CP-hT{;*fJ7@l$V1ih#kKX(fiH{USE<*JW%h#80 zd+*n<@{_RUR%!D~03t|%6jUie-ug>kPp*i71jg6^ZpleII%?Qg;B^s{mb7BA3aooLYdd&d>N1x3?l7!5aVWdqzyZCxgo~9I(qwb?Owx}JDG ztkHE5t>jf<1^{XE8Udfxj3^y90BF21a14mwf)OwQ&7u>H=eU33t&NBSK*x?Zt_g0s z^+0OQh&&g705F9T10oNa1j>c8ax@tMv#h{4G#b&L+o(9uECsOX_NUD#C>EvwPXOBG z(`(!Bhp!(%w5;SR`xD`YEBmYOZU!J5u?(r12RXp<-JU;Vmj&olG*S*(P4|{H80Rl- zR$A4eEmUJGu*}=Gd?-R#@U(c3L@1{eGCIban+2%Z_(23XE*Z)`l?&TaFakhm(#vsA zmhx&dCR$~)01V-zmOm@nL*yQA&jjJV$2QCU#>2-hs`IgEfP zpdMjxuNj@6mKkIQIfwin#(U=`_U_y$K&|ATAhB&ji|Y{-0CO)}fE&phh|ITUr0XzO z|H+2LtGiBs;famHaxMbkf@9?cgG>IBonrh_2Ww7&r{>@P$hqO+!^v94W+!%kMT)-x zu;!Y!5d}^M0Ct{7-k#!Y^}{EO;g2i3Sn=Lor`%bw^Tp2o(!@e_{uXfVZX$e5XxtCQ z^D=7!#Pa-KWu$^# ztHWgHlcD#%002h5lp^{cHxGFLT=SaW=Pk8`(QJ1t?C%ZuFM$&cSj3EnYaPi906Mqg z7l6C6)Vqs4JQK)EbircbyFSo=P6gOplvsM4Lu2o>0gzV~5z7xlR$KCZHLvn06~C{s zv^Zu0teQ$lo-PfIK3n{$Wv%PhOT)C}tH_#mL2P+6wDfFQ>aB=^1Wu=L;|&S^N9DW5 zzP*}DZDYPVcnVnjrGUy(56{g;;!eg`L5x6( tSuV!^a6y*=ypp&r7dbdGu@Sof@IUV}#0s`QG;sg`002ovPDHLkV1iTy99{qb literal 0 HcmV?d00001 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 -
    + +
  • +
    + /> 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)) {