This commit is contained in:
mark H 2024-05-21 09:43:55 +08:00
commit ac3209663e
50 changed files with 821 additions and 425 deletions

View File

@ -18,7 +18,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -7,7 +7,6 @@ $(document).ready(function() {
fetchData()
.then(function (response) {
responseData = response.data;
// console.log(responseData);
const completedOrdersCount = countCompletedOrders(responseData);
const toPayOrdersCount = countToPayOrders(responseData);
const toShipOrdersCount = countToShipOrders(responseData);
@ -339,7 +338,6 @@ $(document).ready(function() {
}
}
function initializeSalesChart(cod_daily_totals, obpay_daily_totals, cod_monthly_totals, obpay_monthly_totals, months, cod_yearly_totals, obpay_yearly_totals, years) {
var acquisition = document.getElementById("salesChart");
if (acquisition !== null) {
@ -486,6 +484,7 @@ $(document).ready(function() {
}
};
var ctx = document.getElementById("salesChart").getContext("2d");
var lineAcq = new Chart(ctx, configAcq);
document.getElementById("acqLegend").innerHTML = lineAcq.generateLegend();
@ -493,8 +492,8 @@ $(document).ready(function() {
var items = document.querySelectorAll(
"#user-acquisition .nav-tabs .nav-item"
);
items.forEach(function (item, index) {
item.addEventListener("click", function() {
items.forEach(function (item, index) {
item.addEventListener("click", function() {
// Determine which tab was clicked
var selectedTab = this.textContent.trim();
@ -587,4 +586,196 @@ $(document).ready(function() {
event.preventDefault();
downloadCSV('orders_data.csv');
});
let customer_data;
let vendor_data;
function getDataAndInitializeChart () {
userData()
.then(function (users){
vendorData()
.then(function (venues){
customer_data = users.data;
vendor_data = venues.data;
const {customer_monthly_total, months} = countCustomerReg(customer_data)
const { vendor_monthly_total} = countVendorReg(vendor_data);
initializeActivityChart(customer_monthly_total, vendor_monthly_total, months);
})
})
}
getDataAndInitializeChart();
function userData(){
return axios.get('https://api.obanana.shop/api/v1/customers');
}
function vendorData(){
return axios.get('https://api.obanana.shop/api/v1/vendors');
}
function countCustomerReg(customers) {
const currentDate = new Date();
const monthLabels = [];
const customer_monthly_total = Array(12).fill(0);
for (let i = 11; i >= 0; i--) {
const month = new Date(currentDate.getFullYear(), currentDate.getMonth() - i, 1);
monthLabels.push(month);
}
console.log(monthLabels);
customers.forEach(customer => {
const regDate = new Date(customer.createdAt);
regDate.setHours(0, 0, 0, 0);
monthLabels.forEach((month, index) => {
let total_count = 0;
if (regDate.getFullYear() === month.getFullYear() && regDate.getMonth() === month.getMonth()) {
total_count ++;
customer_monthly_total[11 - index] += total_count;
}
});
});
console.log(customer_monthly_total)
customer_monthly_total.reverse();
return {
customer_monthly_total,
months: monthLabels.map(month => `${month.toLocaleString('default', { month: 'short' })} ${month.getFullYear()}`) // Return month labels for use in charts or displays
};
}
function countVendorReg(vendors) {
const currentDate = new Date();
const monthLabels = [];
const vendor_monthly_total = Array(12).fill(0);
for (let i = 11; i >= 0; i--) {
const month = new Date(currentDate.getFullYear(), currentDate.getMonth() - i, 1);
monthLabels.push(month);
}
console.log(monthLabels);
vendors.forEach(vendor => {
const regDate = new Date(vendor.createdAt);
regDate.setHours(0, 0, 0, 0);
monthLabels.forEach((month, index) => {
let total_count = 0;
if (regDate.getFullYear() === month.getFullYear() && regDate.getMonth() === month.getMonth()) {
total_count ++;
vendor_monthly_total[11 - index] += total_count;
}
});
});
console.log(vendor_monthly_total)
vendor_monthly_total.reverse();
return {
vendor_monthly_total,
};
}
function initializeActivityChart (customer_monthly_total, vendor_monthly_total, months){
var activity = document.getElementById("registry");
if (activity !== null) {
var activityData = [
{
first: customer_monthly_total,
second: vendor_monthly_total
}
];
var config = {
// The type of chart we want to create
type: "line",
// The data for our dataset
data: {
labels: months,
datasets: [
{
label: "Customer",
backgroundColor: "rgba(255, 165, 0, .3)",
borderColor: "rgba(255, 165, 0, .7)",
data: activityData[0].first,
lineTension: 0.3,
pointBackgroundColor: "rgba(255, 165, 0, 0)",
pointHoverBackgroundColor: "rgba(255, 165, 0, 1)",
pointHoverRadius: 3,
pointHitRadius: 30,
pointBorderWidth: 2,
pointStyle: "rectRounded"
},
{
label: "Vendors",
backgroundColor: "rgba(135, 206, 235, .3)",
borderColor: "rgba(135, 206, 235, .7)",
data: activityData[0].second,
lineTension: 0.3,
pointBackgroundColor: "rgba(135, 206, 235, 0)",
pointHoverBackgroundColor: "rgba(135, 206, 235, 1)",
pointHoverRadius: 3,
pointHitRadius: 30,
pointBorderWidth: 2,
pointStyle: "rectRounded"
}
]
},
// Configuration options go here
options: {
responsive: true,
maintainAspectRatio: false,
legend: {
display: false
},
scales: {
xAxes: [
{
gridLines: {
display: false
}
}
],
yAxes: [
{
gridLines: {
display: true,
color: "#eee",
zeroLineColor: "#eee"
},
ticks: {
beginAtZero: true,
stepSize: 10,
max: 30
}
}
]
},
tooltips: {
mode: "index",
titleFontColor: "#888",
bodyFontColor: "#555",
titleFontSize: 12,
bodyFontSize: 15,
backgroundColor: "rgba(256,256,256,0.95)",
displayColors: true,
xPadding: 20,
yPadding: 10,
borderColor: "rgba(220, 220, 220, 0.9)",
borderWidth: 2,
caretSize: 10,
caretPadding: 15
}
}
};
var ctx = document.getElementById("registry").getContext("2d");
var actLine = new Chart(ctx, config);
document.getElementById("actLegend").innerHTML = actLine.generateLegend();
}
}
});

14
admin/assets/js/map.js Normal file
View File

@ -0,0 +1,14 @@
var southWest = L.latLng(4.64, 116.95),
northEast = L.latLng(20.53, 127.25),
bounds = L.latLngBounds(southWest, northEast);
// Initialize the map and set the bounds
var map = L.map('map', {
maxBounds: bounds,
maxBoundsViscosity: 1.0 // Keeps the user within the bounds
}).setView([13.41, 122.56], 6); // Centered on the Philippines with a zoom level of 6
// Add a tile layer
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);

View File

@ -49,6 +49,14 @@ $allSignups = array_merge($all_customers, $all_vendors);
<link href="assets/plugins/daterangepicker/daterangepicker.css" rel="stylesheet">
<link href="assets/plugins/simplebar/simplebar.css" rel="stylesheet" />
<!-- LEAFLET JS -->
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"
integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="
crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"
integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="
crossorigin=""></script>
<!-- Ekka CSS -->
<link id="ekka-css" href="assets/css/ekka.css" rel="stylesheet" />
@ -108,12 +116,13 @@ $allSignups = array_merge($all_customers, $all_vendors);
<ul class="dropdown-menu dropdown-menu-right ec-dropdown-menu">
<!-- User image -->
<li class="dropdown-header">
<img loading="lazy" src="assets/img/user/user.png" class="img-circle" alt="User Image" />
<div class="d-inline-block">
John Deo <small class="pt-1"><?php echo $_SESSION['email']?></small>
<div class="d-flex align-items-center">
<img loading="lazy" src="assets/img/user/user.png" class="img-circle" alt="User Image" />
<small class="pt-1"><?php echo $_SESSION['email']?></small>
</div>
</li>
<li>
<!-- Commented out for future use or functionality -->
<!-- <li>
<a href="#">
<i class="mdi mdi-account"></i> My Profile
</a>
@ -125,7 +134,7 @@ $allSignups = array_merge($all_customers, $all_vendors);
</li>
<li>
<a href="#"> <i class="mdi mdi-diamond-stone"></i> Projects </a>
</li>
</li> -->
<li class="right-sidebar-in">
<a href="javascript:0"> <i class="mdi mdi-settings-outline"></i> Setting </a>
</li>
@ -134,7 +143,8 @@ $allSignups = array_merge($all_customers, $all_vendors);
</li>
</ul>
</li>
<li class="dropdown notifications-menu custom-dropdown">
<!-- Commented out for future usage or functionality -->
<!-- <li class="dropdown notifications-menu custom-dropdown">
<button class="dropdown-toggle notify-toggler custom-dropdown-toggler">
<i class="mdi mdi-bell-outline"></i>
</button>
@ -697,7 +707,7 @@ $allSignups = array_merge($all_customers, $all_vendors);
<a class="text-center" href="#"> View All </a>
</li>
</ul>
</li>
</li> -->
<li class="right-sidebar-in right-sidebar-2-menu">
<i class="mdi mdi-settings-outline mdi-spin"></i>
</li>
@ -825,7 +835,7 @@ $allSignups = array_merge($all_customers, $all_vendors);
<div class="col-xl-4 col-md-12 p-b-15">
<!-- Doughnut Chart -->
<div class="card card-default">
<div class="card card-default" style="height: 100%">
<div class="card-header justify-content-center">
<h2>Orders Overview</h2>
</div>
@ -841,7 +851,7 @@ $allSignups = array_merge($all_customers, $all_vendors);
<li class="mb-2"><i class="mdi mdi-checkbox-blank-circle-outline mr-2"
style="color: #4c84ff"></i>Order Completed</li>
<li class="mb-2"><i class="mdi mdi-checkbox-blank-circle-outline mr-2"
style="color: #80e1c1 "></i>Order To Pay</li>
style="color: #80e1c1"></i>Order To Pay</li>
<li><i class="mdi mdi-checkbox-blank-circle-outline mr-2"
style="color: #ff7b7b "></i>Order Returned</li>
</ul>
@ -861,32 +871,35 @@ $allSignups = array_merge($all_customers, $all_vendors);
</div>
<div class="row">
<div class="col-xl-8 col-md-12 p-b-15">
<div class="col-xl-12 col-md-12 p-b-15">
<!-- User activity statistics -->
<div class="card card-default" id="user-activity">
<div class="no-gutters">
<div>
<div class="card-header justify-content-between">
<h2>User Activity</h2>
<div class="date-range-report ">
<h2>Monthly Users Registry</h2>
<!-- <div class="date-range-report ">
<span></span>
</div>
</div> -->
</div>
<div class="card-body">
<div class="tab-content" id="userActivityContent">
<div class="tab-pane fade show active" id="user" role="tabpanel">
<canvas id="activity" class="chartjs"></canvas>
<canvas id="registry" class="chartjs"></canvas>
</div>
<div>
<div id="actLegend" class="customLegend mb-2"></div>
</div>
</div>
</div>
<div class="card-footer d-flex flex-wrap bg-white border-top">
<!-- <div class="card-footer d-flex flex-wrap bg-white border-top">
<a href="#" class="text-uppercase py-3">In-Detail Overview</a>
</div>
</div> -->
</div>
</div>
</div>
</div>
<div class="col-xl-4 col-md-12 p-b-15">
<!-- <div class="col-xl-4 col-md-12 p-b-15">
<div class="card card-default">
<div class="card-header flex-column align-items-start">
<h2>Current Users</h2>
@ -898,21 +911,21 @@ $allSignups = array_merge($all_customers, $all_vendors);
<a href="#" class="text-uppercase py-3">In-Detail Overview</a>
</div>
</div>
</div>
</div> -->
</div>
<div class="row">
<div class="col-xl-8 col-12 p-b-15">
<div class="col-xl-12 col-md-12 p-b-15">
<!-- World Chart -->
<div class="card card-default" id="analytics-country">
<div class="card-header justify-content-between">
<h2>Purchased by Country</h2>
<h2>Purchased by City</h2>
<div class="date-range-report ">
<span></span>
</div>
</div>
<div class="card-body vector-map-world-2">
<div id="regions_purchase" style="height: 100%; width: 100%;"></div>
<div id="map" style="height: 100%; width: 100%;"></div>
</div>
<div class="border-top mt-3">
<div class="row no-gutters">
@ -933,8 +946,8 @@ $allSignups = array_merge($all_customers, $all_vendors);
</div>
</div>
</div>
<div class="col-xl-4 col-12 p-b-15">
<!-- Top Sell Table -->
<!-- Top Sell Table -->
<!-- <div class="col-xl-4 col-12 p-b-15">
<div class="card card-default Sold-card-table">
<div class="card-header justify-content-between">
<h2>Sold by Items</h2>
@ -1034,7 +1047,7 @@ $allSignups = array_merge($all_customers, $all_vendors);
<a href="#" class="text-uppercase py-3">View Report</a>
</div>
</div>
</div>
</div> -->
</div>
<div class="row">
@ -1073,21 +1086,40 @@ $allSignups = array_merge($all_customers, $all_vendors);
$orderStatus = strtoupper($val['status']);
$returnStatus = strtoupper($val['return_order']['status']);
$style = '';
$textColor = '';
$backgroundColor = '';
$statusClass = '';
if ($orderStatus === 'UNPAID' || $orderStatus === 'RETURNED') {
$statusClass = '#cb3747';
} elseif ($orderStatus === 'TO PAY') {
$statusClass = '#50d7ab';
} elseif ($orderStatus === 'TO SHIP') {
$statusClass = '#9586cd';
}
elseif ($orderStatus === 'TO RECEIVE') {
$statusClass = '#ffc319';
} elseif ($orderStatus === 'COMPLETED') {
$statusClass = '#88aaf3';
switch ($orderStatus) {
case 'TO SHIP':
$backgroundColor = '#8061ef';
$textColor = 'white';
break;
case 'TO PAY':
$backgroundColor = '#1E6E58';
$textColor = 'white';
break;
case 'TO RECEIVE':
$backgroundColor = '#FFD700';
$textColor = 'black';
break;
case 'COMPLETED':
$backgroundColor = '#4c84ff';
$textColor = 'white';
break;
case 'RETURNED':
$backgroundColor = '#ff7b7b';
$textColor = 'white';
break;
default:
$backgroundColor = '#464646';
$textColor = 'white';
}
$style = "display: flex; height: 15px; font-weight: bold;
width: 90px; font-size: 10px !important; padding: 10px;
justify-content: center; align-items: center;
background-color: $backgroundColor; border-radius: 30px; color: $textColor;";
if ($formattedOrderDate == $currentDate) {
$ordersDisplayed = true;
@ -1100,7 +1132,7 @@ $allSignups = array_merge($all_customers, $all_vendors);
<td><?php echo $vendorName ?></td>
<td> <?php echo number_format($totalAmount, 2, '.', ',') ?></td>
<td><?php echo $displayDate ?></td>
<td><span style="color: <?php echo $statusClass; ?>"><?php echo $orderStatus ?></span></td>
<td><span style="<?php echo $style; ?>"><?php echo $orderStatus ?></span></td>
<td><?php echo $returnStatus?: "NONE" ?></td>
</tr>
@ -1175,7 +1207,8 @@ $allSignups = array_merge($all_customers, $all_vendors);
<div class="media">
<div class="media-image mr-3 rounded-circle">
<img loading="lazy"
class="profile-img rounded-circle w-45"
class="profile-img rounded-circle"
style="width: 50px; height: 50px; border-style: solid; border-color: #FFAA00;"
src="<?php echo $imageUrl !== null ? $imageUrl : 'assets/img/user/u1.jpg'; ?>"
alt="customer image">
</div>
@ -1254,7 +1287,8 @@ $allSignups = array_merge($all_customers, $all_vendors);
<div class="media">
<div class="media-image mr-3 rounded-circle">
<img loading="lazy"
class="profile-img rounded-circle w-45"
class="profile-img rounded-circle"
style="width: 50px; height: 50px; border-style: solid; border-color: #FFAA00;"
src="<?php echo $imageUrl !== null ? $imageUrl : 'assets/img/user/u1.jpg'; ?>"
alt="customer image">
</div>
@ -1318,6 +1352,7 @@ $allSignups = array_merge($all_customers, $all_vendors);
<!-- gelo added dynamic charts -->
<script src="assets/js/dashboard-chart.js"></script>
<script src="assets/js/map.js"></script>
<!-- Google map chart -->
<script src="assets/plugins/charts/google-map-loader.js"></script>
<script src="assets/plugins/charts/google-map.js"></script>

View File

@ -115,7 +115,7 @@ $orders = getAllOrder();
<td><?php echo $order['return_order']['status'] ?></td>
<!-- <td><span class="mb-2 mr-2 badge badge-secondary">Cancel</span></td> -->
<td>
<a class="btn btn-lg btn-primary" data-bs-toggle="modal" data-bs-target="#modal-order-<?php echo $order['_id']; ?>">Details</a>
<a class="btn btn-md btn-primary" data-bs-toggle="modal" data-bs-target="#modal-order-<?php echo $order['_id']; ?>">Details</a>
</td>
</tr>
<div class="modal fade" id="modal-order-<?php echo $order['_id']; ?>" tabindex="-1" role="dialog" aria-hidden="true">

View File

@ -32,7 +32,10 @@ if ($_SESSION["userId"] <> "") {
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -18,7 +18,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -115,7 +115,10 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -18,7 +18,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -68,7 +68,10 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -82,7 +82,10 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -240,13 +243,9 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="sName">
<h5>Name:
<span id="selectedFName"><?php echo strtoupper($customer['address'][0]['first_name']); ?></span>
<span id="selectedLName"><?php echo strtoupper($customer['address'][0]['last_name']); ?></span>
</h5>
<!-- <h5>Name:
<span id="selectedFName"><?php echo $customer['address'][0]['first_name']; ?></span>
<span id="selectedLName"> <?php echo $customer['address'][0]['last_name']; ?></span>
</h5> -->
<span id="selectedLName"><?php echo $customer['address'][0]['last_name']; ?></span>
</h5>
</div>
<div class="sContact">
<h5>Contact #:

View File

@ -24,7 +24,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -18,7 +18,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -32,6 +32,10 @@
href="Mobile:+63 917 722 6002">+63 (2) 8807-6379</a></li>
<li class="ec-footer-link"><span>Email:</span><a
href="mailto:sales@obanana.com">sales@obanana.com</a></li>
<li class="ec-footer-link"><span>Call Us:</span><a
href="Mobile:+63 (2) 8807-6379">+63 (2) 8807-6379</a></li>
<li class="ec-footer-link"><span>Email:</span><a
href="mailto:sales@obanana.com">sales@obanana.com</a></li>
</ul>
</div>
</div>
@ -85,6 +89,7 @@
} else {
?>
<li class="ec-footer-link"><a href="user-profile.php">Order History</a></li>
<?php
}
?>

View File

@ -20,7 +20,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -18,7 +18,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -19,7 +19,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -39,7 +39,10 @@ if ($_SESSION["userId"] <> "") {
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -21,7 +21,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -33,7 +33,10 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -31,7 +31,10 @@ if ($_SESSION["userId"] <> "") {
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -37,6 +37,9 @@ if ($_SESSION["userId"] <> "") {
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -17,7 +17,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -66,7 +66,10 @@ if (isset($_GET['id'])) {
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -17,7 +17,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -22,7 +22,10 @@ $_SESSION["isVendor"] = false;
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -25,7 +25,10 @@ $customerData = json_decode($customers, true);
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -20,7 +20,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -25,7 +25,10 @@ $vendorData = json_decode($vendors, true);
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -32,7 +32,10 @@ if ($_SESSION["userId"] <> "") {
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -28,7 +28,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -104,7 +104,10 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -104,7 +104,10 @@ $filteredProducts = [];
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -33,7 +33,10 @@ if ($_SESSION["userId"] <> "") {
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -17,7 +17,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -33,7 +33,10 @@ if ($_SESSION["isVendor"] == true) {
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -37,7 +37,10 @@ if ($_SESSION["isVendor"] == true) {
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -336,7 +339,7 @@ if ($_SESSION["isVendor"] == true) {
<input type="text" class="form-control" id="addressContact" value="+63 " oninput="preventErasePrefix(this)">
</div>
<div class="form-group">
<label for="addressBuilding" class="text-dark font-weight-medium pt-3 mb-2"> Building,Number </label>
<label for="addressBuilding" class="text-dark font-weight-medium pt-3 mb-2"> House/Unit/Floor #, Bldg Name, Block or Lot # </label>
<input type="text" class="form-control" id="addressBuilding">
</div>
<div class="form-group">

View File

@ -37,7 +37,10 @@ if ($_SESSION["isVendor"] == true) {
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -53,7 +53,10 @@ $products = productList();
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -45,7 +45,10 @@ $array = json_decode($result, true);
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -223,11 +226,11 @@ $array = json_decode($result, true);
if ($array['status'] === 'TO SHIP' || $array['status'] === 'To Ship') {
echo '<div class="col-md-6">
<label for="inputEmail4" class="form-label">Tracking Number</label>
<input type="text" name="tracking_number" class="form-control slug-title" value="' . $array['tracking_number'] . '" >
<input type="text" name="tracking_number" class="form-control slug-title" value="' . $array['tracking_number'] . '" required>
</div>';
echo '<div class="col-md-6">
<label for="inputEmail4" class="form-label">COURIER NAME</label>
<input type="text" name="courier_name" class="form-control slug-title" value="' . $array['courier_name'] . '" >
<input type="text" name="courier_name" class="form-control slug-title" value="' . $array['courier_name'] . '" required>
</div>';
} elseif ($array['status'] === 'TO RECEIVE' || $array['status'] === 'To Receive') {
echo '<div class="col-md-6">

View File

@ -64,7 +64,10 @@ if ($_SESSION["isCustomer"] == true) {
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -326,42 +329,42 @@ if ($_SESSION["isCustomer"] == true) {
$textColor = '';
$borderColor = '';
switch ($status) {
case 'TO SHIP':
$borderColor = 'mint';
$textColor = 'min'; // Change this to match the text color you prefer
break;
case 'TO PAY':
$borderColor = '#E0EA00';
$textColor = '#E0EA00';
break;
case 'TO RECEIVE':
$borderColor = '#20FF5A';
$textColor = '#20FF5A';
break;
case 'COMPLETED':
$borderColor = '#2098FF';
$textColor = '#2098FF'; // Change this to match the text color you prefer
break;
case 'TO REFUND':
$borderColor = '#FF5320';
$textColor = '#FF5320';
break;
default:
// Default styles if the status doesn't match any case
$borderColor = '#464646';
$textColor = '#464646';
}
switch (strtoupper($status)) {
case 'TO SHIP':
$backgroundColor = '#8061ef';
$textColor = 'white';
break;
case 'TO PAY':
$backgroundColor = '#1E6E58';
$textColor = 'white';
break;
case 'TO RECEIVE':
$backgroundColor = '#FFD700';
$textColor = 'black';
break;
case 'COMPLETED':
$backgroundColor = '#4c84ff';
$textColor = 'white';
break;
case 'RETURNED':
$backgroundColor = '#ff7b7b';
$textColor = 'white';
break;
default:
$backgroundColor = '#464646';
$textColor = 'white';
}
// Generating style attribute based on the selected colors
$style = "display: flex; height: 15px;font-weight:400; width:90px; margin-top:10px; font-size:10px !important; justify-content:center; align-items:center; padding: 10px; border: 3px solid $borderColor; border-radius: 30px; color: $textColor;";
?>
// Generating style attribute based on the selected colors
$style = "display: flex; height: 15px; font-weight: bold;
width: 90px; font-size: 10px !important;
justify-content: center; align-items: center; padding: 10px;
background-color: $backgroundColor; border-radius: 30px; color: $textColor;";
?>
<td><span style="<?php echo $style; ?>">
<p><?php echo $status; ?></p>
</span></td>
<td><span
style="text-transform:capitalize"><?php echo $orderItems['shipping_address']['shipping_first_name']; ?></span>
</td>

View File

@ -33,7 +33,10 @@ $products = productList();
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -45,17 +45,21 @@ if ($_SESSION["isCustomer"] == true) {
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<title>oBanana B2B - Elevate Your Business</title>
<meta name="keywords" content="apparel, catalog, clean, ecommerce, ecommerce HTML, electronics, fashion, html eCommerce, html store, minimal, multipurpose, multipurpose ecommerce, online store, responsive ecommerce template, shops" />
<meta name="keywords"
content="apparel, catalog, clean, ecommerce, ecommerce HTML, electronics, fashion, html eCommerce, html store, minimal, multipurpose, multipurpose ecommerce, online store, responsive ecommerce template, shops" />
<meta name="description" content="Best ecommerce html template for single and multi vendor store.">
<meta name="author" content="ashishmaraviya">
<!-- site Favicon -->
<link rel="icon" href="assets/images/favicon/favicon.png" sizes="32x32" />
<link rel="apple-touch-icon" href="assets/images/favicon/favicon.png" />
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -75,40 +79,41 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Background css -->
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
<style>
.tab.active {
background-color: #ffaa00;
/* Set your desired background color for the active tab */
color: #ffffff;
/* Set your desired text color for the active tab */
.tab.active {
background-color: #ffaa00;
/* Set your desired background color for the active tab */
color: #ffffff;
/* Set your desired text color for the active tab */
}
#pagination {
display: flex;
list-style: none;
padding: 0;
margin: 0;
justify-content: center;
margin-top: 20px;
}
}
#pagination a {
color: #333;
text-decoration: none;
padding: 5px 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
#pagination {
display: flex;
list-style: none;
padding: 0;
margin: 0;
justify-content: center;
margin-top: 20px;
}
#pagination a {
color: #333;
text-decoration: none;
padding: 5px 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
</style>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script>
function updateCartItemCount() {
$.get("cartitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data, status) {
if (data != "") {
console.log("Data: " + data + "\nStatus: " + status);
document.getElementById("cartItemCount").innerHTML = data;
}
});
}
function updateCartItemCount() {
$.get("cartitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data, status) {
if (data != "") {
console.log("Data: " + data + "\nStatus: " + status);
document.getElementById("cartItemCount").innerHTML = data;
}
});
}
</script>
</head>
@ -124,13 +129,16 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Header start -->
<?php include "header.php" ?>
<!-- Header End -->
<!-- ekka Cart Start -->
<!-- ekka Cart End -->
<!-- Category Sidebar start -->
<?php include "category-slider.php" ?>
<!-- Ec breadcrumb start -->
<div class="sticky-header-next-sec ec-breadcrumb section-space-mb">
<div class="container">
@ -153,7 +161,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
</div>
</div>
<!-- Ec breadcrumb end -->
<!-- Ec breadcrumb end -->
<section class="ec-page-content ec-vendor-uploads ec-user-account section-space-p">
<div class="container">
<div class="row">
@ -166,18 +174,25 @@ if ($_SESSION["isCustomer"] == true) {
<!-- 03-12-2024 Stacy added placeholder for vendor banner -->
<?php
if (!empty($vendorData['vendor_banner'])) { ?>
<div class="ec-vendor-block-bg" style="background-image: url(<?php echo $vendorData['vendor_banner'] ?>) !important;"></div>
<?php } else { ?>
<div class="ec-vendor-block-bg" style="background-color: orange; background-image: url(<?php echo $vendorData['vendor_banner'] ?>) !important;"></div>
<div class="ec-vendor-block-bg"
style="background-image: url(<?php echo $vendorData['vendor_banner'] ?>) !important;">
</div>
<?php } else { ?>
<div class="ec-vendor-block-bg"
style="background-color: orange; background-image: url(<?php echo $vendorData['vendor_banner'] ?>) !important;">
</div>
<?php } ?>
<!-- <div class="ec-vendor-block-bg" style="background-image: url(<?php echo $vendorData['vendor_banner'] ?>) !important;"></div> -->
<div class="ec-vendor-block-detail">
<?php
<?php
if (!empty($vendorData['vendor_image'])) { ?>
<img loading="lazy" class="v-img" src=<?php echo $vendorData['vendor_image'] ?> alt="vendor image">
<?php } else { ?>
<img loading="lazy" class="v-img" src="https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg" alt="vendor image">
<?php } ?>
<img loading="lazy" class="v-img" src=<?php echo $vendorData['vendor_image'] ?>
alt="vendor image">
<?php } else { ?>
<img loading="lazy" class="v-img"
src="https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg"
alt="vendor image">
<?php } ?>
<!-- <img loading="lazy" class="v-img" src=<?php #echo $vendorData['vendor_image'] ?> alt="vendor image"> -->
<h5 class="name"><?php echo $vendorData['user_login'] ?></h5>
</div>
@ -187,11 +202,11 @@ if ($_SESSION["isCustomer"] == true) {
<li><a href="vendor-uploads.php">Upload Product</a></li>
<li><a href="vendor-settings.php">Settings (Edit)</a></li>
<li><a href="user-refund-history.php">User Refund History</a></li> -->
<!-- <li><a href="cart.html">Cart</a></li>
<!-- <li><a href="cart.html">Cart</a></li>
<li><a href="checkout.html">Checkout</a></li>
<li><a href="track-order.html">Track Order</a></li>
<li><a href="user-invoice.html">Invoice</a></li> -->
<!-- </ul>
<!-- </ul>
</div> -->
<?php include "vendor-user-tabs.php" ?>
</div>
@ -201,34 +216,27 @@ if ($_SESSION["isCustomer"] == true) {
<div class="ec-shop-rightside col-lg-9 col-md-12">
<div class="ec-vendor-dashboard-card">
<div class="ec-vendor-card-header">
<h5>Payments</h5>
<h5>Payments</h5>
</div>
<div class="ec-vendor-card-body">
<div class="ec-vendor-card-table">
<div id="payments" class="tab-content active">
<!-- Gelo added vendor payments tab -->
<table class="table ec-table"
id="order-table" style="overflow-x: auto;"
data-role="table"
data-pagination="true"
data-searching="true"
data-filtering="true"
data-sorting="true"
data-show-rows-steps="5,10,20,-1"
data-horizontal-scroll="true"
data-rownum="true"
data-table-info-title="Display from $1 to $2 of $3 payment(s)"
>
<table class="table ec-table" id="order-table" style="overflow-x: auto;"
data-role="table" data-pagination="true" data-searching="true"
data-filtering="true" data-sorting="true" data-show-rows-steps="5,10,20,-1"
data-horizontal-scroll="true" data-rownum="true"
data-table-info-title="Display from $1 to $2 of $3 payment(s)">
<thead>
<tr>
<th data-sortable="true" scope="col">Payment Method</th>
<th data-sortable="true" scope="col">Amount</th>
<th data-sortable="true" scope="col">Status</th>
<th data-sortable="true" scope="col">Description</th>
<th data-sortable="true" scope="col">Date Created</th>
<th data-sortable="true" scope="col">Action</th>
<th data-sortable="true" scope="col">Date Created</th>
<th data-sortable="true" scope="col">Action</th>
</tr>
</thead>
<tbody id="paymentsTableBody">
@ -246,16 +254,19 @@ if ($_SESSION["isCustomer"] == true) {
}
$totalPayments++;
?>
<tr>
<td><?php echo $orderItems['payment_method']; ?></td>
<td> <?php echo $orderItems['total_amount']; ?></td>
<td><?php echo $orderItems['payment']['status']; ?></td>
<td><?php echo $orderItems['items'][0]['product']['name']; ?></td>
<td><?php echo $formattedDate?></td>
<td><button type="button" class="btn btn-primary showSinglePaymentBtn" data-order-id="<?php echo $orderItems['_id']; ?>" data-bs-toggle="modal" data-bs-target="#vendorPaymentsModal">View</button></td>
<tr>
<td><?php echo $orderItems['payment_method']; ?></td>
<td> <?php echo $orderItems['total_amount']; ?></td>
<td><?php echo $orderItems['payment']['status']; ?></td>
<td><?php echo $orderItems['items'][0]['product']['name']; ?></td>
<td><?php echo $formattedDate?></td>
<td><button type="button" class="btn btn-primary showSinglePaymentBtn"
data-order-id="<?php echo $orderItems['_id']; ?>"
data-bs-toggle="modal"
data-bs-target="#vendorPaymentsModal">View</button></td>
</tr>
</tr>
<?php
}
}
@ -268,190 +279,190 @@ if ($_SESSION["isCustomer"] == true) {
<script>
const itemsPerPage = 5;
const totalItems = <?php echo $totalPayments; ?>;
const totalPages = Math.ceil(totalItems / itemsPerPage);
const itemsPerPage = 5;
const totalItems = <?php echo $totalPayments; ?>;
const totalPages = Math.ceil(totalItems / itemsPerPage);
function showPage(page) {
const startIndex = (page - 1) * itemsPerPage;
const endIndex = startIndex + itemsPerPage;
const tableRows = document.querySelectorAll('#paymentsTableBody 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";
}
});
tableRows.forEach((row, index) => {
if (index >= startIndex && index < endIndex) {
row.style.display = 'table-row';
} else {
row.style.display = 'none';
}
});
}
function showPage(page) {
const startIndex = (page - 1) * itemsPerPage;
const endIndex = startIndex + itemsPerPage;
const tableRows = document.querySelectorAll('#paymentsTableBody tr');
// function createPagination() {
// const paginationContainer = document.getElementById('pagination');
// 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";
}
});
// for (let i = 1; i <= totalPages; i++) {
// // 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);
// }
// }
// createPagination();
showPage(1); // Show the first page by default
tableRows.forEach((row, index) => {
if (index >= startIndex && index < endIndex) {
row.style.display = 'table-row';
} else {
row.style.display = 'none';
}
});
}
// function createPagination() {
// const paginationContainer = document.getElementById('pagination');
// for (let i = 1; i <= totalPages; i++) {
// // 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);
// }
// }
// createPagination();
showPage(1); // Show the first page by default
</script>
<script>
var sessionToken = '<?php echo isset($_SESSION["token"]) ? $_SESSION["token"] : ""; ?>';
var email = '<?php echo isset($_SESSION["email"]) ? $_SESSION["email"] : ""; ?>';
var password = '<?php echo isset($_SESSION["password"]) ? $_SESSION["password"] : ""; ?>';
var sessionToken = '<?php echo isset($_SESSION["token"]) ? $_SESSION["token"] : ""; ?>';
var email = '<?php echo isset($_SESSION["email"]) ? $_SESSION["email"] : ""; ?>';
var password =
'<?php echo isset($_SESSION["password"]) ? $_SESSION["password"] : ""; ?>';
function login(username, password, callback) {
fetch("https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/login", {
method: "POST",
function login(username, password, callback) {
fetch("https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/login", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Api-Key": "{{apiKey}}"
},
body: JSON.stringify({
username: username,
password: password
})
})
.then(response => {
if (response.ok) {
return response.json();
} else {
throw new Error("Unable to login");
}
})
.then(data => {
// Update the session token on the server side
fetch("update-token-session.php", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
token: data.token
})
})
.then(response => response.json())
.then(result => {
if (result.status === 'success') {
// Update the session token in the client-side variable
sessionToken = data.token;
console.log("New Token:", sessionToken);
callback();
} else {
throw new Error("Unable to update session token");
}
});
})
.catch(error => {
console.error("Error:", error.message);
});
}
function updateRefundShipStatus(orderId, image, reason) {
login(email, password, function() {
fetch(`https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/${orderId}`, {
method: 'PATCH',
headers: {
"Content-Type": "application/json",
"X-Api-Key": "{{apiKey}}"
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + sessionToken,
},
body: JSON.stringify({
username: username,
password: password
})
return_order: {
reason: reason,
image: image,
status: 'To Ship',
}
}),
})
.then(response => {
if (response.ok) {
return response.json();
.then(response => response.json())
.then(data => {
// Assuming the server responds with a JSON object indicating success or failure
if (data && data !== "") {
// Update the status in the table without reloading the page
// document.querySelector(`[data-order-id="${orderId}"] .order-status`).innerText = 'COMPLETED';
// location.reload();
} else {
throw new Error("Unable to login");
alert('Failed to update order status');
}
})
.catch(error => {
console.error('Error:', error);
alert('An error occurred while updating order status');
});
})
}
function updateRefundReceiveStatus(orderId, image, reason) {
login(email, password, function() {
fetch(`https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/${orderId}`, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + sessionToken,
},
body: JSON.stringify({
return_order: {
reason: reason,
image: image,
status: 'To Refund',
}
}),
})
.then(response => response.json())
.then(data => {
// Update the session token on the server side
fetch("update-token-session.php", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
token: data.token
})
})
.then(response => response.json())
.then(result => {
if (result.status === 'success') {
// Update the session token in the client-side variable
sessionToken = data.token;
console.log("New Token:", sessionToken);
callback();
} else {
throw new Error("Unable to update session token");
}
});
// Assuming the server responds with a JSON object indicating success or failure
if (data && data !== "") {
// Update the status in the table without reloading the page
// document.querySelector(`[data-order-id="${orderId}"] .order-status`).innerText = 'COMPLETED';
location.reload();
} else {
alert('Failed to update order status');
}
})
.catch(error => {
console.error("Error:", error.message);
console.error('Error:', error);
alert('An error occurred while updating order status');
});
}
})
function updateRefundShipStatus(orderId, image, reason) {
login(email, password, function() {
fetch(`https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/${orderId}`, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + sessionToken,
},
body: JSON.stringify({
return_order: {
reason: reason,
image: image,
status: 'To Ship',
}
}),
})
.then(response => response.json())
.then(data => {
// Assuming the server responds with a JSON object indicating success or failure
if (data && data !== "") {
// Update the status in the table without reloading the page
// document.querySelector(`[data-order-id="${orderId}"] .order-status`).innerText = 'COMPLETED';
// location.reload();
} else {
alert('Failed to update order status');
}
})
.catch(error => {
console.error('Error:', error);
alert('An error occurred while updating order status');
});
})
}
function updateRefundReceiveStatus(orderId, image, reason) {
login(email, password, function() {
fetch(`https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/${orderId}`, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + sessionToken,
},
body: JSON.stringify({
return_order: {
reason: reason,
image: image,
status: 'To Refund',
}
}),
})
.then(response => response.json())
.then(data => {
// Assuming the server responds with a JSON object indicating success or failure
if (data && data !== "") {
// Update the status in the table without reloading the page
// document.querySelector(`[data-order-id="${orderId}"] .order-status`).innerText = 'COMPLETED';
location.reload();
} else {
alert('Failed to update order status');
}
})
.catch(error => {
console.error('Error:', error);
alert('An error occurred while updating order status');
});
})
}
}
//S 03-06-2024 Stacy added upload function
function addProduct() {
console.log("Session Token:", sessionToken);
login(email, password, function() {
// Removed the call to updateSessionToken
window.open("vendor-uploads-add-product-action.php", "_self");
});
}
//S 03-06-2024 Stacy added upload function
function addProduct() {
console.log("Session Token:", sessionToken);
login(email, password, function() {
// Removed the call to updateSessionToken
window.open("vendor-uploads-add-product-action.php", "_self");
});
}
</script>
</div>
</div>
@ -461,11 +472,13 @@ if ($_SESSION["isCustomer"] == true) {
</div>
</section>
<!--Gelo added payment details modal-->
<div class="modal fade" id="vendorPaymentsModal" tabindex="-1" aria-labelledby="vendorPaymentsModalLabel" aria-hidden="true">
<div class="modal fade" id="vendorPaymentsModal" tabindex="-1" aria-labelledby="vendorPaymentsModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-xl" style="min-width: 90%;">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title fs-5" id="vendorPaymentsModalLabel">Payment ID: <span id="paymentIdSpan"></span></h5>
<h5 class="modal-title fs-5" id="vendorPaymentsModalLabel">Payment ID: <span
id="paymentIdSpan"></span></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
@ -481,48 +494,54 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<!-- GELO ADDED AJAX FUNCTION FOR MODAL BOX QUERY -->
<script>
$(document).ready(function() {
$('.showSinglePaymentBtn').click(function() {
var orderId = $(this).data('order-id');
$(document).ready(function() {
$('.showSinglePaymentBtn').click(function() {
var orderId = $(this).data('order-id');
var token = "<?php echo $authtoken;?>";
<?php
var token = "<?php echo $authtoken;?>";
<?php
?>
$.ajax({
// url: 'https://api.obanana.shop/api/v1/orders/' + orderId,
url: 'https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/' + orderId,
type: 'GET',
headers: {
'Authorization': 'Bearer ' + token
},
success: function(response) {
$.ajax({
// url: 'https://api.obanana.shop/api/v1/orders/' + orderId,
url: 'https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/' +
orderId,
type: 'GET',
headers: {
'Authorization': 'Bearer ' + token
},
success: function(response) {
// Handle successful response
console.log(response);
var paymentId = response.payment.reference_number;
$('#paymentIdSpan').text(paymentId);
var gross_price = (response.payment.details[0]?.attributes.data.attributes.amount / 100).toFixed(2);
var payment_status = response.payment.status;
var fee = response.payment.details[0]?.attributes.data.attributes.fee;
var net_amount = (response.payment.details[0]?.attributes.data.attributes.payments[0].attributes.net_amount / 100).toFixed(2);
var desc = response.items[0].product.name;
var method = response.payment_method;
var name = response.billing_address.billing_first_name + " " + response.billing_address.billing_last_name;
var email = response.payment.details[0]?.attributes.data.attributes.payments[0].attributes.billing?.email;
var phone = response.billing_address.billing_phone;
var rawDate = response.payment.details[0]?.attributes.data.attributes.payments[0]?.createdAt;
var payoutStatus = response.payout_status[0]?.status;
if (rawDate){
var createdAtDate = new Date(rawDate);
var month = String(createdAtDate.getMonth() + 1).padStart(2, '0');
var day = String(createdAtDate.getDate()).padStart(2, '0');
var year = createdAtDate.getFullYear();
var date = month + '/' + day + '/' + year;
}
var paymentId = response.payment.reference_number;
$('#paymentIdSpan').text(paymentId);
var gross_price = (response.payment.details[0]?.attributes.data
.attributes.amount / 100).toFixed(2);
var payment_status = response.payment.status;
var fee = response.payment.details[0]?.attributes.data.attributes.fee;
var net_amount = (response.payment.details[0]?.attributes.data
.attributes.payments[0].attributes.net_amount / 100).toFixed(2);
var desc = response.items[0].product.name;
var method = response.payment_method;
var name = response.billing_address.billing_first_name + " " + response
.billing_address.billing_last_name;
var email = response.payment.details[0]?.attributes.data.attributes
.payments[0].attributes.billing?.email;
var phone = response.billing_address.billing_phone;
var rawDate = response.payment.details[0]?.attributes.data.attributes
.payments[0]?.createdAt;
var payoutStatus = response.payout_status[0]?.status;
if (rawDate) {
var createdAtDate = new Date(rawDate);
var month = String(createdAtDate.getMonth() + 1).padStart(2, '0');
var day = String(createdAtDate.getDate()).padStart(2, '0');
var year = createdAtDate.getFullYear();
var date = month + '/' + day + '/' + year;
}
if(payoutStatus === 'Deposited'){
var orderDetailsHtml = `
if (payoutStatus === 'Deposited') {
var orderDetailsHtml = `
<div class="row">
<div class="col-12">
@ -589,8 +608,8 @@ if ($_SESSION["isCustomer"] == true) {
</div>
</div>
`;
}else{
var orderDetailsHtml = `
} else {
var orderDetailsHtml = `
<div class="row">
<div class="col-12">
@ -650,13 +669,13 @@ if ($_SESSION["isCustomer"] == true) {
</div>
</div>
`;
}
$('#orderDetailsContainer').html(orderDetailsHtml);
},
})
});
}
$('#orderDetailsContainer').html(orderDetailsHtml);
},
})
});
});
</script>
<!-- Footer Start -->
<?php include "footer.php" ?>
@ -668,16 +687,20 @@ if ($_SESSION["isCustomer"] == true) {
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
<a href="#ec-mobile-menu" class="navbar-toggler-btn ec-header-btn ec-side-toggle"><i class="fi-rr-menu-burger"></i></a>
<a href="#ec-mobile-menu" class="navbar-toggler-btn ec-header-btn ec-side-toggle"><i
class="fi-rr-menu-burger"></i></a>
</div>
<div class="ec-nav-panel-icons">
<a href="#ec-side-cart" class="toggle-cart ec-header-btn ec-side-toggle"><i class="fi-rr-shopping-bag"></i><span class="ec-cart-noti ec-header-count cart-count-lable">3</span></a>
<a href="#ec-side-cart" class="toggle-cart ec-header-btn ec-side-toggle"><i
class="fi-rr-shopping-bag"></i><span
class="ec-cart-noti ec-header-count cart-count-lable">3</span></a>
</div>
<div class="ec-nav-panel-icons">
<a href="index.php" class="ec-header-btn"><i class="fi-rr-home"></i></a>
</div>
<div class="ec-nav-panel-icons">
<a href="wishlist.html" class="ec-header-btn"><i class="fi-rr-heart"></i><span class="ec-cart-noti">4</span></a>
<a href="wishlist.html" class="ec-header-btn"><i class="fi-rr-heart"></i><span
class="ec-cart-noti">4</span></a>
</div>
<div class="ec-nav-panel-icons">
<a href="login.php" class="ec-header-btn"><i class="fi-rr-user"></i></a>
@ -697,7 +720,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<!-- Cart Floating Button end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>
@ -772,7 +795,7 @@ if ($_SESSION["isCustomer"] == true) {
<script src="assets/js/vendor/bootstrap.min.js"></script>
<script src="assets/js/vendor/jquery-migrate-3.3.0.min.js"></script>
<script src="assets/js/vendor/modernizr-3.11.2.min.js"></script>
<!--Plugins JS-->
@ -786,9 +809,9 @@ if ($_SESSION["isCustomer"] == true) {
<script src="assets/js/plugins/jquery.sticky-sidebar.js"></script>
<script src="assets/js/plugins/nouislider.js"></script>
<!-- <script src="https://cdn.metroui.org.ua/current/metro.js"></script> -->
<script>
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
<script>
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
</script>
<!-- Main Js -->
<script src="assets/js/vendor/index.js"></script>

View File

@ -61,7 +61,10 @@ $vendorPayoutData = json_decode($response, true);
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -315,7 +318,7 @@ $vendorPayoutData = json_decode($response, true);
<div class="ec-vendor-card-body">
<div class="ec-vendor-card-table">
<table class="table ec-table"
id="order-table" style="overflow-x: auto;"
id="payout-table" style="overflow-x: auto;"
data-role="table"
data-pagination="true"
data-searching="true"
@ -339,7 +342,7 @@ $vendorPayoutData = json_decode($response, true);
</thead>
<tbody class='table-group-divider'>
<?php
foreach ($vendorPayoutData as $x => $val) {
foreach (array_reverse($vendorPayoutData) as $x => $val) {
$vendorIdCheck = $val['vendor_details'][0]['vendor_id'];
$status = ucfirst(strtolower($val['status']));
$payoutDate = date("F d, Y", strtotime($val['createdAt']));

View File

@ -28,7 +28,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -52,7 +52,10 @@ if ($_SESSION["isCustomer"] == true) {
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -17,7 +17,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -47,7 +47,10 @@ if ($_SESSION["isCustomer"] == true) {
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -494,7 +497,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<div class="form-group">
<label for="addressBuilding" class="text-dark font-weight-medium pt-3 mb-2">Building,Number</label>
<label for="addressBuilding" class="text-dark font-weight-medium pt-3 mb-2">House/Unit/Floor #, Bldg Name, Block or Lot #</label>
<input type="text" class="form-control" id="addressBuilding2" value="<?php echo $address['address_1']; ?>">
<!-- <label for="addressBuilding" class="text-dark font-weight-medium pt-3 mb-2"> Building,Number </label>
@ -584,6 +587,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<div id="editDelete" style="display:flex; float:right; width:20px; margin-top:20px; margin-right:-20px; margin-top:30px;">
<!-- <i class="fa-solid fa-pen" style="font-size:15px; float:right;"></i></a> -->
<i onclick="deleteBank('<?php echo $vendor['_id']; ?>', <?php echo $bank_index; ?>, true)"
class="fa-regular fa-trash-can" style="font-size:15px; float:right;"></i>
</div>
@ -1473,7 +1477,6 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Script added by Louie for Dynamic Edit Modal Box. May 08, 2024 -->
<script>
const vendorid = `<?php echo $_SESSION["LoggedInVendorId"]; ?>`;
$('#editBankModal').on('shown.bs.modal', function (event) {
var jsonString = $(event.relatedTarget).data('value');
var jsonObject = JSON.parse(jsonString);
@ -1488,9 +1491,8 @@ if ($_SESSION["isCustomer"] == true) {
$('#editBankBtn').on('click', function() {
console.log(vendorid)
// function updateAddress(){
// Retrieve existing addresses from the API
const vendorid = `<?php echo $_SESSION["LoggedInVendorId"]; ?>`;
console.log("The vendorid is", vendorid)
// fetch('https://api.obanana.shop/api/v1/customers/65482e8d209ff8d348bd30fd')
fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/' + vendorid)
.then(response => response.json())
@ -1551,15 +1553,16 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Script added by Louie for Deleting Bank Information. May 08, 2024 -->
<script>
const vendorid = `<?php echo $_SESSION["LoggedInVendorId"]; ?>`;
function deleteBank(vendorid, bankIndex) {
fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/' + vendorid)
const vendorId = `<?php echo $_SESSION["LoggedInVendorId"]; ?>`;
function deleteBank(vendorId, bankIndex) {
fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/' + vendorId)
.then(response => response.json())
.then(data => {
let existingBank = data.bank_acount_details || [];
if (bankIndex >= 0 && bankIndex < existingBank.length) {
existingBank.splice(bankIndex, 1);
fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/' + vendorid, {
fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/' + vendorId, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json'

View File

@ -47,7 +47,10 @@ if ($_SESSION["isCustomer"] == true) {
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />

View File

@ -41,7 +41,10 @@ if ($_SESSION["isVendor"] == true) {
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->