This commit is contained in:
mark H 2024-05-03 18:24:24 +08:00
commit 7c5c0cab4f
21 changed files with 989 additions and 442 deletions

View File

@ -7,12 +7,18 @@ $(document).ready(function() {
fetchData()
.then(function (response) {
responseData = response.data;
console.log(responseData);
// console.log(responseData);
const completedOrdersCount = countCompletedOrders(responseData);
const toPayOrdersCount = countToPayOrders(responseData);
const toShipOrdersCount = countToShipOrders(responseData);
const returnedOrdersCount = countReturnedOrders(responseData);
const { cod_monthly_totals, obpay_monthly_totals, months } = countMonthlySales(responseData);
const { cod_daily_totals, obpay_daily_totals } = countDailySales(responseData);
const { cod_yearly_totals, obpay_yearly_totals, years } = countYearlySales(responseData);
initializeChart(completedOrdersCount, toPayOrdersCount, toShipOrdersCount, returnedOrdersCount);
initializeSalesChart(cod_daily_totals, obpay_daily_totals, cod_monthly_totals,
obpay_monthly_totals, months, cod_yearly_totals, obpay_yearly_totals, years
);
})
.catch(function (error) {
console.error('Error fetching data:', error);
@ -47,6 +53,207 @@ $(document).ready(function() {
return completedOrdersCount;
}
function countYearlySales(data) {
const now = new Date();
const years = [];
const cod_yearly_totals = Array(5).fill(0);
const obpay_yearly_totals = Array(5).fill(0);
// Initialize years array with the current year and the previous four years
for (let i = 4; i >= 0; i--) {
const year = new Date(now.getFullYear() - i, 0, 1); // January 1st of each year
years.push(year);
}
data.forEach(order => {
const orderDate = new Date(order.order_date);
orderDate.setHours(0, 0, 0, 0);
// Check if payment status exists and is not null
if (order.payment && order.payment.status) {
const payment_status = order.payment.status.toLowerCase();
years.forEach((year, index) => {
if (orderDate.getFullYear() === year.getFullYear()) {
if (payment_status === "paid") {
const total_amount = parseInt(order.total_amount);
if (order.payment_method === "Cash On Delivery") {
cod_yearly_totals[4 - index] += total_amount; // Adjust index since we are going from current to past
} else if (order.payment_method === "Obananapay") {
obpay_yearly_totals[4 - index] += total_amount;
}
}
}
});
}
});
cod_yearly_totals.reverse();
obpay_yearly_totals.reverse();
return {
cod_yearly_totals,
obpay_yearly_totals,
years: years.map(year => year.getFullYear().toString()) // Return year labels for use in charts or displays
};
}
function countMonthlySales(data) {
const now = new Date();
const months = [];
const cod_monthly_totals = Array(12).fill(0);
const obpay_monthly_totals = Array(12).fill(0);
for (let i = 11; i >= 0; i--) {
const month = new Date(now.getFullYear(), now.getMonth() - i, 1);
months.push(month);
}
data.forEach(order => {
if (order.payment && order.payment.status){
const orderDate = new Date(order.order_date);
orderDate.setHours(0, 0, 0, 0);
const payment_status = order.payment.status.toLowerCase();
months.forEach((month, index) => {
if (orderDate.getFullYear() === month.getFullYear() && orderDate.getMonth() === month.getMonth()) {
if (payment_status === "paid") {
const total_amount = parseInt(order.total_amount);
if (order.payment_method === "Cash On Delivery") {
cod_monthly_totals[11 - index] += total_amount;
} else if (order.payment_method === "Obananapay") {
obpay_monthly_totals[11 - index] += total_amount;
}
}
}
});
}
});
console.log(cod_monthly_totals)
cod_monthly_totals.reverse();
obpay_monthly_totals.reverse();
return {
cod_monthly_totals,
obpay_monthly_totals,
months: months.map(month => `${month.toLocaleString('default', { month: 'short' })} ${month.getFullYear()}`) // Return month labels for use in charts or displays
};
}
function countDailySales(data) {
const today = new Date();
today.setHours(0, 0, 0, 0);
const sevenDaysAgo = new Date();
sevenDaysAgo.setDate(today.getDate() - 6);
sevenDaysAgo.setHours(0, 0, 0, 0);
const sixDaysAgo = new Date();
sixDaysAgo.setDate(today.getDate() - 5);
sixDaysAgo.setHours(0, 0, 0, 0);
const fiveDaysAgo = new Date();
fiveDaysAgo.setDate(today.getDate() - 4);
fiveDaysAgo.setHours(0, 0, 0, 0);
const fourDaysAgo = new Date();
fourDaysAgo.setDate(today.getDate() - 3);
fourDaysAgo.setHours(0, 0, 0, 0);
const threeDaysAgo = new Date();
threeDaysAgo.setDate(today.getDate() - 2);
threeDaysAgo.setHours(0, 0, 0, 0);
const twoDaysAgo = new Date();
twoDaysAgo.setDate(today.getDate() - 1);
twoDaysAgo.setHours(0, 0, 0, 0);
//variables for total daily sales on COD
let cod_total_7 = 0;
let cod_total_6 = 0;
let cod_total_5 = 0;
let cod_total_4 = 0;
let cod_total_3 = 0;
let cod_total_2 = 0;
let cod_total_1 = 0;
//variables for total daily sales on ObananaPay
let obpay_total_7 = 0;
let obpay_total_6 = 0;
let obpay_total_5 = 0;
let obpay_total_4 = 0;
let obpay_total_3 = 0;
let obpay_total_2 = 0;
let obpay_total_1 = 0;
data.forEach(order => {
const orderDate = new Date(order.order_date);
orderDate.setHours(0, 0, 0, 0);
const payment_status = order.payment.status;
if (orderDate.getTime() === sevenDaysAgo.getTime() ) {
if(payment_status.toLowerCase() === "paid" && order.payment_method === "Cash On Delivery" ){
cod_total_7 += parseInt(order.total_amount);
console.log(order)
// console.log("compare:" + sevenDaysAgo)
}else if (payment_status.toLowerCase() === "paid" && order.payment_method === "Obananapay") {
obpay_total_7 += parseInt(order.total_amount);
}
}else if (orderDate.getTime() === sixDaysAgo.getTime() ) {
if(payment_status.toLowerCase() === "paid" && order.payment_method === "Cash On Delivery" ){
cod_total_6 += parseInt(order.total_amount);
console.log(order)
// console.log("compare:" + sevenDaysAgo)
}else if (payment_status.toLowerCase() === "paid" && order.payment_method === "Obananapay") {
obpay_total_6 += parseInt(order.total_amount);
}
}else if (orderDate.getTime() === fiveDaysAgo.getTime() ) {
if(payment_status.toLowerCase() === "paid" && order.payment_method === "Cash On Delivery" ){
cod_total_5 += parseInt(order.total_amount);
console.log(order)
// console.log("compare:" + sevenDaysAgo)
}else if (payment_status.toLowerCase() === "paid" && order.payment_method === "Obananapay") {
obpay_total_5 += parseInt(order.total_amount);
}
}else if (orderDate.getTime() === fourDaysAgo.getTime() ) {
if(payment_status.toLowerCase() === "paid" && order.payment_method === "Cash on Delivery" ){
cod_total_4 += parseInt(order.total_amount);
console.log(order)
// console.log("compare:" + sevenDaysAgo)
}else if (payment_status.toLowerCase() === "paid" && order.payment_method === "Obananapay") {
obpay_total_4 += parseInt(order.total_amount);
}
}else if (orderDate.getTime() === threeDaysAgo.getTime() ) {
if(payment_status.toLowerCase() === "paid" && order.payment_method === "Cash On Delivery" ){
cod_total_3 += parseInt(order.total_amount);
console.log(order)
// console.log("compare:" + sevenDaysAgo)
}else if (payment_status.toLowerCase() === "paid" && order.payment_method === "Obananapay") {
obpay_total_3 += parseInt(order.total_amount);
}
}else if (orderDate.getTime() === twoDaysAgo.getTime() ) {
if(payment_status.toLowerCase() === "paid" && order.payment_method === "Cash On Delivery" ){
cod_total_2 += parseInt(order.total_amount);
console.log(order)
// console.log("compare:" + sevenDaysAgo)
}else if (payment_status.toLowerCase() === "paid" && order.payment_method === "Obananapay") {
obpay_total_2 += parseInt(order.total_amount);
}
}else if (orderDate.getTime() === today.getTime() ) {
if(payment_status.toLowerCase() === "paid" && order.payment_method === "Cash On Delivery" ){
cod_total_1 += parseInt(order.total_amount);
console.log(order)
// console.log("compare:" + sevenDaysAgo)
}else if (payment_status.toLowerCase() === "paid" && order.payment_method === "Obananapay") {
obpay_total_1 += parseInt(order.total_amount);
}
}
});
const cod_daily_totals = [cod_total_7, cod_total_6, cod_total_5, cod_total_4, cod_total_3, cod_total_2, cod_total_1,];
const obpay_daily_totals = [obpay_total_7, obpay_total_6, obpay_total_5, obpay_total_4, obpay_total_3, obpay_total_2, obpay_total_1,];
// console.log(total_7);
return { cod_daily_totals, obpay_daily_totals };
}
function countToPayOrders(data) {
const filteredData = getCurrentMonthData(data);
let toPayOrdersCount = 0;
@ -127,11 +334,13 @@ $(document).ready(function() {
}
}
});
} else {
}
}
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) {
function updateDailyLabels() {
@ -151,23 +360,23 @@ $(document).ready(function() {
// Updating labelsDaily dynamically
var labelsDaily = updateDailyLabels();
var labelsMonthly = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
var labelsYearly = ["2021", "2022", "2023", "2024", "2025"];
var labelsMonthly = months;
var labelsYearly = years;
var acqData = [
{ //daily data
first: [91, 180, 44, 75, 150, 66, 70], //COD
second: [300, 44, 177, 76, 23, 189, 12], //ObPay
first: cod_daily_totals, //COD
second: obpay_daily_totals, //ObPay
third: [44, 167, 102, 123, 183, 88, 134] //Paymongo
},
{ //monthly data
first: [144, 44, 110, 5, 123, 89, 12], //COD
second: [22, 123, 45, 130, 112, 54, 181], //ObPay
first: cod_monthly_totals, //COD
second: obpay_monthly_totals, //ObPay
third: [55, 44, 144, 75, 155, 166, 70] //Paymongo
},
{ //yearly data
first: [134, 80, 123, 65, 171, 33, 22], //COD
second: [44, 144, 77, 76, 123, 89, 112], //ObPay
third: [156, 23, 165, 88, 112, 54, 181] //Paymongo
first: cod_yearly_totals, //COD
second: obpay_yearly_totals, //ObPay
third: [156, 23, 165, 88, 112 ] //Paymongo
}
];
@ -253,8 +462,8 @@ $(document).ready(function() {
},
ticks: {
beginAtZero: true,
stepSize: 100,
max: 1000
stepSize: 20000,
max: 200000
}
}
]
@ -313,9 +522,10 @@ $(document).ready(function() {
lineAcq.update();
});
});
});
items[0].click();
}
}
function convertToCSV(data) {
const now = new Date();

View File

@ -1,10 +1,6 @@
<style>
.sidenav-item.active {
background-color: #f0f0f0; /* Change background color */
}
.sidenav-item.active .nav-text {
color: #333; /* Change text color */
.nav-link:hover{
border-left: 5px solid #87CEFA;
}
</style>
@ -21,18 +17,17 @@
<!-- begin sidebar scrollbar -->
<div class="ec-navigation" data-simplebar>
<!-- sidebar menu -->
<ul class="nav sidebar-inner" id="sidebar-menu">
<ul class="nav sidebar-inner">
<!-- Dashboard -->
<li class="active">
<li class="nav-link">
<a class="sidenav-item-link" href="index.php">
<i class="mdi mdi-view-dashboard-outline"></i>
<span class="nav-text">Dashboard</span>
</a>
<hr>
</li>
<!-- Vendors -->
<li>
<li class="nav-link">
<a class="sidenav-item-link" href="vendor-card.php">
<i class="mdi mdi-account-group-outline"></i>
<span class="nav-text">Vendors</span>
@ -60,7 +55,7 @@
</li>
<!-- Users -->
<li >
<li class="nav-link">
<a class="sidenav-item-link" href="user-card.php">
<i class="mdi mdi-account-group"></i>
<span class="nav-text">Users</span>
@ -143,7 +138,7 @@
</li> -->
<!-- Orders -->
<li >
<li class="nav-link">
<a class="sidenav-item-link" href="order-history.php">
<i class="mdi mdi-cart"></i>
<span class="nav-text">Orders</span>
@ -257,4 +252,6 @@
</ul>
</div>
</div>
</div>
</div>

View File

@ -134,33 +134,35 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
<script>
function updateCartItemCount() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "cartitems.php?id=<?php echo $_SESSION['customerId']; ?>", true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
var data = xhr.responseText;
if (data !== "") {
console.log("Data: " + data);
document.getElementById("cartItemCount").innerHTML = data;
var xhr = new XMLHttpRequest();
xhr.open("GET", "cartitems.php?id=<?php echo $_SESSION['customerId']; ?>", true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
var data = xhr.responseText;
if (data !== "") {
console.log("Data: " + data);
document.getElementById("cartItemCount").innerHTML = data;
document.getElementById("cartNewItemCount").innerHTML = data;
}
}
};
xhr.send();
}
}
};
xhr.send();
}
function updateWishItemCount() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "wishlistitems.php?id=<?php echo $_SESSION['customerId']; ?>", true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
var data = xhr.responseText;
if (data !== "") {
document.getElementById("wishItemCount").innerHTML = data;
function updateWishItemCount() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "wishlistitems.php?id=<?php echo $_SESSION['customerId']; ?>", true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
var data = xhr.responseText;
if (data !== "") {
document.getElementById("wishItemCount").innerHTML = data;
document.getElementById("wishNewItemCount").innerHTML = data;
}
}
};
xhr.send();
}
}
};
xhr.send();
}
</script>
<!-- raymart added css feb 14 2024 -->
@ -350,7 +352,9 @@ function updateWishItemCount() {
<div class="col-lg-3 col-md-6 ec-catalog-since pad-15">
<h6>Seller since</h6>
<p><?php echo $vendor["date_registered"] ?></p>
<!-- <p><?php echo $vendor["date_registered"] ?></p> -->
<p><?php echo date('F j, Y', strtotime($vendor['date_registered'])); ?></p>
</div>
</div>
@ -526,7 +530,7 @@ xhrVendors1.onreadystatechange = function() {
let imageUrls = product.images.split(',');
let firstImageUrl = imageUrls[0].trim();
let img = document.createElement("img");
img.setAttribute("style", "width: 290px; height: 200px; object-fit: cover;");
img.setAttribute("style", "border: 1px solid #eeeeee; height: 330px; object-fit: cover;");
img.setAttribute("class", "main-image");
img.setAttribute("src", firstImageUrl);
img.setAttribute("alt", "Product");
@ -537,7 +541,7 @@ xhrVendors1.onreadystatechange = function() {
} else {
let img = document.createElement("img");
img.className = "main-image";
img.setAttribute("style", "width: 290px; height: 200px; object-fit: cover;");
img.setAttribute("style", "border: 1px solid #eeeeee; height: 330px; object-fit: cover;");
img.setAttribute("loading", "lazy");
img.setAttribute("class", "main-image");
img.setAttribute("src", "https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png");
@ -550,14 +554,21 @@ xhrVendors1.onreadystatechange = function() {
card.classList.add("col-lg-4", "col-md-6", "col-sm-6", "col-xs-6", "mb-6", "pro-gl-content", "width-100");
card.innerHTML = `
<div class="ec-product-inner">
<div class="ec-pro-image-outer" style="width: 290px; height: 200px;">
<div class="ec-pro-image-outer" style="max-width: 290px; height: 350px;">
<div class="ec-pro-image">
<a href="product-left-sidebar.php?id=${product._id}">
${imageContainer.innerHTML} <!-- Include the dynamically loaded image here -->
</a>
<div class="ec-pro-actions" style="bottom: -36px;">
<button title="Add To Cart" onclick="popupAddToCart('${encodeURIComponent(JSON.stringify(product))}','${encodeURIComponent(JSON.stringify(vendorOfProduct))}', '${token}', '${email}', '${password}', '${encodeURIComponent(JSON.stringify(customer_data))}');" class="add-to-cart"><i class="fi-rr-shopping-basket"></i> Add To Cart</button>
<a class="ec-btn-group wishlist" title="Wishlist" onclick="popupWishlist('${encodeURIComponent(JSON.stringify(product))}', '${encodeURIComponent(JSON.stringify(customer_data))}');"><i class="fi-rr-heart"></i></a>
${
(product["sale_price"] && product["sale_price"] > 0) ?
`<button title="Add To Cart" onclick="popupAddToCart('${encodeURIComponent(JSON.stringify(product))}','${encodeURIComponent(JSON.stringify(vendorOfProduct))}', '${token}', '${email}', '${password}', '${encodeURIComponent(JSON.stringify(customer_data))}');" class="add-to-cart"><i class="fi-rr-shopping-basket"></i> Add To Cart</button>
<a class="ec-btn-group wishlist" title="Wishlist" onclick="popupWishlist('${encodeURIComponent(JSON.stringify(product))}', '${encodeURIComponent(JSON.stringify(customer_data))}');"><i class="fi-rr-heart"></i></a>` :
(product["regular_price"] && product["regular_price"] != "") ?
`<button title="Add To Cart" onclick="popupAddToCart('${encodeURIComponent(JSON.stringify(product))}','${encodeURIComponent(JSON.stringify(vendorOfProduct))}', '${token}', '${email}', '${password}', '${encodeURIComponent(JSON.stringify(customer_data))}');" class="add-to-cart"><i class="fi-rr-shopping-basket"></i> Add To Cart</button>
<a class="ec-btn-group wishlist" title="Wishlist" onclick="popupWishlist('${encodeURIComponent(JSON.stringify(product))}', '${encodeURIComponent(JSON.stringify(customer_data))}');"><i class="fi-rr-heart"></i></a>` :
`<a class="ec-btn-group wishlist" title="Wishlist" onclick="popupWishlist('${encodeURIComponent(JSON.stringify(product))}', '${encodeURIComponent(JSON.stringify(customer_data))}');"><i class="fi-rr-heart"></i></a>`
}
</div>
</div>
</div>
@ -1166,7 +1177,7 @@ maxPriceInput.addEventListener('input', function() {
<!-- Modal end -->
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<!-- <div class="ec-nav-toolbar">
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
@ -1187,7 +1198,7 @@ maxPriceInput.addEventListener('input', function() {
</div>
</div>
</div>
</div> -->
<!-- Footer navigation panel for responsive display end -->
<!-- Recent Purchase Popup -->

View File

@ -1,3 +1,7 @@
<style>
</style>
<!-- Footer Start -->
<footer class="ec-footer section-space-mt">
<div class="footer-container">
@ -165,5 +169,30 @@
</div>
</div>
</div>
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<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>
</div> -->
<div class="ec-nav-panel-icons">
<a href="cart.php" class="ec-header-btn ec-header-wishlist">
<div class="header-icon"><i class="fi-rr-shopping-bag"></i></div>
</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.php" class="ec-header-btn"><i class="fi-rr-heart"></i></a>
</div>
<div class="ec-nav-panel-icons">
<a href="#" class="ec-header-btn"><i class="fi-rr-user"></i></a>
</div>
</div>
</div>
</div>
<!-- Footer navigation panel for responsive display -->
</footer>
<!-- Footer Area End -->
<!-- Footer Area End -->

View File

@ -139,6 +139,22 @@ if ($_SESSION["userId"] <> "") {
font-size: 16px;
line-height: 1;
}
@media (hover: hover), (hover: none) {
.fi-rr-heart:hover,
.fi-rr-heart:active,
.fi-rr-user:hover,
.fi-rr-user:active,
.fi-rr-shopping-bag:hover,
.fi-rr-shopping-bag:active,
.fi-rr-shopping-basket:hover,
.fi-rr-shopping-basket:active,
.fi-rr-home:hover,
.fi-rr-home:active {
cursor: pointer !important;
color: #005eff !important;
}
}
</style>
@ -288,13 +304,13 @@ if ($_SESSION["userId"] <> "") {
<!-- Header Cart Start -->
<a href="wishlist.php" class="ec-header-btn ec-header-wishlist">
<div class="header-icon"><i class="fi-rr-heart"></i></div>
<span class="ec-header-count">0</span>
<span id="wishNewItemCount" class="ec-header-count">0</span>
</a>
<!-- Header Cart End -->
<!-- Header Cart Start -->
<a href="cart.php" class="ec-header-btn ec-header-wishlist">
<div class="header-icon"><i class="fi-rr-shopping-bag"></i></div>
<span class="ec-header-count cart-count-lable">0</span>
<span id="cartNewItemCount" class="ec-header-count">0</span>
</a>
<!-- Header Cart End -->
<a href="javascript:void(0)" class="ec-header-btn ec-sidebar-toggle">
@ -372,6 +388,9 @@ if ($_SESSION["userId"] <> "") {
</div>
<!-- Header User End -->
<!-- Header wishlist Start -->
<?php
if (($_SESSION["isCustomer"] == true) && ($_SESSION["isVendor"] == false) || ($_SESSION["isLoggedIn"] == false)) {
?>
<a href="wishlist.php" class="ec-header-btn ec-header-wishlist">
<div class="header-icon"><i class="fi-rr-heart"></i></div>
<span class="ec-header-count">
@ -861,6 +880,9 @@ if ($_SESSION["userId"] <> "") {
</div>
</div>
</div>
<?php
}
?>
<!-- Header Cart End -->
</div>
</div>
@ -1141,23 +1163,41 @@ if ($_SESSION["userId"] <> "") {
</ul>
</li> -->
<li><a href="offer.php">Hot Offers</a></li>
<li class="dropdown scroll-to"><a href="javascript:void(0)"><i class="fi fi-rr-sort-amount-down-alt"></i></a>
<?php
// Check if the current page is the index page
if(basename($_SERVER['PHP_SELF']) === 'index.php') {
//include the scroll menu
?>
<li class="dropdown scroll-to"><a href="javascript:void(0)"><i class="fi fi-rr-sort-amount-down-alt"></i></a>
<ul class="sub-menu">
<li class="menu_title">Scroll To Section</li>
<li><a href="javascript:void(0)" data-scroll="collection" class="nav-scroll">Top Collection</a></li>
<li><a href="javascript:void(0)" data-scroll="categories" class="nav-scroll">Categories</a></li>
<li><a href="javascript:void(0)" data-scroll="vendors" class="nav-scroll">Top Vendors</a></li>
<li><a href="javascript:void(0)" data-scroll="services" class="nav-scroll">Services</a></li>
<li><a href="javascript:void(0)" data-scroll="arrivals" class="nav-scroll">New Arrivals</a></li>
</ul>
</li>
<?php
}
?>
<!-- <li class="dropdown scroll-to"><a href="javascript:void(0)"><i class="fi fi-rr-sort-amount-down-alt"></i></a>
<ul class="sub-menu">
<li class="menu_title">Scroll To Section</li>
<li><a href="javascript:void(0)" data-scroll="collection" class="nav-scroll">Top
Collection</a></li>
<li><a href="javascript:void(0)" data-scroll="categories" class="nav-scroll">Categories</a></li>
<!-- <li><a href="javascript:void(0)" data-scroll="offers" class="nav-scroll">Offers</a></li> -->
<li><a href="javascript:void(0)" data-scroll="offers" class="nav-scroll">Offers</a></li>
<li><a href="javascript:void(0)" data-scroll="vendors" class="nav-scroll">Top
Vendors</a></li>
<li><a href="javascript:void(0)" data-scroll="services" class="nav-scroll">Services</a></li>
<li><a href="javascript:void(0)" data-scroll="arrivals" class="nav-scroll">New
Arrivals</a></li>
<!-- <li><a href="javascript:void(0)" data-scroll="reviews" class="nav-scroll">Client
Review</a></li> -->
<!-- <li><a href="javascript:void(0)" data-scroll="insta" class="nav-scroll">Instagram Feed</a></li> -->
<li><a href="javascript:void(0)" data-scroll="reviews" class="nav-scroll">Client
Review</a></li>
<li><a href="javascript:void(0)" data-scroll="insta" class="nav-scroll">Instagram Feed</a></li>
</ul>
</li>
</li> -->
</ul>
</div>
</div>

View File

@ -76,11 +76,13 @@ if ($_SESSION["userId"] <> "") {
}
</style>
<script>
function updateCartItemCount() {
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;
document.getElementById("cartNewItemCount").innerHTML = data;
}
});
}
@ -89,6 +91,8 @@ if ($_SESSION["userId"] <> "") {
$.get("wishlistitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data) {
if (data != "") {
document.getElementById("wishItemCount").innerHTML = data;
document.getElementById("wishNewItemCount").innerHTML = data;
}
});
}
@ -224,9 +228,9 @@ if ($_SESSION["userId"] <> "") {
$vendorOfProduct = getVendorbyId($forAll[$pid]['vendor_api_id']);
?>
<div class="col-lg-3 col-md-6 col-sm-6 col-xs-6 mb-6 ec-product-content" data-animation="fadeIn">
<div class="ec-product-inner" style="width: 260px;">
<div class="ec-product-inner">
<!-- raymart added style feb 26 2024 -->
<div class="ec-pro-image-outer">
<div class="ec-pro-image-outer" style="max-width: 290px; height: 350px;">
<!-- <div class="ec-pro-image-outer"> -->
<div class="ec-pro-image">
<a href="product-left-sidebar.php?id=<?php echo $forAll[$pid]["_id"]; ?>">
@ -237,7 +241,7 @@ if ($_SESSION["userId"] <> "") {
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img loading="lazy" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 280px;" />
<img loading="lazy" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 330px; object-fit: cover;" />
<?php
}
} else {
@ -344,9 +348,9 @@ if ($_SESSION["userId"] <> "") {
$vendorOfProduct = getVendorbyId($electronics[$pid]['vendor_api_id']);
?>
<div class="col-lg-3 col-md-6 col-sm-6 col-xs-6 mb-6 ec-product-content" data-animation="fadeIn">
<div class="ec-product-inner" style="width: 260px;">
<div class="ec-product-inner">
<!-- raymart added style feb 26 2024 -->
<div class="ec-pro-image-outer">
<div class="ec-pro-image-outer" style="max-width: 290px; height: 350px;">
<!-- <div class="ec-pro-image-outer"> -->
<div class="ec-pro-image">
<a href="product-left-sidebar.php?id=<?php echo $electronics[$pid]["_id"]; ?>">
@ -357,7 +361,7 @@ if ($_SESSION["userId"] <> "") {
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img loading="lazy" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 280px;" />
<img loading="lazy" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 330px; object-fit: cover;" />
<?php
}
} else {
@ -466,9 +470,9 @@ if ($_SESSION["userId"] <> "") {
$vendorOfProduct = getVendorbyId($smartHome[$pid]['vendor_api_id']);
?>
<div class="col-lg-3 col-md-6 col-sm-6 col-xs-6 mb-6 ec-product-content" data-animation="fadeIn">
<div class="ec-product-inner" style="width: 260px;">
<div class="ec-product-inner">
<!-- raymart added style feb 26 2024 -->
<div class="ec-pro-image-outer">
<div class="ec-pro-image-outer" style="max-width: 290px; height: 350px;">
<!-- <div class="ec-pro-image-outer"> -->
<div class="ec-pro-image">
<a href="product-left-sidebar.php?id=<?php echo $smartHome[$pid]["_id"]; ?>">
@ -479,7 +483,7 @@ if ($_SESSION["userId"] <> "") {
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img loading="lazy" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 280px;" />
<img loading="lazy" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 330px; object-fit: cover;" />
<?php
}
} else {
@ -586,9 +590,9 @@ if ($_SESSION["userId"] <> "") {
$vendorOfProduct = getVendorbyId($forVehicle[$pid]['vendor_api_id']);
?>
<div class="col-lg-3 col-md-6 col-sm-6 col-xs-6 mb-6 ec-product-content" data-animation="fadeIn">
<div class="ec-product-inner" style="width: 260px;">
<div class="ec-product-inner">
<!-- raymart added style feb 26 2024-->
<div class="ec-pro-image-outer">
<div class="ec-pro-image-outer" style="max-width: 290px; height: 350px;">
<!-- <div class="ec-pro-image-outer"> -->
<div class="ec-pro-image">
<a href="product-left-sidebar.php?id=<?php echo $forVehicle[$pid]["_id"]; ?>">
@ -599,7 +603,7 @@ if ($_SESSION["userId"] <> "") {
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img loading="lazy" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 280px;" />
<img loading="lazy" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 330px; object-fit: cover;" />
<?php
}
} else {
@ -1229,9 +1233,9 @@ if ($_SESSION["userId"] <> "") {
$vendorOfProduct = getVendorbyId($newArrival[$pid]['vendor_api_id']);
?>
<div class="col-lg-3 col-md-6 col-sm-6 col-xs-6 mb-6 ec-product-content" data-animation="flipInY">
<div class="ec-product-inner" style="width: 260px;">
<div class="ec-product-inner">
<!-- raymart added style feb 26 2024 -->
<div class="ec-pro-image-outer">
<div class="ec-pro-image-outer" style="max-width: 290px; height: 350px;">
<!-- <div class="ec-pro-image-outer"> -->
<div class="ec-pro-image">
<a href="product-left-sidebar.php?id=<?php echo $newArrival[$pid]["_id"]; ?>">
@ -1242,7 +1246,7 @@ if ($_SESSION["userId"] <> "") {
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img loading="lazy" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 280px;" />
<img loading="lazy" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 330px; object-fit: cover;" />
<?php
}
} else {
@ -1671,7 +1675,7 @@ if ($_SESSION["userId"] <> "") {
</div>
<!-- Newsletter Modal end -->
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<!-- <div class="ec-nav-toolbar">
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
@ -1692,7 +1696,7 @@ if ($_SESSION["userId"] <> "") {
</div>
</div>
</div>
</div> -->
<!-- Footer navigation panel for responsive display end -->
<!-- Recent Purchase Popup -->

View File

@ -321,7 +321,7 @@ function loadProducts(page,isFilter) {
let product = prod;
// let vendor = prod.vendor;
let vendorOfProduct = prod.vendor;
let vendorOfProduct = prod;
// let card = document.createElement("div");
let token ="<?php echo $_SESSION['token'] ?>";
let email ="<?php echo $_SESSION['email'] ?>";
@ -334,7 +334,7 @@ function loadProducts(page,isFilter) {
let imageUrls = product.images.split(',');
let firstImageUrl = imageUrls[0].trim();
let img = document.createElement("img");
img.setAttribute("style", "width: 290px; height: 200px; object-fit: cover;");
img.setAttribute("style", "border: 1px solid #eeeeee; height: 330px; object-fit: cover;");
img.setAttribute("class", "main-image");
img.setAttribute("loading", "lazy");
@ -345,7 +345,7 @@ function loadProducts(page,isFilter) {
} else {
let img = document.createElement("img");
img.className = "main-image";
img.setAttribute("style", "width: 290px; height: 200px; object-fit: cover;");
img.setAttribute("style", "border: 1px solid #eeeeee; height: 330px; object-fit: cover;");
img.setAttribute("loading", "lazy");
img.setAttribute("class", "main-image");
img.setAttribute("src", "https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png");
@ -358,14 +358,21 @@ function loadProducts(page,isFilter) {
card.classList.add("col-lg-3", "col-md-6", "col-sm-6", "col-xs-6", "mb-6", "pro-gl-content", "width-100");
card.innerHTML = `
<div class="ec-product-inner">
<div class="ec-pro-image-outer" style="width: 290px; height: 200px;">
<div class="ec-pro-image-outer" style="max-width: 290px; height: 350px;">
<div class="ec-pro-image">
<a href="product-left-sidebar.php?id=${product._id}">
${imageContainer.innerHTML} <!-- Include the dynamically loaded image here -->
</a>
<div class="ec-pro-actions" style="bottom: -36px;">
<button title="Add To Cart" onclick="popupAddToCart('${encodeURIComponent(JSON.stringify(product))}','${encodeURIComponent(JSON.stringify(vendorOfProduct))}', '${token}', '${email}', '${password}', '${encodeURIComponent(JSON.stringify(customer_data))}');" class="add-to-cart"><i class="fi-rr-shopping-basket"></i> Add To Cart</button>
<a class="ec-btn-group wishlist" title="Wishlist" onclick="popupWishlist('${encodeURIComponent(JSON.stringify(product))}', '${encodeURIComponent(JSON.stringify(customer_data))}');"><i class="fi-rr-heart"></i></a>
${
(product["sale_price"] && product["sale_price"] > 0) ?
`<button title="Add To Cart" onclick="popupAddToCart('${encodeURIComponent(JSON.stringify(product))}','${encodeURIComponent(JSON.stringify(vendorOfProduct))}', '${token}', '${email}', '${password}', '${encodeURIComponent(JSON.stringify(customer_data))}');" class="add-to-cart"><i class="fi-rr-shopping-basket"></i> Add To Cart</button>
<a class="ec-btn-group wishlist" title="Wishlist" onclick="popupWishlist('${encodeURIComponent(JSON.stringify(product))}', '${encodeURIComponent(JSON.stringify(customer_data))}');"><i class="fi-rr-heart"></i></a>` :
(product["regular_price"] && product["regular_price"] != "") ?
`<button title="Add To Cart" onclick="popupAddToCart('${encodeURIComponent(JSON.stringify(product))}','${encodeURIComponent(JSON.stringify(vendorOfProduct))}', '${token}', '${email}', '${password}', '${encodeURIComponent(JSON.stringify(customer_data))}');" class="add-to-cart"><i class="fi-rr-shopping-basket"></i> Add To Cart</button>
<a class="ec-btn-group wishlist" title="Wishlist" onclick="popupWishlist('${encodeURIComponent(JSON.stringify(product))}', '${encodeURIComponent(JSON.stringify(customer_data))}');"><i class="fi-rr-heart"></i></a>` :
`<a class="ec-btn-group wishlist" title="Wishlist" onclick="popupWishlist('${encodeURIComponent(JSON.stringify(product))}', '${encodeURIComponent(JSON.stringify(customer_data))}');"><i class="fi-rr-heart"></i></a>`
}
</div>
</div>
</div>
@ -925,7 +932,7 @@ maxPriceInput.addEventListener('input', function() {
<!-- Modal end -->
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<!-- <div class="ec-nav-toolbar">
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
@ -950,7 +957,7 @@ maxPriceInput.addEventListener('input', function() {
</div>
</div>
</div>
</div> -->
<!-- Footer navigation panel for responsive display end -->
<!-- Recent Purchase Popup -->

View File

@ -90,6 +90,8 @@ if (isset($_GET['id'])) {
if (data != "") {
console.log("Data: " + data + "\nStatus: " + status);
document.getElementById("cartItemCount").innerHTML = data;
document.getElementById("cartNewItemCount").innerHTML = data;
}
});
}
@ -97,8 +99,9 @@ if (isset($_GET['id'])) {
function updateWishItemCount() {
$.get("wishlistitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data) {
if (data != "") {
console.log("Data: " + data + "\nStatus: " + status);
document.getElementById("wishItemCount").innerHTML = data;
document.getElementById("wishNewItemCount").innerHTML = data;
}
});
}
@ -538,7 +541,7 @@ if (isset($_GET['id'])) {
<!-- 02-13-24 Jun Jihad Contact Seller will appear to Variable products with no price -->
<?php
$product_price = (!empty($product_details['sale_price'])) ? $product_details['sale_price'] : $product_details['regular_price'] ;
if ($_SESSION["isLoggedIn"]) {
if ($_SESSION["isCustomer"]) {
if ($product_details['product_type'] === "variable") {
echo '<div class="qty-btn" style="color:#ffaa00; font-size:35px; padding-right:5px; cursor: pointer;" onclick="decrement()"
onmouseover="this.style.color=\'#a15d00\'" onmouseout="this.style.color=\'#ffaa00\'">-</div>';
@ -548,6 +551,7 @@ if (isset($_GET['id'])) {
echo '<div class="qty-btn" style="color:#ffaa00; font-size:25px; padding-left:5px; cursor: pointer;" onclick="increment()"
onmouseover="this.style.color=\'#a15d00\'" onmouseout="this.style.color=\'#ffaa00\'">+</div>';
echo '<div style="display:flex; margin-left:45px;"><button type="button" class="btn btn-primary" id="contactSellerButton" style="background:#ffaa00; width:190px;"
onmouseover="this.style.background=\'#df9000\'" onmouseout="this.style.background=\'#ffaa00\'"
data-bs-toggle="modal" data-bs-target="#priceModal"><i class="fi-rr-envelope" style="font-size:20px; margin-bottom:-3px; margin-right:10px;"></i>Contact Seller</button>';
echo '<button class="btn btn-primary" id="addToCartButton" style="display:none">Add To Cart</button>';
echo '<div class="ec-single-wishlist">
@ -572,10 +576,11 @@ if (isset($_GET['id'])) {
echo '<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#priceModal" style="text-wrap:nowrap;" >Contact seller</button>';
}
}
} else {
} else if (($_SESSION["isCustomer"] == false) && ($_SESSION["isVendor"] == false)) {
echo '<div class="login-button" style=""><p style="color:red; text-wrap:nowrap;">Please log in to your account.</p>';
echo '<a href="login.php" style="margin-left:-2px;"><button type="button" class="btn btn-primary" style="margin-left:-2px; margin-top:-20px; background:#ffaa00;
border-radius:10px; letter-spacing:1px;" data-bs-toggle="modal">LOGIN</button></a></div>';
border-radius:10px; letter-spacing:1px;" onmouseover="this.style.background=\'#df9000\'" onmouseout="this.style.background=\'#ffaa00\'"
data-bs-toggle="modal">LOGIN</button></a></div>';
}
?>
<!-- <div class="ec-single-wishlist" style="border: 1px solid yellow;">
@ -2027,7 +2032,7 @@ if (isset($_GET['id'])) {
<!-- Modal end -->
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<!-- <div class="ec-nav-toolbar">
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
@ -2048,7 +2053,7 @@ if (isset($_GET['id'])) {
</div>
</div>
</div>
</div> -->
<!-- Footer navigation panel for responsive display end -->
<!-- Recent Purchase Popup -->

View File

@ -129,8 +129,7 @@ $customerData = json_decode($customers, true);
</span>
<span class="ec-register-wrap ec-register-half">
<label>Phone Number*</label>
<input type="text" name="phonenumber" value="<?php echo $_SESSION["phone"] ?>" placeholder="Enter your phone number"
required />
<input type="text" name="phonenumber" value="+63 <?php echo $_SESSION["phone"] ?>" oninput="preventEraseInPrefix(this)" required />
</span>
<span class="ec-register-wrap ec-register-btn">
<?php
@ -153,6 +152,25 @@ $customerData = json_decode($customers, true);
</div>
</div>
</section>
<script>
function preventEraseInPrefix(input) { /* edit details */
var numericValue = input.value.replace(/\D/g, '');
if (numericValue.startsWith('63')) {
input.value = "+63 " + numericValue.substring(2);
} else {
input.value = "+63 " + numericValue;
}
if (input.value.length > 14) {
input.value = input.value.slice(0, 14);
}
}
</script>
<!-- End Register -->
<!-- Footer Start -->

View File

@ -144,7 +144,7 @@ $vendorData = json_decode($vendors, true);
</span>
<span class="ec-register-wrap ec-register-half">
<label>Phone Number*</label>
<input type="text" name="phonenumber" value="<?php echo $vendorData['phone'] ?>" placeholder="Enter your phone number" required />
<input type="text" name="phonenumber" value="+63 <?php echo $vendorData['phone'] ?>" oninput="preventEraseInPrefix(this)" required />
</span>
<!-- <span class="ec-register-wrap">
@ -224,6 +224,25 @@ $vendorData = json_decode($vendors, true);
</div>
</div>
</section>
<script>
function preventEraseInPrefix(input) { /* edit details */
var numericValue = input.value.replace(/\D/g, '');
if (numericValue.startsWith('63')) {
input.value = "+63 " + numericValue.substring(2);
} else {
input.value = "+63 " + numericValue;
}
if (input.value.length > 14) {
input.value = input.value.slice(0, 14);
}
}
</script>
<!-- End Register -->
<!-- Footer Start -->

View File

@ -150,6 +150,7 @@ $filteredProducts = [];
if (data !== "") {
console.log("Data: " + data);
document.getElementById("cartItemCount").innerHTML = data;
document.getElementById("cartNewItemCount").innerHTML = data;
}
}
};
@ -164,6 +165,7 @@ function updateWishItemCount() {
var data = xhr.responseText;
if (data !== "") {
document.getElementById("wishItemCount").innerHTML = data;
document.getElementById("wishNewItemCount").innerHTML = data;
}
}
};
@ -1109,20 +1111,22 @@ maxPriceInput.addEventListener('input', function() {
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<!-- <div class="ec-nav-toolbar">
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
<a href="javascript:void(0)" class="ec-header-btn ec-sidebar-toggle"><i class="fi fi-rr-apps"></i></a>
</div>
<div class="ec-nav-panel-icons">
<a href="cart.php" 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"></span> --></a>
</div>
<a href="cart.php" class="ec-header-btn ec-header-wishlist">
<div class="header-icon"><i class="fi-rr-shopping-bag"></i></div>
<span class="ec-header-count cart-count-lable">0</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.php" class="ec-header-btn"><i class="fi-rr-heart"></i><!-- <span class="ec-cart-noti"></span> --></a>
<a href="wishlist.php" class="ec-header-btn"><i class="fi-rr-heart"></i></a>
</div>
<div class="ec-nav-panel-icons">
<a href="login.php" class="ec-header-btn"><i class="fi-rr-user"></i></a>
@ -1130,7 +1134,7 @@ maxPriceInput.addEventListener('input', function() {
</div>
</div>
</div>
</div> -->
<!-- Footer navigation panel for responsive display end -->
<!-- Recent Purchase Popup -->

View File

@ -50,12 +50,15 @@ if ($_SESSION["userId"] <> "") {
<!-- Background css -->
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
<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;
document.getElementById("cartNewItemCount").innerHTML = data;
}
});
}
@ -64,10 +67,13 @@ if ($_SESSION["userId"] <> "") {
$.get("wishlistitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data) {
if (data != "") {
document.getElementById("wishItemCount").innerHTML = data;
document.getElementById("wishNewItemCount").innerHTML = data;
}
});
}
</script>
<!-- raymart added css feb 14 2024 -->
<style>
.ec-product-inner .ec-pro-image .ec-pro-actions .add-to-cart {

View File

@ -42,7 +42,7 @@ if ($_SESSION["isVendor"] == true) {
<link rel="stylesheet" href="assets/css/plugins/countdownTimer.css" />
<link rel="stylesheet" href="assets/css/plugins/slick.min.css" />
<link rel="stylesheet" href="assets/css/plugins/bootstrap.css" />
<!-- FLATICON -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" rel="stylesheet">
@ -50,9 +50,13 @@ if ($_SESSION["isVendor"] == true) {
<link rel="stylesheet" href="assets/css/style.css" />
<link rel="stylesheet" href="assets/css/style2.css" />
<link rel="stylesheet" href="assets/css/responsive.css" />
<link href="https://cdn.datatables.net/v/bs5/dt-2.0.3/r-3.0.0/sp-2.3.0/datatables.min.css" rel="stylesheet">
<!-- Background css -->
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@latest/dist/css/select2.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" />
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/select2@latest/dist/js/select2.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<style>
.tab.active {
@ -149,7 +153,7 @@ if ($_SESSION["isVendor"] == true) {
}
}
</style>
<script>
function updateCartItemCount() {
$.get("cartitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data, status) {
@ -325,9 +329,9 @@ if ($_SESSION["isVendor"] == true) {
<div class="ec-vendor-card-table">
<!-- 03-15-2024 Stacy added tab for all orders -->
<div id="allOrders" class=" tab-content active">
<div id="allOrders" class=" tab-content mt-1 active">
<!-- Content for "all Orders" tab -->
<table class="table ec-table">
<table id="allOrdersTbl" class="table ec-table">
<thead id="allOrdersTHead">
<tr class="Title">
<th scope="col">Image</th>
@ -360,7 +364,8 @@ if ($_SESSION["isVendor"] == true) {
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td>
<?php
if(!empty($order['items'][0]['product']['product_image']))
@ -377,10 +382,10 @@ if ($_SESSION["isVendor"] == true) {
}
?>
</td>
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
<td><span><?php echo $order['total_amount'] ?></span></td>
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
<td><span><?php echo $order['status']; ?></span></td>
<td><span><?php echo date("F j, Y", strtotime($order['updatedAt'])); ?></span></td>
@ -415,9 +420,9 @@ if ($_SESSION["isVendor"] == true) {
</div>
<div id="toPay" class="tab-content">
<div id="toPay" class="tab-content mt-1">
<!-- Content for "To Pay" tab -->
<table class="table ec-table">
<table id="toPayTbl" class="table ec-table">
<thead id="toPayTHead">
<tr class="Title">
<th scope="col">Image</th>
@ -450,7 +455,8 @@ if ($_SESSION["isVendor"] == true) {
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td>
<?php
if(!empty($order['items'][0]['product']['product_image']))
@ -467,10 +473,10 @@ if ($_SESSION["isVendor"] == true) {
}
?>
</td>
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
<td><span><?php echo $order['total_amount'] ?></span></td>
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
<td><span><?php echo $order['status']; ?></span></td>
<td><span><?php echo date("F j, Y", strtotime($order['updatedAt'])); ?></span></td>
@ -499,9 +505,9 @@ if ($_SESSION["isVendor"] == true) {
</div>
<div id="toShip" class="tab-content">
<div id="toShip" class="tab-content mt-1">
<!-- Content for "To Ship" tab -->
<table class="table ec-table">
<table id="toShipTbl" class="table ec-table">
<thead id="toShipTHead">
<tr class="Title">
<th scope="col">Image</th>
@ -536,7 +542,8 @@ if ($_SESSION["isVendor"] == true) {
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td>
<?php
if(!empty($order['items'][0]['product']['product_image']))
@ -553,10 +560,10 @@ if ($_SESSION["isVendor"] == true) {
}
?>
</td>
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
<td><span><?php echo $order['total_amount'] ?></span></td>
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
<td><span><?php echo $order['status']; ?></span></td>
<!-- <td><span><?php echo $order['tracking_number']; ?></span></td>
<td><span><?php echo $order['courier_name']; ?></span></td> -->
@ -585,9 +592,9 @@ if ($_SESSION["isVendor"] == true) {
</div>
<div id="toReceive" class="tab-content">
<div id="toReceive" class="tab-content mt-1">
<!-- Content for "To Receive" tab -->
<table class="table ec-table">
<table id="toReceiveTbl" class="table ec-table">
<thead id="toReceiveTHead">
<tr class="Title">
<th scope="col">Image</th>
@ -621,7 +628,7 @@ if ($_SESSION["isVendor"] == true) {
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView" id="to-receive-<?php echo $order['_id']?>" data-value=' <?php echo $jsonorder; ?>'>
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'" id="to-receive-<?php echo $order['_id']?>" data-value=' <?php echo $jsonorder; ?>'>
<td data-bs-toggle="modal" data-bs-target="#productDetails">
<?php
if(!empty($order['items'][0]['product']['product_image']))
@ -638,10 +645,10 @@ if ($_SESSION["isVendor"] == true) {
}
?>
</td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['items'][0]['quantity']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['items'][0]['price']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['total_amount'] ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['status']; ?></span></td>
<!-- <td><span><?php # echo $order['tracking_number']; ?></span></td>
<td><span><?php # echo $order['courier_name']; ?></span></td> -->
@ -676,9 +683,9 @@ if ($_SESSION["isVendor"] == true) {
</div>
<div id="completed" class="tab-content">
<div id="completed" class="tab-content mt-1">
<!-- Content for "Completed" tab -->
<table class="table ec-table">
<table id="completedTbl" class="table ec-table">
<thead id="completedTHead">
<tr class="Title">
<th scope="col">Image</th>
@ -713,7 +720,8 @@ if ($_SESSION["isVendor"] == true) {
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td>
<?php
if(!empty($order['items'][0]['product']['product_image']))
@ -731,10 +739,10 @@ if ($_SESSION["isVendor"] == true) {
?>
</td>
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?> </span></td>
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
<td><span><?php echo $order['total_amount'] ?></span></td>
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?> </span></td>
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
<td><span><?php echo $order['status']; ?></span></td>
<!-- <td><span><?php echo $order['tracking_number']; ?></span></td>
<td><span><?php echo $order['courier_name']; ?></span></td> -->
@ -1323,7 +1331,7 @@ if ($_SESSION["isVendor"] == true) {
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<!-- <div class="ec-nav-toolbar">
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
@ -1344,7 +1352,7 @@ if ($_SESSION["isVendor"] == true) {
</div>
</div>
</div>
</div> -->
<!-- Footer navigation panel for responsive display end -->
<!-- raymart remove popup feb 20 2024 -->
@ -1553,6 +1561,29 @@ if ($_SESSION["isVendor"] == true) {
</div>
<!-- Feature tools end -->
<!-- DataTables -->
<script>
$(document).ready( function () {
$('#allOrdersTbl').DataTable();
} );
$(document).ready( function () {
$('#toPayTbl').DataTable();
} );
$(document).ready( function () {
$('#toShipTbl').DataTable();
} );
$(document).ready( function () {
$('#toReceiveTbl').DataTable();
} );
$(document).ready( function () {
$('#completedTbl').DataTable();
} );
</script>
<!-- Vendor JS -->
<script src="assets/js/vendor/jquery-3.5.1.min.js"></script>
<script src="assets/js/vendor/popper.min.js"></script>
@ -1570,7 +1601,8 @@ if ($_SESSION["isVendor"] == true) {
<script src="assets/js/vendor/jquery.magnific-popup.min.js"></script>
<script src="assets/js/plugins/jquery.sticky-sidebar.js"></script>
<script src="assets/js/plugins/nouislider.js"></script>
<script src="https://cdn.datatables.net/v/bs5/dt-2.0.3/r-3.0.0/sp-2.3.0/datatables.min.js"></script>
<!-- Main Js -->
<script src="assets/js/vendor/index.js"></script>
<script src="assets/js/main.js"></script>

View File

@ -261,14 +261,16 @@ if ($_SESSION["isVendor"] == true) {
<div class="card-body">
<div class="selectCon">
<div class="selectWrap" style="display: flex; justify-content: center; align-items: center; width: 50%;">
<input type="radio" style="padding-left: 0px !important; margin: 0px 0px !important;" name="selectedBillingAddress[<?php echo $customer_index; ?>]" id="billing_address_<?php echo $customer_index; ?>_<?php echo $address_index; ?>" value="<?php echo $customer_index; ?>_<?php echo $address_index; ?>" class="form-check-input" onchange="updateAddressBilling('<?php echo $customer['_id']; ?>', <?php echo $address_index; ?>, true)" <?php echo $address["billing"] ? 'checked' : ''; ?>>
<!-- <input type="radio" style="padding-left: 0px !important; margin: 0px 0px !important;" name="selectedBillingAddress[<?php # echo $customer_index; ?>]" id="billing_address_<?php # echo $customer_index; ?>_<?php # echo $address_index; ?>" value="<?php # echo $customer_index; ?>_<?php # echo $address_index; ?>" class="form-check-input" onchange="updateAddressBilling('<?php # echo $customer['_id']; ?>', <?php # echo $address_index; ?>, true)" <?php # echo $address["billing"] ? 'checked' : ''; ?>> -->
<input type="radio" style="padding-left: 0px !important; margin: 0px 0px !important;" name="selectedBillingAddress[<?php echo $customer_index; ?>]" id="billing_address_<?php echo $customer_index; ?>_<?php echo $address_index; ?>" value="<?php echo $customer_index; ?>_<?php echo $address_index; ?>" class="form-check-input" <?php echo $address["billing"] ? 'checked' : ''; ?>>
<label class="form-check-label" style="margin: 0px 10px !important;" for="billing_address_<?php echo $customer_index; ?>_<?php echo $address_index; ?>">
Billing Address
</label>
</div>
<div class="selectWrap" style="display: flex; justify-content: center; align-items: center; width: 50%; margin-left:-20px;">
<input type="radio" style="padding-left: 0px !important; margin: 0px 0px !important;" name="selectedShippingAddress[<?php echo $customer_index; ?>]" id="shipping_address_<?php echo $customer_index; ?>_<?php echo $address_index; ?>" value="<?php echo $customer_index; ?>_<?php echo $address_index; ?>" class="form-check-input" onchange="updateAddressShipping('<?php echo $customer['_id']; ?>', <?php echo $address_index; ?>, true)" <?php echo $address["shipping"] ? 'checked' : ''; ?>>
<!-- <input type="radio" style="padding-left: 0px !important; margin: 0px 0px !important;" name="selectedShippingAddress[<?php # echo $customer_index; ?>]" id="shipping_address_<?php # echo $customer_index; ?>_<?php # echo $address_index; ?>" value="<?php # echo $customer_index; ?>_<?php # echo $address_index; ?>" class="form-check-input" onchange="updateAddressShipping('<?php # echo $customer['_id']; ?>', <?php # echo $address_index; ?>, true)" <?php # echo $address["shipping"] ? 'checked' : ''; ?>> -->
<input type="radio" style="padding-left: 0px !important; margin: 0px 0px !important;" name="selectedShippingAddress[<?php echo $customer_index; ?>]" id="shipping_address_<?php echo $customer_index; ?>_<?php echo $address_index; ?>" value="<?php echo $customer_index; ?>_<?php echo $address_index; ?>" class="form-check-input" <?php echo $address["billing"] ? 'checked' : ''; ?>>
<label class="form-check-label" style="margin: 0px 10px !important;" for="shipping_address_<?php echo $customer_index; ?>_<?php echo $address_index; ?>">
Shipping Address
</label>
@ -308,6 +310,7 @@ if ($_SESSION["isVendor"] == true) {
</div>
<?php } ?>
<?php } ?>
<button type="button" onclick="updateAddressBilling('<?php echo $customer['_id']; ?>', <?php echo $address_index; ?>, true)">Use Selected Address</button>
</form>
</div>
</div>
@ -891,7 +894,7 @@ if ($_SESSION["isVendor"] == true) {
const city = $('#citySelect :selected').text();
const barangay = $('#barangaySelect :selected').text();
const country = $('#addressCountry').val();
// Create a new address object
const newAddress = {
@ -1156,8 +1159,8 @@ if ($_SESSION["isVendor"] == true) {
sCountryElement.textContent = customerData.address[addressIndex].country;
}
console.log(`Address updated successfully for customer ${customerId}`);
// location.reload();
// header("location: user-profile.php");
location.reload();
header("location: user-profile.php");
} catch (error) {
console.error('Error updating address:', error.message);
}
@ -1305,7 +1308,7 @@ if ($_SESSION["isVendor"] == true) {
<!-- Modal end -->
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<!-- <div class="ec-nav-toolbar">
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
@ -1326,7 +1329,7 @@ if ($_SESSION["isVendor"] == true) {
</div>
</div>
</div>
</div> -->
<!-- Footer navigation panel for responsive display end -->
<!-- raymart remove popup feb 20 2024 -->

View File

@ -54,9 +54,14 @@ if ($_SESSION["isVendor"] == true) {
<link rel="stylesheet" href="assets/css/style.css" />
<link rel="stylesheet" href="assets/css/style2.css" />
<link rel="stylesheet" href="assets/css/responsive.css" />
<link href="https://cdn.datatables.net/v/bs5/dt-2.0.3/r-3.0.0/sp-2.3.0/datatables.min.css" rel="stylesheet">
<!-- Background css -->
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@latest/dist/css/select2.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" />
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/select2@latest/dist/js/select2.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<style>
.tab.active {
background-color: #ffffff;
@ -342,9 +347,9 @@ if ($_SESSION["isVendor"] == true) {
</div> -->
<!-- 03-15-2024 Stacy added tab for all orders -->
<div id="allRefunds" class="tab-content active">
<div id="allRefunds" class="tab-content mt-1 active">
<!-- Content for "all Orders" tab -->
<table class="table ec-table">
<table id="allRefundsTbl" class="table ec-table">
<thead id="allRefundsTHead">
<tr class="Title">
<th scope="col">Image</th>
@ -381,12 +386,13 @@ if ($_SESSION["isVendor"] == true) {
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
<td><span><?php echo $order['total_amount'] ?></span></td>
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
<td><span><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
@ -417,9 +423,9 @@ if ($_SESSION["isVendor"] == true) {
</div>
<div id="toApprove" class="tab-content">
<div id="toApprove" class="tab-content mt-1">
<!-- Content for "To Approve" tab -->
<table class="table ec-table">
<table id="toApproveTbl" class="table ec-table">
<thead id="toApproveTHead">
<tr class="Title">
<th scope="col">Image</th>
@ -454,12 +460,13 @@ if ($_SESSION["isVendor"] == true) {
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
<td><span><?php echo $order['total_amount'] ?></span></td>
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
<td><span><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
@ -490,9 +497,9 @@ if ($_SESSION["isVendor"] == true) {
</div>
<div id="toShip" class="tab-content">
<div id="toShip" class="tab-content mt-1">
<!-- Content for "To Ship" tab -->
<table class="table ec-table">
<table id="toShipTbl" class="table ec-table">
<thead id="toShipTHead">
<tr class="Title">
<th scope="col">Image</th>
@ -527,12 +534,13 @@ if ($_SESSION["isVendor"] == true) {
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
<td><span><?php echo $order['total_amount'] ?></span></td>
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
<td><span><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
@ -563,9 +571,9 @@ if ($_SESSION["isVendor"] == true) {
</div>
<div id="toReceive" class="tab-content">
<div id="toReceive" class="tab-content mt-1">
<!-- Content for "To Receive" tab -->
<table class="table ec-table">
<table id="toReceiveTbl" class="table ec-table">
<thead id="toReceiveTHead">
<tr class="Title">
<th scope="col">Image</th>
@ -600,12 +608,13 @@ if ($_SESSION["isVendor"] == true) {
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
<td><span><?php echo $order['total_amount'] ?></span></td>
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
<td><span><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
@ -639,9 +648,9 @@ if ($_SESSION["isVendor"] == true) {
</div>
<div id="toRefund" class="tab-content">
<div id="toRefund" class="tab-content mt-1">
<!-- Content for "To Refund" tab -->
<table class="table ec-table">
<table id="toRefundTbl" class="table ec-table">
<thead id="toRefundTHead">
<tr class="Title">
<th scope="col">Image</th>
@ -676,12 +685,13 @@ if ($_SESSION["isVendor"] == true) {
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
<td><span><?php echo $order['total_amount'] ?></span></td>
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
<td><span><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
@ -715,9 +725,9 @@ if ($_SESSION["isVendor"] == true) {
</div>
<div id="returnComplete" class="tab-content">
<div id="returnComplete" class="tab-content mt-1">
<!-- Content for "Return Complete" tab -->
<table class="table ec-table">
<table id="returnCompleteTbl" class="table ec-table">
<thead id="returnCompleteTHead">
<tr class="Title">
<th scope="col">Image</th>
@ -751,12 +761,13 @@ if ($_SESSION["isVendor"] == true) {
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
<td><span><?php echo $order['total_amount'] ?></span></td>
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
<td><span><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
@ -1203,7 +1214,7 @@ if ($_SESSION["isVendor"] == true) {
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<!-- <div class="ec-nav-toolbar">
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
@ -1224,7 +1235,7 @@ if ($_SESSION["isVendor"] == true) {
</div>
</div>
</div>
</div> -->
<!-- Footer navigation panel for responsive display end -->
<!-- raymart remove popup feb 20 2024 -->
@ -1433,6 +1444,33 @@ if ($_SESSION["isVendor"] == true) {
</div>
<!-- Feature tools end -->
<!-- DataTables -->
<script>
$(document).ready( function () {
$('#allRefundsTbl').DataTable();
} );
$(document).ready( function () {
$('#toApproveTbl').DataTable();
} );
$(document).ready( function () {
$('#toShipTbl').DataTable();
} );
$(document).ready( function () {
$('#toReceiveTbl').DataTable();
} );
$(document).ready( function () {
$('#toRefundTbl').DataTable();
} );
$(document).ready( function () {
$('#returnCompleteTbl').DataTable();
} );
</script>
<!-- Vendor JS -->
<script src="assets/js/vendor/jquery-3.5.1.min.js"></script>
<script src="assets/js/vendor/popper.min.js"></script>
@ -1450,6 +1488,7 @@ if ($_SESSION["isVendor"] == true) {
<script src="assets/js/vendor/jquery.magnific-popup.min.js"></script>
<script src="assets/js/plugins/jquery.sticky-sidebar.js"></script>
<script src="assets/js/plugins/nouislider.js"></script>
<script src="https://cdn.datatables.net/v/bs5/dt-2.0.3/r-3.0.0/sp-2.3.0/datatables.min.js"></script>
<!-- Main Js -->
<script src="assets/js/vendor/index.js"></script>

View File

@ -74,7 +74,7 @@ $products = productList();
text-decoration: none;
padding: 5px 10px;
border: 1px solid #ccc;
/* margin: 0 5px; */
margin: 0 5px;
border-radius: 4px;
}
@ -262,7 +262,8 @@ $products = productList();
<a href="catalog-single-vendor.php?id=<?php echo $vendor['_id'] ?>">
<h6>Seller since</h6>
</a>
<p><?php echo $vendor['date_registered']; ?></p>
<!-- <p><?php echo $vendor['date_registered']; ?></p> -->
<p><?php echo date('F j, Y', strtotime($vendor['date_registered'])); ?></p>
</div>
</div>
</div>
@ -417,7 +418,7 @@ $products = productList();
<!-- Modal end -->
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<!-- <div class="ec-nav-toolbar">
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
@ -438,7 +439,7 @@ $products = productList();
</div>
</div>
</div>
</div> -->
<!-- Footer navigation panel for responsive display end -->
<!-- raymart remove popup feb 20 2024 -->

View File

@ -209,16 +209,16 @@ if ($_SESSION["isCustomer"] == true) {
<!-- 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)"
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>
@ -898,8 +898,7 @@ if ($_SESSION["isCustomer"] == true) {
<script src="assets/js/vendor/jquery.magnific-popup.min.js"></script>
<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 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))

View File

@ -75,8 +75,11 @@ $vendorPayoutData = json_decode($response, true);
<link rel="stylesheet" href="assets/css/style.css" />
<link rel="stylesheet" href="assets/css/style2.css" />
<link rel="stylesheet" href="assets/css/responsive.css" />
<link href="https://cdn.datatables.net/v/bs5/dt-2.0.3/r-3.0.0/sp-2.3.0/datatables.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.metroui.org.ua/current/metro.css">
<script src="https://cdn.metroui.org.ua/current/metro.js"></script>
<!-- Background css -->
@ -84,7 +87,6 @@ $vendorPayoutData = json_decode($response, true);
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@latest/dist/css/select2.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" />
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/select2@latest/dist/js/select2.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script>
function renewToken() {
var xhr = new XMLHttpRequest();
@ -159,183 +161,221 @@ $vendorPayoutData = json_decode($response, true);
<!-- Sidebar Category Block -->
<div class="ec-sidebar-block">
<div class="ec-vendor-block">
<!-- 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>
<?php } ?>
<!-- <div class="ec-vendor-block-bg" style="background-image: url(<?php #echo $vendorData['vendor_banner'] ?>) !important;"></div> -->
<div class="ec-vendor-block-detail">
<!-- <img loading="lazy" class="v-img" src=<?php #echo $vendorData['vendor_image'] ?> alt="vendor image"> -->
<!-- 03-12-2024 Stacy added placeholder for vendor profile -->
<?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 } ?>
<h5 class="name"><?php echo $vendorData['user_login'] ?></h5>
</div>
<!-- <div class="ec-vendor-block-items">
<ul>
<li><a href="vendor-dashboard.php">Dashboard</a></li>
<li><a onclick="addProduct();" href="">Upload Product</a></li>
<li><a href="vendor-settings.php">Settings (Edit)</a></li>
</ul>
</div> -->
<?php include "vendor-user-tabs.php" ?>
</div>
</div>
</div>
</div>
<div class="ec-shop-rightside col-lg-9 col-md-12">
<div class="ec-vendor-dashboard-card ec-vendor-setting-card">
<div class="ec-vendor-card-body">
<div class="row">
<div class="col-md-12 mb-5">
<div class="panel panel-primary">
<div class="panel-heading">
<h5 class="panel-title"><strong>Upcoming Payout</strong></h5>
</div>
<div class="panel-body ">
<div class="row">
<h4 style="color: #444;">
<div class="d-flex align-items-center">
<?php
$response = getOrderbyVendorId($vendorId);
$upcomingPayout = json_decode($response, true);
$payoutSum = 0;
foreach ($upcomingPayout as $x => $val) {
$paymentStatus = strtolower($val['payment']['status']);
$orderStatus = strtolower($val['status']);
$payoutStatus = empty($val['payout_status']);
if(( $paymentStatus == "paid") && ( $orderStatus == "completed") && ($payoutStatus == true)){
$orderAmount = $val['total_amount'];
$payoutSum += $orderAmount;
}
}
$finalPayoutSum = number_format($payoutSum, 2, '.', ',');
?>
<strong>
<?php echo $finalPayoutSum ?>
</strong>
</div>
</h4>
<!-- <div class="text-sm mt-3">
Payout Generation: Tue, Mar 19, 2024
</div>
<div class="text-sm">
Receive Payout on or before: Wed, Mar 20, 2024
</div> -->
<div class="text-sm">
<?php
$vendorResponse = getVendorbyId($vendorId);
$vendorInformation = json_decode($vendorResponse, true);
$bankAccountNumber = $vendorInformation['bank_acount_details'][0]['bank_account_number'];
$bankDetails = $vendorInformation['bank_acount_details'];
foreach ($bankDetails as $details) {
if ($details['bank_payout'] === true) {
$bankName = $details['bank_name'];
$bankAccountNumber = $details['bank_account_number'];
}
}
$bankNumEnding = substr($bankAccountNumber, -3);
?>
Receipient: <?php echo $bankName; ?> Account ending in <?php echo $bankNumEnding?>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="ec-vendor-dashboard-card">
<div class="ec-vendor-card-header">
<h5><strong>Upcoming Payout</strong></h5>
</div>
<!-- ADDITIONAL PANELS FOR PAYOUTS FOR FUTURE USE, DO NOT REMOVE -->
<!-- <div class="col-md-4 mb-5">
<div class="panel panel-primary">
<div class="panel-heading">
<h5 class="panel-title"><strong>Payout Generation Schedule</strong></h5>
</div>
<div class="panel-body ">
<div class="row">
<h4 style="color: #444;">
<div class="d-flex align-items-center">
<i class="fi-rs-calendar mt-1 mr-3 "></i>
<strong>
Weekly
</strong>
</div>
</h4>
<div class="mt-3">
<h6>
<strong class="text-primary ">Every Tuesday</strong>
</h6>
</div>
<div class="text-sm">
Payouts that will fall on holiday will be processed the next banking day
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4 mb-5">
<div class="panel panel-primary">
<div class="panel-heading">
<h5 class="panel-title"><strong>Next Payout</strong></h5>
</div>
<div class="panel-body ">
<div class="row">
<h4 style="color: #444;">
<div class="d-flex align-items-center">
<strong>
0.00
</strong>
</div>
</h4>
<- <div class="text-sm mt-3">
Payout Generation: Tue, Mar 25, 2024
</div>
<div class="text-sm">
Receive Payout on or before: Wed, Mar 26, 2024
</div> -
<div class="text-sm">
Receipient: Philippine National Bank (PNB) Account ending in <php echo $bankNumEnding?>
</div>
</div>
</div>
</div>
</div> -->
<div class="col-md-12 mt-3">
<h5 class='m-0'><strong>Payout History</strong></h5>
<div class="table-responsive px-4">
<table id='payoutsTableContent' class="table ec-table">
<thead>
<tr>
<th scope="col">Amount</th>
<th scope="col">Bank</th>
<th scope="col">Account Number</th>
<th scope="col">Payout Generation</th>
<th scope="col">Status</th>
<th scope="col">Action</th>
<div class="ec-vendor-card-body">
<div class="row">
<h4 style="color: #444;">
<div class="d-flex align-items-center">
<?php
$response = getOrderbyVendorId($vendorId);
$upcomingPayout = json_decode($response, true);
$payoutSum = 0;
</tr>
</thead>
<tbody class='table-group-divider'>
<?php
foreach ($vendorPayoutData as $x => $val) {
$vendorIdCheck = $val['vendor_details'][0]['vendor_id'];
$status = ucfirst(strtolower($val['status']));
$payoutDate = date("F d, Y", strtotime($val['createdAt']));
$payoutId = $val['_id'];
if ((empty($vendorIdCheck) == false) && ($vendorIdCheck == $vendorId) && ($status == "Deposited")) { ?>
<tr>
<td> <?php echo "" . $val['net_amount'] ?> </td>
<?php if (empty($val['bank_information'][0]['bank_name']) == false) {
?>
<td> <?php echo $val['bank_information'][0]['bank_name'] ?> </td>
<?php } else { ?>
<td> N/A </td>
<?php }
if (empty($val['bank_information'][0]['bank_account_number']) == false) {
$accNum = $val['bank_information'][0]['bank_account_number'];
// Replace characters with asterisks for all characters except the last three segments
$maskedAccNum = substr_replace($accNum, str_repeat('*', strlen($accNum) - 3), 0, -3); ?>
<td> <?php echo $maskedAccNum ?> </td>
<?php } else { ?>
<td> N/A </td>
<?php } ?>
<td> <?php echo $payoutDate ?> </td>
<td> <?php echo $status ?> </td>
<td>
<button type="button" class="btn btn-primary btn-sm showSinglePayoutBtn" data-order-id="<?php echo $payoutId; ?>" data-bs-toggle="modal" data-bs-target="#payoutsModal">View</button>
</td>
</tr>
<?php
foreach ($upcomingPayout as $x => $val) {
$paymentStatus = strtolower($val['payment']['status']);
$orderStatus = strtolower($val['status']);
$payoutStatus = empty($val['payout_status']);
if(( $paymentStatus == "paid") && ( $orderStatus == "completed") && ($payoutStatus == true)){
$orderAmount = $val['total_amount'];
$payoutSum += $orderAmount;
}
} ?>
</tbody>
</table>
}
$finalPayoutSum = number_format($payoutSum, 2, '.', ',');
?>
<strong>
<?php echo $finalPayoutSum ?>
</strong>
</div>
</h4>
<!-- <div class="text-sm mt-3">
Payout Generation: Tue, Mar 19, 2024
</div>
<div class="text-sm">
Receive Payout on or before: Wed, Mar 20, 2024
</div> -->
<div class="text-sm">
<?php
$vendorResponse = getVendorbyId($vendorId);
$vendorInformation = json_decode($vendorResponse, true);
$bankAccountNumber = $vendorInformation['bank_acount_details'][0]['bank_account_number'];
$bankDetails = $vendorInformation['bank_acount_details'];
foreach ($bankDetails as $details) {
if ($details['bank_payout'] === true) {
$bankName = $details['bank_name'];
$bankAccountNumber = $details['bank_account_number'];
}
}
$bankNumEnding = substr($bankAccountNumber, -3);
?>
Receipient: <?php echo $bankName; ?> Account ending in <?php echo $bankNumEnding?>
</div>
</div>
</div>
</div>
</div>
<!-- ADDITIONAL PANELS FOR PAYOUTS FOR FUTURE USE, DO NOT REMOVE -->
<!-- <div class="col-md-12">
<div class="ec-vendor-dashboard-card">
<div class="ec-vendor-card-header">
<h5><strong>Payout Generation Schedule</strong></h5>
</div>
<div class="ec-vendor-card-body">
<div class="row">
<h4 style="color: #444;">
<div class="d-flex align-items-center">
<i class="fi-rs-calendar mt-1 mr-3 "></i>
<strong>
Weekly
</strong>
</div>
</h4>
<div class="mt-3">
<h6>
<strong class="text-primary ">Every Tuesday</strong>
</h6>
</div>
<div class="text-sm">
Payouts that will fall on holiday will be processed the next banking day
</div>
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="ec-vendor-dashboard-card">
<div class="ec-vendor-card-header">
<h5><strong>Next Payout</strong></h5>
</div>
<div class="ec-vendor-card-body">
<div class="row">
<h4 style="color: #444;">
<div class="d-flex align-items-center">
<strong>
0.00
</strong>
</div>
</h4>
<div class="text-sm mt-3">
Payout Generation: Tue, Mar 25, 2024
</div>
<div class="text-sm">
Receive Payout on or before: Wed, Mar 26, 2024
</div>
<div class="text-sm">
Receipient: Philippine National Bank (PNB) Account ending in 123
</div>
</div>
</div>
</div>
</div> -->
</div>
<div class="ec-vendor-dashboard-card space-bottom-30">
<div class="ec-vendor-card-header">
<h5>Payout History</h5>
</div>
<div class="ec-vendor-card-body">
<div class="ec-vendor-card-table">
<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">Amount</th>
<th data-sortable="true" scope="col">Bank</th>
<th data-sortable="true" scope="col">Account Number</th>
<th data-sortable="true" scope="col">Payout Generation</th>
<th data-sortable="true" scope="col">Status</th>
<th data-sortable="true" scope="col">Action</th>
</tr>
</thead>
<tbody class='table-group-divider'>
<?php
foreach ($vendorPayoutData as $x => $val) {
$vendorIdCheck = $val['vendor_details'][0]['vendor_id'];
$status = ucfirst(strtolower($val['status']));
$payoutDate = date("F d, Y", strtotime($val['createdAt']));
$payoutId = $val['_id'];
if ((empty($vendorIdCheck) == false) && ($vendorIdCheck == $vendorId) && ($status == "Deposited")) { ?>
<tr>
<td> <?php echo "" . $val['net_amount'] ?> </td>
<?php if (empty($val['bank_information'][0]['bank_name']) == false) {
?>
<td> <?php echo $val['bank_information'][0]['bank_name'] ?> </td>
<?php } else { ?>
<td> N/A </td>
<?php }
if (empty($val['bank_information'][0]['bank_account_number']) == false) {
$accNum = $val['bank_information'][0]['bank_account_number'];
// Replace characters with asterisks for all characters except the last three segments
$maskedAccNum = substr_replace($accNum, str_repeat('*', strlen($accNum) - 3), 0, -3); ?>
<td> <?php echo $maskedAccNum ?> </td>
<?php } else { ?>
<td> N/A </td>
<?php } ?>
<td> <?php echo $payoutDate ?> </td>
<td> <?php echo $status ?> </td>
<td>
<button type="button" class="btn btn-primary btn-sm showSinglePayoutBtn" data-order-id="<?php echo $payoutId; ?>" data-bs-toggle="modal" data-bs-target="#payoutsModal">View</button>
</td>
</tr>
<?php
}
} ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
@ -595,6 +635,7 @@ $vendorPayoutData = json_decode($response, true);
<script src="assets/js/plugins/jquery.sticky-sidebar.js"></script>
<script src="assets/js/plugins/nouislider.js"></script>
<script src="https://cdn.datatables.net/v/bs5/dt-2.0.3/r-3.0.0/sp-2.3.0/datatables.min.js"></script>
<!-- <script src="https://cdn.metroui.org.ua/current/metro.js"></script> -->
<!-- <script>
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
@ -673,8 +714,9 @@ $vendorPayoutData = json_decode($response, true);
<div>
<h6><strong>Payout Information</strong></h6>
</div>
<button class="fw-bold border border-success border-2 btn-outline-success btn-sm" disabled>${payoutStatus}</button>
<div>
<button disabled style="border: 2px solid #198754; color: #198754 !important; border-radius: 5px;">${payoutStatus}</button>
</div>
</div>
<div class="d-flex justify-content-between p-2">
<div class="fw-bold">Gross Amount</div>
@ -693,7 +735,7 @@ $vendorPayoutData = json_decode($response, true);
</div>
</div>
<div class="col-md-5 mb-4">
<div class="d-flex flex-column" style="border-bottom: 1px solid #000;">
<div class="d-flex flex-column" >
<div class="d-flex justify-content-between p-2">
<h6><strong>Bank Information</strong></h6>
</div>
@ -744,11 +786,6 @@ $vendorPayoutData = json_decode($response, true);
});
});
</script>
<script>
$(document).ready( function () {
$('#payoutsTableContent').DataTable();
} );
</script>
</body>

View File

@ -69,9 +69,14 @@ if ($_SESSION["isCustomer"] == true) {
<link rel="stylesheet" href="assets/css/style.css" />
<link rel="stylesheet" href="assets/css/style2.css" />
<link rel="stylesheet" href="assets/css/responsive.css" />
<link href="https://cdn.datatables.net/v/bs5/dt-2.0.3/r-3.0.0/sp-2.3.0/datatables.min.css" rel="stylesheet">
<!-- Background css -->
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@latest/dist/css/select2.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" />
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/select2@latest/dist/js/select2.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<style>
.tab.active {
background-color: #ffffff;
@ -319,8 +324,8 @@ if ($_SESSION["isCustomer"] == true) {
<!-- 03-26-2024 Stacy added tab for all orders -->
<!-- Content for "All Refunds" tab -->
<div id="allRefunds" class="tab-content active">
<table class="table ec-table">
<div id="allRefunds" class="tab-content mt-1 active">
<table id="allRefundsTbl" class="table ec-table">
<thead id="allRefundTHead">
<tr class="Title">
<th scope="col">Image</th>
@ -353,12 +358,13 @@ if ($_SESSION["isCustomer"] == true) {
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
<td><span><?php echo $order['total_amount'] ?></span></td>
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
<td><span><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
@ -388,8 +394,8 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Content for "To Approve" tab -->
<div id="toApprove" class="tab-content">
<table class="table ec-table">
<div id="toApprove" class="tab-content mt-1">
<table id="toApproveTbl" class="table ec-table">
<thead id="toApproveTHead">
<tr class="Title">
<th scope="col">Image</th>
@ -420,12 +426,12 @@ if ($_SESSION["isCustomer"] == true) {
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView">
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'">
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['items'][0]['quantity']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['items'][0]['price']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['total_amount'] ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
@ -459,8 +465,8 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Content for "To Ship" tab -->
<div id="toShip" class="tab-content">
<table class="table ec-table">
<div id="toShip" class="tab-content mt-1">
<table id="toShipTbl" class="table ec-table">
<thead id="toShipTHead">
<tr class="Title">
<th scope="col">Image</th>
@ -491,12 +497,13 @@ if ($_SESSION["isCustomer"] == true) {
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
<td><span><?php echo $order['total_amount'] ?></span></td>
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
<td><span><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
@ -526,8 +533,8 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Content for "To Receive" tab -->
<div id="toReceive" class="tab-content">
<table class="table ec-table">
<div id="toReceive" class="tab-content mt-1">
<table id="toReceiveTbl" class="table ec-table">
<thead id="toReceiveTHead">
<tr class="Title">
<th scope="col">Image</th>
@ -557,12 +564,12 @@ if ($_SESSION["isCustomer"] == true) {
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView">
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'">
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['items'][0]['quantity']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['items'][0]['price']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['total_amount'] ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
@ -595,8 +602,8 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Content for "To Refund" tab -->
<div id="toRefund" class="tab-content">
<table class="table ec-table">
<div id="toRefund" class="tab-content mt-1">
<table id="toRefundTbl" class="table ec-table">
<thead id="toRefundTHead">
<tr class="Title">
<th scope="col">Image</th>
@ -626,12 +633,13 @@ if ($_SESSION["isCustomer"] == true) {
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
<td><span><?php echo $order['total_amount'] ?></span></td>
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
<td><span><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
@ -664,8 +672,8 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Content for "Return Complete" tab -->
<div id="returnComplete" class="tab-content">
<table class="table ec-table">
<div id="returnComplete" class="tab-content mt-1">
<table id="returnCompleteTbl" class="table ec-table">
<thead id="returnCompleteTHead">
<tr class="Title">
<th scope="col">Image</th>
@ -695,12 +703,13 @@ if ($_SESSION["isCustomer"] == true) {
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
<td><span><?php echo $order['total_amount'] ?></span></td>
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
<td><span><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
@ -1246,7 +1255,7 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<!-- <div class="ec-nav-toolbar">
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
@ -1267,7 +1276,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
</div>
</div>
</div> -->
<!-- Footer navigation panel for responsive display end -->
<!-- raymart remove popup feb 20 2024 -->
@ -1476,6 +1485,33 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<!-- Feature tools end -->
<!-- DataTables -->
<script>
$(document).ready( function () {
$('#allRefundsTbl').DataTable();
} );
$(document).ready( function () {
$('#toApproveTbl').DataTable();
} );
$(document).ready( function () {
$('#toShipTbl').DataTable();
} );
$(document).ready( function () {
$('#toReceiveTbl').DataTable();
} );
$(document).ready( function () {
$('#toRefundTbl').DataTable();
} );
$(document).ready( function () {
$('#returnCompleteTbl').DataTable();
} );
</script>
<!-- Vendor JS -->
<script src="assets/js/vendor/jquery-3.5.1.min.js"></script>
<script src="assets/js/vendor/popper.min.js"></script>
@ -1493,6 +1529,7 @@ if ($_SESSION["isCustomer"] == true) {
<script src="assets/js/vendor/jquery.magnific-popup.min.js"></script>
<script src="assets/js/plugins/jquery.sticky-sidebar.js"></script>
<script src="assets/js/plugins/nouislider.js"></script>
<script src="https://cdn.datatables.net/v/bs5/dt-2.0.3/r-3.0.0/sp-2.3.0/datatables.min.js"></script>
<!-- Main Js -->
<script src="assets/js/vendor/index.js"></script>

View File

@ -419,7 +419,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<div class="form-group">
<label for="addressContact" class="text-dark font-weight-medium pt-3 mb-2">Contact Number</label>
<input type="number" class="form-control" id="addressContact">
<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>
@ -449,7 +449,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<div class="form-group">
<label for="addressCountry" class="text-dark font-weight-medium pt-3 mb-2">Country</label>
<input type="text" class="form-control" id="addressCountry">
<input type="text" class="form-control" id="addressCountry" value="Philippines">
</div>
<button type="button" class="btn btn-primary mt-4" id="submitBtn">Submit</button>
@ -486,7 +486,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="form-group">
<label for="addressContact" class="text-dark font-weight-medium pt-3 mb-2">Contact Number</label>
<input type="text" class="form-control" id="addressContact2" value="<?php echo $address['phone']; ?>">
<input type="text" class="form-control" id="addressContact2" value="<?php echo $address['phone']; ?>" oninput="preventEraseThePrefix(this)">
<!-- <label for="addressContact" class="text-dark font-weight-medium pt-3 mb-2">Contact Number</label>
@ -597,7 +597,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<div class="form-group">
<label for="bankAccountNumber" class="text-dark font-weight-medium pt-3 mb-2">Bank Account Number</label>
<input type="text" class="form-control" id="bankAccountNumber">
<input type="number" class="form-control" id="bankAccountNumber">
</div>
<div class="form-group">
<label for="bankAccountName" class="text-dark font-weight-medium pt-3 mb-2">Bank Account Name</label>
@ -612,6 +612,55 @@ if ($_SESSION["isCustomer"] == true) {
</div>
</div>
</div>
<script>
function preventErasePrefix(input) { /* secondmodal */
var numericValue = input.value.replace(/\D/g, '');
if (numericValue.startsWith('63')) {
input.value = "+63 " + numericValue.substring(2);
} else {
input.value = "+63 " + numericValue;
}
if (input.value.length > 14) {
input.value = input.value.slice(0, 14);
}
}
function preventEraseThePrefix(input) { /* thirdmodal */
var numericValue = input.value.replace(/\D/g, '');
if (numericValue.startsWith('63')) {
input.value = "+63 " + numericValue.substring(2);
} else {
input.value = "+63 " + numericValue;
}
if (input.value.length > 14) {
input.value = input.value.slice(0, 14);
}
}
function preventEraseInPrefix(input) { /* edit details */
var numericValue = input.value.replace(/\D/g, '');
if (numericValue.startsWith('63')) {
input.value = "+63 " + numericValue.substring(2);
} else {
input.value = "+63 " + numericValue;
}
if (input.value.length > 14) {
input.value = input.value.slice(0, 14);
}
}
</script>
<script>
function editUser() {
// var fileInput = document.getElementById('fileInput' + vendorId);
@ -1625,7 +1674,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<div class="form-group">
<label for="cphone-" class="text-dark font-weight-medium pt-3 mb-2">Contact Number</label>
<input type="text" class="form-control" id="cphone-" value="<?php echo $vendorData['phone'] ?>">
<input type="text" class="form-control" id="cphone-" value="<?php echo $vendorData['phone'] ?>" oninput="preventEraseInPrefix(this)">
</div>
<!-- 02-23-2023 Jun Jihad Vendor Description Field-->
<div class="form-group">
@ -1651,7 +1700,7 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Modal end -->
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<!-- <div class="ec-nav-toolbar">
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
@ -1672,7 +1721,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
</div>
</div>
</div> -->
<!-- Footer navigation panel for responsive display end -->
<!-- raymart remove popup feb 20 2024 -->

View File

@ -379,7 +379,7 @@ if ($_SESSION["isVendor"] == true) {
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.DONE) {
if (xhr.status === 0) {
if (xhr.status === 200) {
console.log('Products removed successfully');
location.reload();
} else {
@ -527,7 +527,7 @@ if ($_SESSION["isVendor"] == true) {
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<!-- <div class="ec-nav-toolbar">
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
@ -549,7 +549,7 @@ if ($_SESSION["isVendor"] == true) {
</div>
</div>
</div>
</div> -->
<!-- Footer navigation panel for responsive display end -->