Compare commits

..

18 Commits

Author SHA1 Message Date
Stacy 62c2d9ae1b pagination & search filter 2024-05-03 18:13:39 +08:00
Stacy 7d44fae6bd cart & wishlist countdown in mobile view 2024-05-03 18:12:24 +08:00
Stacy 02b2f799db removed products for Sale/Inquiry in Vendor's Page 2024-05-03 18:09:25 +08:00
Stacy 1d6b14208d Vendor: Remove Buttons - Wishlist and Cart 2024-05-03 18:07:31 +08:00
Stacy 8439191bbc selection button for address 2024-05-03 18:05:45 +08:00
MarkHipe 3d686c607f Merge pull request 'fixed dynamic data for admin sales report chart' (#78) from gelo_branch into main
Reviewed-on: #78
2024-05-03 17:05:16 +08:00
gelonspr 22a3a404aa fixed dynamic data for admin sales report chart 2024-05-03 17:00:39 +08:00
MarkHipe eec3c04121 Merge pull request 'louie_branch' (#77) from louie_branch into main
Reviewed-on: #77
2024-05-03 16:58:01 +08:00
jouls 0728acbcc6 Merge branch 'main' of https://code.obanana.io/Obanana.Corporation/obanana_b2b_test into louie_branch 2024-05-03 16:55:32 +08:00
MarkHipe d4f61153d2 Merge pull request 'minor bugs' (#76) from raymart_branch into main
Reviewed-on: #76
2024-05-03 16:34:13 +08:00
raymart 7679dad1e6 minor bugs 2024-05-03 16:31:55 +08:00
jouls 4200c4e155 minor fixes on stylings inside modal box 2024-05-02 17:22:39 +08:00
jouls 2da9f77349 Improved data table and layout of vendouy payouts page 2024-05-02 15:59:16 +08:00
MarkHipe 4d7a47b158 Merge pull request 'mark_4' (#75) from mark_4 into main
Reviewed-on: #75
2024-04-30 14:49:08 +08:00
mark H 613325f68d new update 2024-04-30 14:46:53 +08:00
mark H 0c368796a7 Merge branch 'main' of https://code.obanana.io/Obanana.Corporation/obanana_b2b_test into mark_4 2024-04-30 14:42:33 +08:00
mark H a9853d178c - new update 2024-04-30 14:25:28 +08:00
MarkHipe a7a4b1482d Merge pull request 'stacy_branch' (#74) from stacy_branch into main
Reviewed-on: #74
2024-04-30 14:17:02 +08:00
26 changed files with 1440 additions and 722 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

@ -689,6 +689,7 @@ function popupAddToCart(
var cartList = document.querySelector(".eccart-pro-items");
var newOrder = document.createElement("li");
newOrder.className = "rowcart";
newOrder.id = `order_${response._id}`;
var imageUrl = response.items[0].product.product_image
? response.items[0].product.product_image.split(",")[0].trim()
@ -696,6 +697,7 @@ function popupAddToCart(
console.log(response);
newOrder.innerHTML = `
<input type="checkbox" class="rowcartCheckbox" name="cart-item[]" value="${response._id}"/>
<a href="product-left-sidebar.php?id=${response.items[0]._id}" class="sidekka_pro_img">
<img src="${imageUrl}" alt="product" />
</a>
@ -709,10 +711,10 @@ function popupAddToCart(
<div class="qty-plus-minuses" style="display:flex; overflow:visible; align-items:center; margin-top:5px;">
<div class="qty-btn" style="color:#ffaa00; font-size:35px; margin-right:5px; cursor: pointer;" onclick="qtyDecrement('${response._id}', '${response.items[0]._id}', true)"
onmouseover="this.style.color='#a15d00'" onmouseout="this.style.color='#ffaa00'">-</div>
<input style="width:100px; height:40px" id="qty-input-${response.items[0]._id}" class="qty-input" type="number" name="ec_qtybtn" value="${productData.quantity}" oninput="handleQtyInput(this, '${response._id}', '${response.items[0]._id}', true)"/>
<input style="width:80px; height:40px" id="qty-input-${response.items[0]._id}" class="qty-input" type="number" name="ec_qtybtn" value="${productData.quantity}" oninput="handleQtyInput(this, '${response._id}', '${response.items[0]._id}', true)"/>
<div class="qty-btn" style="color:#ffaa00; font-size:30px; margin-left:5px; cursor: pointer;" onclick="qtyIncrement('${response._id}', '${response.items[0]._id}', true)"
onmouseover="this.style.color='#a15d00'" onmouseout="this.style.color='#ffaa00'">+</div>
<a href="#" class="removeCart" style="margin-left:30px;" onclick="deleteOrder('${response._id}')">
<a href="#" class="removeCart" style="margin-left:10px;" onclick="deleteOrder('${response._id}')">
<i class="ecicon eci-trash" style="color:#7e7e7e;" onmouseover="this.style.color='#aaaaaa'"
onmouseout="this.style.color='#7e7e7e'"></i></a>
</div>

View File

@ -133,21 +133,37 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<!-- 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;
}
});
}
function updateWishItemCount() {
$.get("wishlistitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data) {
if (data != "") {
document.getElementById("wishItemCount").innerHTML = data;
}
});
}
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;
document.getElementById("cartNewItemCount").innerHTML = data;
}
}
};
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;
document.getElementById("wishNewItemCount").innerHTML = data;
}
}
};
xhr.send();
}
</script>
<!-- raymart added css feb 14 2024 -->
<style>
@ -302,7 +318,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<div class="ec-page-description ec-page-description-info"style="background: orange;">
<div class="ec-page-block" style="background: #393e46;">
<div class="ec-catalog-vendor">
<a href="vendor-profile.html">
<?php
if (isset($vendor["vendor_image"])) {
?><img loading="lazy" src="<?php echo $vendor["vendor_image"] ?>" alt="vendor img"><?php
@ -310,14 +326,14 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
?><img loading="lazy" src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="vendor img"><?php
}
?>
</a>
</div>
<div class="ec-catalog-vendor-info row" style="justify-content: center;">
<div class="col-lg-3 col-md-6 ec-catalog-name pad-15">
<a href="vendor-profile.html">
<h6 class="name"><?php echo $vendor["user_login"] ?></h6>
</a>
<p>( Retail Business )</p>
</div>
<!-- raymart remove level feb 22 2024 -->
@ -326,18 +342,20 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<p>Level : 9 out of 10</p>
</div> -->
<div class="col-lg-3 col-md-6 ec-catalog-pro-count pad-15">
<a href="vendor-profile.html">
<h6>Seller Products</h6>
<?php
?>
</a>
<p><?php echo count($products) ?> Products</p>
</div>
<div class="col-lg-3 col-md-6 ec-catalog-since pad-15">
<a href="vendor-profile.html">
<h6>Seller since</h6>
<p><?php echo $vendor["date_registered"] ?></p>
</a>
<!-- <p><?php echo $vendor["date_registered"] ?></p> -->
<p><?php echo date('F j, Y', strtotime($vendor['date_registered'])); ?></p>
</div>
</div>
</div>
@ -391,134 +409,8 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<!-- Shop content Start -->
<div class="shop-pro-content">
<div class="shop-pro-inner">
<div class="row" id="product-container">
<?php
//var_dump($products);
foreach ($filteredProducts as $product){
// $vendorOfProduct = getVendorbyId($product['vendor_api_id']);
?>
<div class="col-lg-4 col-md-6 col-sm-6 col-xs-6 mb-6 pro-gl-content">
<div class="ec-product-inner">
<div class="ec-pro-image-outer" style="max-width: 290px; height: 350px;">
<div class="ec-pro-image">
<!-- raymart added for link for product feb 22 2024 -->
<a class="image" href="product-left-sidebar.php?id=<?php echo $product["_id"] ?>"<?php echo $product["product_image"] ?>>
<!-- raymart replace new function for images of the product march 8 2024 -->
<?php
if (isset($product['images'])) {
$image_urls = explode(',', $product['images']);
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: 330px; object-fit: cover;"/>
<?php
}
} else {
?>
<img loading="lazy" class="main-image" src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="edit" />
<?php
}
?>
</a>
<!-- raymart edit action feb 14 2024 -->
<div class="ec-pro-actions" style="bottom: -36px;">
<!-- raymart replace updated prize for the product march 8 2024 -->
<?php if (isset($product["sale_price"]) && $product["sale_price"] > 0) : ?>
<button title="Add To Cart" onclick="popupAddToCart(`<?php echo htmlspecialchars(json_encode($product), ENT_QUOTES, 'UTF-8'); ?>`,`<?php echo htmlspecialchars($vendorOfProduct, ENT_QUOTES, 'UTF-8'); ?>`, `<?php echo isset($_SESSION['token']) ? $_SESSION['token'] : ''; ?>` , `<?php echo isset($_SESSION['email']) ? $_SESSION['email'] : ''; ?>` , `<?php echo isset($_SESSION['password']) ? $_SESSION['password'] : ''; ?>` , `<?php echo htmlspecialchars(json_encode($customer_data), ENT_QUOTES, 'UTF-8'); ?>`);" 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('<?php echo htmlspecialchars(json_encode($product), ENT_QUOTES, 'UTF-8'); ?>', '<?php echo htmlspecialchars(json_encode($customer_data), ENT_QUOTES, 'UTF-8'); ?>');"><i class="fi-rr-heart"></i></a>
<?php elseif (isset($product["regular_price"]) && $product["regular_price"] != "") : ?>
<button title="Add To Cart" onclick="popupAddToCart(`<?php echo htmlspecialchars(json_encode($product), ENT_QUOTES, 'UTF-8'); ?>`,`<?php echo htmlspecialchars($vendorOfProduct, ENT_QUOTES, 'UTF-8'); ?>`, `<?php echo isset($_SESSION['token']) ? $_SESSION['token'] : ''; ?>` , `<?php echo isset($_SESSION['email']) ? $_SESSION['email'] : ''; ?>` , `<?php echo isset($_SESSION['password']) ? $_SESSION['password'] : ''; ?>` , `<?php echo htmlspecialchars(json_encode($customer_data), ENT_QUOTES, 'UTF-8'); ?>`);" 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('<?php echo htmlspecialchars(json_encode($product), ENT_QUOTES, 'UTF-8'); ?>', '<?php echo htmlspecialchars(json_encode($customer_data), ENT_QUOTES, 'UTF-8'); ?>');"><i class="fi-rr-heart"></i></a>
<?php else : ($product["regular_price"] == "" || $product["regular_price"] == null) ?>
<a class="ec-btn-group wishlist" title="Wishlist" onclick="popupWishlist('<?php echo htmlspecialchars(json_encode($product), ENT_QUOTES, 'UTF-8'); ?>', '<?php echo htmlspecialchars(json_encode($customer_data), ENT_QUOTES, 'UTF-8'); ?>');"><i class="fi-rr-heart"></i></a>
<?php endif; ?>
</div>
<!-- <span class="percentage">20%</span>
<a href="#" class="quickview" data-link-action="quickview" title="Quick view" data-bs-toggle="modal" data-bs-target="#ec_quickview_modal"><i class="fi-rr-eye"></i></a>
<div class="ec-pro-actions">
<a href="compare.html" class="ec-btn-group compare" title="Compare"><i class="fi fi-rr-arrows-repeat"></i></a>
<button title="Add To Cart" class="add-to-cart"><i class="fi-rr-shopping-basket"></i> Add To Cart</button>
<a class="ec-btn-group wishlist" title="Wishlist"><i class="fi-rr-heart"></i></a>
</div> -->
</div>
</div>
<div class="ec-pro-content">
<h5 class="ec-pro-title"><a href="product-left-sidebar.php?id=<?php echo $product["_id"] ?>" style="width: 90%; text-wrap: wrap;"><?php echo $product["product_name"] ?></a></h5>
<!-- raymart remove ratings feb 22 2024 -->
<!-- <div class="ec-pro-rating">
<i class="ecicon eci-star fill"></i>
<i class="ecicon eci-star fill"></i>
<i class="ecicon eci-star fill"></i>
<i class="ecicon eci-star fill"></i>
<i class="ecicon eci-star"></i>
</div> -->
<!-- <div class="ec-pro-list-desc">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum is simply dutmmy text ever since the 1500s, when an unknown printer took a galley.</div> -->
<span class="ec-price">
<!-- raymart added $ to pesos function feb 22 2024 -->
<?php if (isset($product["sale_price"]) && $product["sale_price"] > 0) : ?>
<span class="old-price">&#8369;<?php echo number_format($product["regular_price"], 2, ".", ",") ?></span>
<span class="new-price">&#8369;<?php echo number_format($product["sale_price"], 2, ".", ",") ?></span>
<?php elseif (isset($product["regular_price"]) && $product["regular_price"] != "") : ?>
<span class="new-price">&#8369;<?php echo number_format($product["regular_price"], 2, ".", ",") ?></span>
<?php elseif ($product["regular_price"] == "" || $product["regular_price"] == null) : ?>
<span class="inquire-text">Inquire</span>
<?php else : ?>
<span class="inquire-text">Inquire</span>
<?php endif; ?>
<!-- <?php if (isset($product["sale_price"]) && $product["sale_price"] > 0) : ?>
<span class="old-price">&#8369;<?php echo number_format($product["regular_price"], 2, ".", ",") ?></span>
<span class="new-price">&#8369;<?php echo number_format($product["sale_price"], 2, ".", ",") ?></span>
<?php elseif (isset($product["regular_price"]) && $product["regular_price"] != "") : ?>
<span class="new-price">&#8369;<?php echo number_format($product["regular_price"], 2, ".", ",") ?></span>
<?php elseif ($product["regular_price"] == "" || $product["regular_price"] == null) : ?>
<span class="inquire-text">Inquire</span>
<?php else : ?>
<span class="inquire-text">Inquire</span>
<?php endif; ?> -->
</span>
<div class="ec-pro-option">
<!-- raymart remove color and size function feb 22 2024 -->
<!-- <div class="ec-pro-color">
<span class="ec-pro-opt-label">Color</span>
<ul class="ec-opt-swatch ec-change-img">
<?php
if (isset($product["product_image"]) && $product["product_image"] <> "") {
?>
<li class="active"><a href="#" class="ec-opt-clr-img" data-src="<?php echo $product["product_image"] ?>" data-src-hover="<?php echo $product["product_image"] ?>" data-tooltip="Gray"><span style="background-color:#e8c2ff;"></span></a></li>
<li><a href="#" class="ec-opt-clr-img" data-src="<?php echo $product["product_image"] ?>" data-src-hover="<?php echo $product["product_image"] ?>" data-tooltip="Orange"><span style="background-color:#9cfdd5;"></span></a></li>
<?php
} else {
?>
<li class="active"><a href="#" class="ec-opt-clr-img" data-src="assets/images/product-image/6_1.jpg" data-src-hover="assets/images/product-image/6_1.jpg" data-tooltip="Gray"><span style="background-color:#e8c2ff;"></span></a></li>
<li><a href="#" class="ec-opt-clr-img" data-src="assets/images/product-image/6_2.jpg" data-src-hover="assets/images/product-image/6_2.jpg" data-tooltip="Orange"><span style="background-color:#9cfdd5;"></span></a></li>
<?php
}
?>
</ul>
</div> -->
<!-- <div class="ec-pro-size">
<span class="ec-pro-opt-label">Size</span>
<ul class="ec-opt-size">
<li class="active"><a href="#" class="ec-opt-sz" data-old="$25.00" data-new="$20.00" data-tooltip="Small">S</a></li>
<li><a href="#" class="ec-opt-sz" data-old="$27.00" data-new="$22.00" data-tooltip="Medium">M</a></li>
<li><a href="#" class="ec-opt-sz" data-old="$30.00" data-new="$25.00" data-tooltip="Large">X</a></li>
<li><a href="#" class="ec-opt-sz" data-old="$35.00" data-new="$30.00" data-tooltip="Extra Large">XL</a></li>
</ul>
</div> -->
</div>
</div>
</div>
</div>
<?php
}
?>
<div class="row" id="product-container3">
</div>
</div>
@ -542,8 +434,10 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
// JavaScript
document.addEventListener("DOMContentLoaded", function() {
loadProducts();
console.log('<?php echo $json ?>')
function loadProducts(page,isFilter) {
let xhrVendors1 = new XMLHttpRequest();
// Define the endpoint URL for fetching vendors
@ -559,67 +453,71 @@ xhrVendors1.onreadystatechange = function() {
var checkedCategories = getCheckedCheckboxes();
var prices = getMinMaxPrices();
function filterFunction(checkedCategories, minPrice, maxPrice,products) {
var filteredProducts = [];
// Filter by category
if (checkedCategories.length > 0) {
let filteredProduct= products?.filter((product) => {
let categoryF = product?.product_category?.toLowerCase();
// console.log('Category (lowercase):', categoryF);
let result =checkedCategories.includes(categoryF)
// console.log('Checked Categories:', result);
return result; // Return a boolean value indicating whether the category is included
});
filteredProducts=filteredProduct
console.log(filteredProducts);
function filterFunction(checkedCategories, minPrice, maxPrice,products) {
var filteredProducts = [];
// Filter by category
if (checkedCategories.length > 0) {
let filteredProduct= products?.filter((product) => {
let categoryF = product?.product_category?.toLowerCase();
// console.log('Category (lowercase):', categoryF);
let result =checkedCategories.includes(categoryF)
// console.log('Checked Categories:', result);
return result; // Return a boolean value indicating whether the category is included
});
filteredProducts=filteredProduct
console.log(filteredProducts);
} else {
// If no categories are selected, keep all products
filteredProducts = products;
}
} else {
// If no categories are selected, keep all products
filteredProducts = products;
}
// If minPrice or maxPrice is not provided, set them to default values
minPriceFinal = minPrice !== '' ? parseInt(minPrice) : 0;
maxPriceFinal = maxPrice !== '' ? parseInt(maxPrice) : Number.MAX_VALUE;
console.log(checkedCategories, minPrice,products)
// If minPrice or maxPrice is not provided, set them to default values
minPriceFinal = minPrice !== '' ? parseInt(minPrice) : 0;
maxPriceFinal = maxPrice !== '' ? parseInt(maxPrice) : Number.MAX_VALUE;
console.log(checkedCategories, minPrice,products)
// Filter by price range
// Filter by price range
if( minPrice !== ''||maxPrice !== ''){
// Filter by price range
// Filter by price range
if( minPrice !== ''||maxPrice !== ''){
filteredProducts = filteredProducts.filter(function(product) {
// Check if product has a sale price
var salePrice = parseInt(product.sale_price);
var regularPrice = parseInt(product.regular_price);
filteredProducts = filteredProducts.filter(function(product) {
// Check if product has a sale price
var salePrice = parseInt(product.sale_price);
var regularPrice = parseInt(product.regular_price);
// Check if salePrice and regularPrice are valid numbers
// if (isNaN(salePrice) || isNaN(regularPrice)) {
// // One of the prices is not a valid number, use 0 instead
// salePrice = salePrice || 0;
// regularPrice = regularPrice || 0;
// }
var priceToCheck = salePrice > 0 ? salePrice : regularPrice;
// console.log(priceToCheck);
return priceToCheck >= minPriceFinal && priceToCheck <= maxPriceFinal;
});
}
console.log({results:filteredProducts});
// Check if salePrice and regularPrice are valid numbers
// if (isNaN(salePrice) || isNaN(regularPrice)) {
// // One of the prices is not a valid number, use 0 instead
// salePrice = salePrice || 0;
// regularPrice = regularPrice || 0;
// }
var priceToCheck = salePrice > 0 ? salePrice : regularPrice;
// console.log(priceToCheck);
return priceToCheck >= minPriceFinal && priceToCheck <= maxPriceFinal;
});
}
console.log({results:filteredProducts});
// Final filtered products
// console.log({results:filteredProducts});
let final = filteredProducts ??[]
return final;
}
let productContainer = document.getElementById("product-container");
// Final filtered products
// console.log({results:filteredProducts});
let final = filteredProducts ??[]
return final;
}
let productContainer = document.getElementById("product-container3");
productContainer.innerHTML = "";
let productsFinal = JSON.parse(xhrVendors1.responseText);
console.log(productsFinal);
// console.log(productsFinal);
productsFinal= filterFunction(checkedCategories, prices.minPrice, prices.maxPrice,productsFinal);
productsFinal?.forEach(function(prod) {
let product = prod;
let vendorOfProduct = prod.vendor_api_id;
let vendorOfProduct = '<?php echo $json ?>';
// let card = document.createElement("div");
let token ="<?php echo $_SESSION['token'] ?>";
let email ="<?php echo $_SESSION['email'] ?>";
@ -632,17 +530,19 @@ let productContainer = document.getElementById("product-container");
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");
img.setAttribute("loading", "lazy");
img.className = "main-image";
imageContainer.appendChild(img);
} 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");
img.setAttribute("alt", "Product");
@ -654,14 +554,21 @@ let productContainer = document.getElementById("product-container");
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>
@ -1270,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">
@ -1291,7 +1198,7 @@ maxPriceInput.addEventListener('input', function() {
</div>
</div>
</div>
</div> -->
<!-- Footer navigation panel for responsive display end -->
<!-- Recent Purchase Popup -->

View File

@ -17,7 +17,21 @@ if ($_SESSION["userId"] <> "") {
$order_ids = [];
if ($cartItems) {
$cartencode = json_encode($cartItems);
if(!empty($_GET['selected'])){
$selectedIds = explode('-', $_GET['selected']);
// Filter $cartItems array based on selected ids
$filteredCartItems = array_filter($cartItems, function($item) use ($selectedIds) {
return in_array($item['_id'], $selectedIds);
});
$cartItems = $filteredCartItems;
$cartencode = json_encode($filteredCartItems);
}else{
$cartItems = $filteredCartItems;
$cartencode = json_encode($cartItems);
}
foreach ($cartItems as $item) {
array_push($order_ids, $item['_id']);
}

View File

@ -1,5 +1,8 @@
<!-- 02-14-2024 Stacy created this file and added contact-us-action.php -->
<?php session_start()?>
<?php
include "functions.php";
session_start()
?>
<!DOCTYPE html>
<html lang="en">

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">
@ -403,6 +422,20 @@ if ($_SESSION["userId"] <> "") {
<span class="cart_title">My Cart</span>
<button class="ec-close">×</button>
</div>
<style>
.rowcart{
display:flex;
justify-content:center;
align-self: center;
flex-direction:row;
}
.rowcartCheckbox{
height:15px;
width:15px;
margin-right:5px;
}
</style>
<ul class="eccart-pro-items">
<?php
//var_dump($order_data[0]['items'][0]['product']);
@ -413,7 +446,8 @@ if ($_SESSION["userId"] <> "") {
$product = getProduct($order['items'][0]['product']['product_id']);
$product_data = json_decode($product, true);
?>
<li id="order_<?php echo $order['_id'] ?>">
<li class="rowcart" id="order_<?php echo $order['_id'] ?>">
<input type="checkbox" class="rowcartCheckbox" name="cart-item[]" value="<?php echo $order['_id']?>"/>
<a href="product-left-sidebar.php?id=<?php echo $order['items'][0]['product']['product_id']; ?>" class="sidekka_pro_img">
<?php
if (isset($order['items'][0]['product']['product_image'])) {
@ -445,7 +479,7 @@ if ($_SESSION["userId"] <> "") {
<div class="qty-btn" style="color:#ffaa00; font-size:35px; margin-right:5px; cursor: pointer;" onclick="qtyDecrement('<?php echo $order['_id']; ?>' ,
'<?php echo $order['items'][0]['_id']; ?>')" onmouseover="this.style.color='#a15d00'" onmouseout="this.style.color='#ffaa00'">-
</div>
<input style="width:100px; height:40px" id="qty-input-<?php echo $order['items'][0]['_id']; ?>" class="qty-input" type="number"
<input style="width:80px; height:40px" id="qty-input-<?php echo $order['items'][0]['_id']; ?>" class="qty-input" type="number"
name="ec_qtybtn" value="<?php echo $order['items'][0]['quantity']; ?>" oninput="handleQtyInput(this, '<?php echo $order['_id']; ?>',
'<?php echo $order['items'][0]['_id']; ?>')" />
<div class="qty-btn" style="color:#ffaa00; font-size:30px; margin-left:5px; cursor: pointer;" onclick="qtyIncrement('<?php echo $order['_id']; ?>' ,
@ -453,7 +487,7 @@ if ($_SESSION["userId"] <> "") {
</div>
<!-- <a class="remove">x</a> -->
<!-- <a href="#" class="removeCart" onclick="deleteOrder('<?php #echo $order['_id']; ?>')">x</a> -->
<a href="#" class="removeCart" style="margin-left:30px;" onclick="deleteOrder('<?php echo $order['_id']; ?>')">
<a href="#" class="removeCart" style="margin-left:10px;" onclick="deleteOrder('<?php echo $order['_id']; ?>')">
<i class="ecicon eci-trash" style="color:#7e7e7e;" onmouseover="this.style.color='#aaaaaa'"
onmouseout="this.style.color='#7e7e7e'"></i>
</a>
@ -522,7 +556,43 @@ if ($_SESSION["userId"] <> "") {
}
let myLatestOrders = [];
var checkboxes = document.querySelectorAll('input[name="cart-item[]"]');
checkboxes.forEach(function(checkbox) {
checkbox.addEventListener('change', function() {
getCheckedCheckboxes();
getLatestOrders();
// update_Total()
});
});
function getCheckedCheckboxes() {
var checkboxes = document.querySelectorAll('input[name="cart-item[]"]:checked');
var values = [];
checkboxes.forEach(function(checkbox) {
values.push(checkbox.value.toLowerCase().trim());
});
console.log(values);
return values;
}
function update_Total(){
console.log(orderData);
var checkedCategories = getCheckedCheckboxes();
if (orderData && orderData !== "") {
// Calculate the new total amount based on the updated quantities
const orderInitial= null
if(checkedCategories?.length>0){
orderInitial = orderData?.filter(order => checkedCategories?.includes(order._id));
}else{
orderInitial = orderData
}
let newTotalAmount = orderData.items.reduce((total, item) => {
return total + (item.quantity * item.price);
}, 0);
console.log(response);
}
}
function handleQtyInput(input, orderId, itemId, isFloat) {
login(email, password, function(token) {
var newQuantity = parseInt(input.value);
@ -717,7 +787,18 @@ if ($_SESSION["userId"] <> "") {
if (orderData && orderData !== "") {
console.log(orderData)
const filteredOrders = orderData.filter(order => order.status.toUpperCase() === 'CART');
const totalAmountSum = filteredOrders.reduce((sum, order) => {
var checkedCategories = getCheckedCheckboxes();
let orderInitial= null;
if (filteredOrders && filteredOrders !== "") {
// Calculate the new total amount based on the updated quantities
if(checkedCategories?.length>0){
orderInitial = filteredOrders?.filter(order => checkedCategories?.includes(order._id));
}else{
orderInitial = filteredOrders
}
}
const totalAmountSum = orderInitial.reduce((sum, order) => {
const totalAmount = parseFloat(order.total_amount);
return sum + totalAmount;
}, 0);
@ -752,9 +833,12 @@ if ($_SESSION["userId"] <> "") {
function handleCheckoutButton(event) {
event.preventDefault();
var checkedCategories = getCheckedCheckboxes();
const selectedIdString = checkedCategories.join('-');
login(email, password, function(token) {
window.location.href = "checkouttest.php";
window.location.href = `checkouttest.php?selected=${selectedIdString}`;
});
}
@ -785,6 +869,9 @@ if ($_SESSION["userId"] <> "") {
</div>
</div>
</div>
<?php
}
?>
<!-- Header Cart End -->
</div>
</div>
@ -1065,23 +1152,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,8 +334,10 @@ 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");
img.setAttribute("src", firstImageUrl);
img.setAttribute("alt", "Product");
img.className = "main-image";
@ -343,8 +345,8 @@ 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");
img.setAttribute("alt", "Product");
@ -356,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>
@ -923,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">
@ -948,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;
}
}
};
@ -516,13 +518,16 @@ function loadProducts(page,isFilter) {
img.setAttribute("style", "border: 1px solid #eeeeee; height: 330px; object-fit: cover;");
img.setAttribute("class", "main-image");
img.setAttribute("src", firstImageUrl);
img.setAttribute("loading", "lazy");
img.setAttribute("alt", "Product");
img.className = "main-image";
imageContainer.appendChild(img);
} else {
let img = document.createElement("img");
img.className = "main-image";
img.setAttribute("style", "border: 1px solid #eeeeee; height: 330px; object-fit: cover;");
img.setAttribute("style", "width: 290px; height: 200px; 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");
@ -564,7 +569,7 @@ function loadProducts(page,isFilter) {
`<span class="new-price">&#8369;${product?.regular_price}</span>`: 'inquire'
}
</span>
<h6 class="" style="color:#ddd3 !important; font-size:13px; padding-top:10px; padding-bottom:10px"><a href="product-left-sidebar.php?id=${vendor._id}" style="width: 90%; text-wrap: wrap;"> <img style="width:25px; height:25px; border-radius:60px; border: 1px solid #eeee" src="${vendor.vendor_image ?? "https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png"}" /> ${vendor.user_login}</a></h5>
<h6 class="" style="color:#ddd3 !important; font-size:13px; padding-top:10px; padding-bottom:10px"><a href="catalog-single-vendor.php?id=${vendor._id}" style="width: 90%; text-wrap: wrap;"> <img style="width:25px; height:25px; border-radius:60px; border: 1px solid #eeee" src="${vendor.vendor_image ?? "https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png"}" /> ${vendor.user_login}</a></h5>
</div>
</div>`;
@ -1105,20 +1110,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>
@ -1126,7 +1133,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,12 +364,28 @@ 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">
<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>
<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']))
{
?>
<img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product">
<?php
}
else {
?>
<img loading="lazy" class="prod-img" src="<?php echo "https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png"; ?>" alt="product">
<?php
}
?>
</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>
@ -400,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>
@ -435,12 +455,28 @@ 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">
<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>
<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']))
{
?>
<img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product">
<?php
}
else {
?>
<img loading="lazy" class="prod-img" src="<?php echo "https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png"; ?>" alt="product">
<?php
}
?>
</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>
@ -469,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>
@ -506,12 +542,28 @@ 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">
<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>
<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']))
{
?>
<img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product">
<?php
}
else {
?>
<img loading="lazy" class="prod-img" src="<?php echo "https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png"; ?>" alt="product">
<?php
}
?>
</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> -->
@ -540,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>
@ -576,14 +628,27 @@ if ($_SESSION["isVendor"] == 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">
<?php
if(!empty($order['items'][0]['product']['product_image']))
{
?>
<img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product">
<?php
}
else {
?>
<img loading="lazy" class="prod-img" src="<?php echo "https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png"; ?>" alt="product">
<?php
}
?>
</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> -->
@ -618,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>
@ -642,7 +707,7 @@ if ($_SESSION["isVendor"] == true) {
$orders = getOrderbyCustomerId($customer['_id']);
$totalAmount = 0;
$orderExist = false;
if ($orders) {
if ($orders) {
$order_data = json_decode($orders, true);
$_SESSION['cart_items'] = $order_data;
foreach ($order_data as $order) {
@ -655,12 +720,29 @@ 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">
<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>
<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']))
{
?>
<img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product">
<?php
}
else {
?>
<img loading="lazy" class="prod-img" src="<?php echo "https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png"; ?>" alt="product">
<?php
}
?>
</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> -->
@ -1216,7 +1298,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">
@ -1237,7 +1319,7 @@ if ($_SESSION["isVendor"] == true) {
</div>
</div>
</div>
</div> -->
<!-- Footer navigation panel for responsive display end -->
<!-- raymart remove popup feb 20 2024 -->
@ -1446,6 +1528,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>
@ -1463,7 +1568,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

@ -70,7 +70,9 @@ $products = productList();
<!-- Background css -->
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdn.metroui.org.ua/current/metro.css">
<script src="https://cdn.metroui.org.ua/current/metro.js"></script>
<style>
.pagination {
display: flex;
@ -191,16 +193,28 @@ $products = productList();
</div>
<div class="ec-vendor-card-body">
<div class="ec-vendor-card-table">
<table class="table ec-table">
<table class="table ec-table"
id="order-table"
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 product(s)"
>
<thead>
<tr>
<th scope="col">Image</th>
<th scope="col">Name</th>
<th scope="col">Regular Price</th>
<th scope="col">Sale Price</th>
<th scope="col">Minimum Order</th>
<th scope="col">Stock</th>
<th scope="col">Action</th>
<th data-sortable="false" scope="col">Image</th>
<th data-sortable="true" scope="col">Name</th>
<th data-sortable="true" scope="col">Regular Price</th>
<th data-sortable="true" scope="col">Sale Price</th>
<th data-sortable="true" scope="col">Minimum Order</th>
<th data-sortable="true" scope="col">Stock</th>
<th data-sortable="true" scope="col" style=" flex-direction:row; width:200px">Action</th>
</tr>
@ -250,19 +264,22 @@ $products = productList();
</td>
<td><span style="margin-top:8px;"><?php echo $product['product_name']; ?></span></td>
<td><span style="margin-top:8px;"><?php echo $product['regular_price']; ?></span></td>
<td><span style="margin-top:8px;"><?php echo $product['sale_price']; ?></span></td>
<td><span style="margin-top:8px;"><?php echo $product['minimum_order']; ?></span></td>
<td><span style="margin-top:8px;"><?php echo $product['stock']; ?></span></td>
<td style="display:flex; justify-content:space-around;">
<span style="margin-top:4px;">
<input type="checkbox" name="product_checkbox[]" style="width:20px; height:33px; " value="<?php echo $product['_id']; ?>">
</span>
<span style="margin-top:4px;" onclick="editProduct('<?php echo $product['_id'] ?>');">
<a class="mdi mdi-circle-edit-outline" style="font-size:20px;"></a>
</span>
<span style="margin-top:4px;" onclick="deleteProduct('<?php echo $product['_id'] ?>');">
<a class="mdi mdi mdi-delete-outline" style="font-size:20px;"></a>
</span>
<td><span style="margin-top:8px;"><?php echo !empty($product['sale_price']) ?$product['sale_price']: "N/A"; ?></span></td>
<td><span style="margin-top:8px;"><?php echo !empty($product['minimum_order']) ?$product['minimum_order']: "N/A"; ?></span></td>
<td><span style="margin-top:8px;"><?php echo !empty($product['stock']) ?$product['stock']: "N/A"; ?></span></td>
<td >
<div style="display:flex; flex-direction:row; min-width:100px; flex-wrap:nowrap">
<span style="margin-right: 10px;margin-top:4px; color:blue" onclick="editProduct('<?php echo $product['_id'] ?>');">
<a class="mdi mdi-circle-edit-outline" style="font-size:20px; color:blue"></a>
</span>
<span style="margin-top:4px; margin-right: 10px;color:red" onclick="deleteProduct('<?php echo $product['_id'] ?>');">
<a class="mdi mdi mdi-delete-outline" style="font-size:20px; color:red"></a>
</span>
<span style="margin-top:4px; margin-right: 10px;">
<input type="checkbox" name="product_checkbox[]" style="width:20px; height:33px; " value="<?php echo $product['_id']; ?>">
</span>
</div>
</td>
</tr>
<?php
@ -273,13 +290,13 @@ $products = productList();
</div>
</div>
<!-- 03-11-2024 Stacy added pagination -->
<div class="pagination mt-3">
<!-- <div class="pagination mt-3">
<?php
for ($p = 1; $p <= $totalPages; $p++) {
echo "<a href='?page=$p' class='" . ($currentpage == $p ? 'active' : '') . "'>$p</a>";
}
// for ($p = 1; $p <= $totalPages; $p++) {
// echo "<a style='margin-bottom:10px' href='?page=$p' class='" . ($currentpage == $p ? 'active' : '') . "'>$p</a>";
// }
?>
</div>
</div> -->
</div>
</div>
@ -670,6 +687,7 @@ $products = productList();
<script src="assets/js/vendor/jquery.magnific-popup.min.js"></script>
<script src="assets/js/plugins/chart.min.js"></script>
<script src="assets/js/plugins/jquery.sticky-sidebar.js"></script>
<script src="https://cdn.metroui.org.ua/current/metro.js"></script>
<!-- Main Js -->
<script src="assets/js/chart-main.js"></script>

View File

@ -70,14 +70,14 @@ if ($_SESSION["isCustomer"] == 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" />
<link rel="stylesheet" href="https://cdn.metroui.org.ua/current/metro.css">
<script src="https://cdn.metroui.org.ua/current/metro.js"></script>
<!-- Main Style -->
<link rel="stylesheet" href="assets/css/style.css" />
<link rel="stylesheet" href="assets/css/responsive.css" />
<!-- Background css -->
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
<style>
#pagination {
display: flex;
@ -222,19 +222,30 @@ if ($_SESSION["isCustomer"] == true) {
</div>
</div>
<div class="ec-vendor-card-body">
<div class="ec-vendor-card-table">
<table class="table ec-table">
<thead>
<tr>
<th scope="col">Image</th>
<th scope="col">Name</th>
<th scope="col">Status</th>
<th scope="col">Customer Shipping Address</th>
<th scope="col">Total</th>
<th scope="col">Action</th>
</tr>
</thead>
<tbody id="orderItemsBody">
<div class="table-container" >
<table class="table striped hovered" 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 order(s)"
>
<thead>
<tr>
<th data-sortable="false">Image</th>
<th data-sortable="true">Name</th>
<th data-sortable="true">Status</th>
<th data-sortable="true">Customer</th>
<th data-sortable="true" >Total</th>
<th>Action</th>
</tr>
</thead>
<tbody id="orderItemsBody">
<?php
$totalOrders = count($vendorOrders);
$displayLimit = 5;
@ -253,27 +264,66 @@ if ($_SESSION["isCustomer"] == true) {
# 03-11-2024 Stacy modified
if (isset($orderItems['items'][0]['product']['product_image'])) {
?>
<img loading="lazy" class="prod-img" src="<?php echo $orderItems['items'][0]['product']['product_image']; ?>" alt="edit" />
<img loading="lazy" style="height:50px; width:50px" class="prod-img" src="<?php echo $orderItems['items'][0]['product']['product_image']; ?>" alt="edit" />
<?php
} else {
?>
<img loading="lazy" class="prod-img rounded-circle" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/65/No-Image-Placeholder.svg/495px-No-Image-Placeholder.svg.png?20200912122019" alt="edit" />
<img loading="lazy" style="height:50px; width:50px" class="prod-img rounded-circle" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/65/No-Image-Placeholder.svg/495px-No-Image-Placeholder.svg.png?20200912122019" alt="edit" />
<?php
}
?>
<!-- <?php
if (isset($item['product']['product_image']) && !empty($item['product']['product_image'])) {
echo '<img loading="lazy" src="' . $item['product']['product_image'] . '" alt="Product Image" class="prod-img">';
echo '<img loading="lazy " style="height:50px; width:50px" src="' . $item['product']['product_image'] . '" alt="Product Image" class="prod-img">';
} else {
echo '<img loading="lazy" src="assets/img/vendor/u1.jpg" class="prod-img rounded-circle" alt="Placeholder Image">';
echo '<img loading="lazy " style="height:50px; width:50px" src="assets/img/vendor/u1.jpg" class="prod-img rounded-circle" alt="Placeholder Image">';
}
?> -->
</td>
<td style="max-width:300px;"><span class="text-truncate"><?php echo $item['product']['name']; ?></span></td>
<td><span><?php echo $orderItems['status']; ?></span></td>
<td><span><?php echo $orderItems['shipping_address']['shipping_first_name']; ?></span></td>
<td><span><?php echo $orderItems['total_amount']; ?></span></td>
<?php
$status = $orderItems['status'];
$style = '';
$textColor = '';
$borderColor = '';
switch ($status) {
case 'TO SHIP':
$borderColor = 'mint';
$textColor = 'min'; // Change this to match the text color you prefer
break;
case 'TO PAY':
$borderColor = '#E0EA00';
$textColor = '#E0EA00';
break;
case 'TO RECEIVE':
$borderColor = '#20FF5A';
$textColor = '#20FF5A';
break;
case 'COMPLETED':
$borderColor = '#2098FF';
$textColor = '#2098FF'; // Change this to match the text color you prefer
break;
case 'TO REFUND':
$borderColor = '#FF5320';
$textColor = '#FF5320';
break;
default:
// Default styles if the status doesn't match any case
$borderColor = '#464646';
$textColor = '#464646';
}
// Generating style attribute based on the selected colors
$style = "display: flex; height: 15px;font-weight:400; width:90px; margin-top:10px; font-size:10px !important; justify-content:center; align-items:center; padding: 10px; border: 3px solid $borderColor; border-radius: 30px; color: $textColor;";
?>
<td><span style="<?php echo $style; ?>"> <p><?php echo $status; ?></p></span></td>
<td><span style="text-transform:capitalize"><?php echo $orderItems['shipping_address']['shipping_first_name']; ?></span></td>
<td ><span><?php echo $orderItems['total_amount']; ?></span></td>
<td style="display:flex; justify-content:center; margin-top:-4px;">
<span onclick="editVendorOrder('<?php echo $orderItems['_id'] ?>');">
<a class="mdi mdi-circle-edit-outline" style="font-size: 20px;"></a>
@ -286,10 +336,26 @@ if ($_SESSION["isCustomer"] == true) {
?>
</tbody>
</table>
<!-- <button id="exportBtn">Export to CSV</button> -->
</div>
<div id="pagination"></div>
<!-- <div id="pagination"></div> -->
</div>
<script>
// Initialize Metro UI components
// var tables = document.querySelectorAll('[data-role="table"]');
// tables.forEach(function(table) {
// new METRO.Table(table);
// });
// document.getElementById("exportBtn").addEventListener("click", function() {
// var table = document.querySelector('#order-table')._metroTable;
// table.export('CSV', 'all', 'table-export.csv', {
// csvDelimiter: "\t",
// csvNewLine: "\r\n",
// includeHeader: true
// });
// });
</script>
<script>
var sessionToken = '<?php echo isset($_SESSION["token"]) ? $_SESSION["token"] : ""; ?>';
var email = '<?php echo isset($_SESSION["email"]) ? $_SESSION["email"] : ""; ?>';
var password = '<?php echo isset($_SESSION["password"]) ? $_SESSION["password"] : ""; ?>';
@ -391,21 +457,22 @@ if ($_SESSION["isCustomer"] == true) {
});
}
function createPagination() {
const paginationContainer = document.getElementById('pagination');
// function createPagination() {
// const paginationContainer = document.getElementById('pagination');
for (let i = 1; i <= totalPages; i++) {
// created a tag
const pageButton = document.createElement('a');
// created class for a tag
pageButton.className = "page-btn page-" + i
pageButton.textContent = i;
pageButton.addEventListener('click', () => showPage(i));
paginationContainer.appendChild(pageButton);
}
}
// for (let i = 1; i <= totalPages; i++) {
// // created a tag
// const pageButton = document.createElement('a');
// // created class for a tag
// pageButton.className = "page-btn page-" + i
// pageButton.style="margin:5px"
// pageButton.textContent = i;
// pageButton.addEventListener('click', () => showPage(i));
// paginationContainer.appendChild(pageButton);
// }
// }
createPagination();
// createPagination();
showPage(1); // Show the first page by default
</script>
@ -421,15 +488,25 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<div class="ec-vendor-card-body">
<div class="ec-vendor-card-table">
<table class="table ec-table">
<table class="table ec-table"
id="order-table"
data-role="table"
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 product(s)"
>
<thead>
<tr>
<th scope="col">Image</th>
<th scope="col">Name</th>
<th scope="col">Regular Price</th>
<th scope="col">Sale Price</th>
<th scope="col">Minimum Order</th>
<th scope="col">Stock</th>
<th data-sortable="false" scope="col">Image</th>
<th data-sortable="true" scope="col">Name</th>
<th data-sortable="true" scope="col">Regular Price</th>
<th data-sortable="true" scope="col">Sale Price</th>
<th data-sortable="true" scope="col">Minimum Order</th>
<th data-sortable="true" scope="col">Stock</th>
</tr>
</thead>
@ -438,7 +515,9 @@ if ($_SESSION["isCustomer"] == true) {
$products = productListVendor($vendorId);
$totalProducts = count($products);
$displayLimit = 5;
// for ($i = 0; $i < min($totalProducts, $displayLimit); $i++) {
for ($i = 0; $i < min($totalProducts, $displayLimit); $i++) {
$product = $products[$i];
?>
<tr>
@ -470,9 +549,9 @@ if ($_SESSION["isCustomer"] == true) {
</td>
<td style="max-width:300px;"><span class="text-truncate"><?php echo $product['product_name']; ?></span></td>
<td><span><?php echo $product['regular_price']; ?></span></td>
<td><span><?php echo $product['sale_price']; ?></span></td>
<td><span><?php echo $product['minimum_order']; ?></span></td>
<td><span><?php echo $product['stock']; ?></span></td>
<td><span><?php echo !empty($product['sale_price']) ?$product['sale_price']: "N/A"; ?></span></td>
<td><span><?php echo !empty($product['minimum_order']) ?$product['minimum_order']: "N/A";?></span></td>
<td><span><?php echo !empty($product['stock']) ?$product['stock']: "0"; ?></span></td>
</tr>
<?php
}
@ -480,7 +559,7 @@ if ($_SESSION["isCustomer"] == true) {
</tbody>
</table>
</div>
<div id="pagination"></div>
<!-- <div id="pagination"></div> -->
</div>
</div>
<!-- 02-26-2024 Stacy commented out -->
@ -847,7 +926,7 @@ if ($_SESSION["isCustomer"] == true) {
<script src="assets/js/vendor/bootstrap.min.js"></script>
<script src="assets/js/vendor/jquery-migrate-3.3.0.min.js"></script>
<script src="assets/js/vendor/modernizr-3.11.2.min.js"></script>
<script src="https://cdn.metroui.org.ua/current/metro.js"></script>
<!--Plugins JS-->
<script src="assets/js/plugins/swiper-bundle.min.js"></script>
<script src="assets/js/plugins/nouislider.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

@ -70,6 +70,8 @@ if ($_SESSION["isCustomer"] == true) {
<link rel="stylesheet" href="assets/css/style2.css" />
<link rel="stylesheet" href="assets/css/responsive.css" />
<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 -->
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
<style>
@ -206,15 +208,26 @@ if ($_SESSION["isCustomer"] == true) {
<div id="payments" class="tab-content active">
<!-- Gelo added vendor payments tab -->
<table class="table ec-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 scope="col">Payment Method</th>
<th scope="col">Amount</th>
<th scope="col">Status</th>
<th scope="col">Description</th>
<th scope="col">Date Created</th>
<th scope="col">Action</th>
<th data-sortable="true" scope="col">Payment Method</th>
<th data-sortable="true" scope="col">Amount</th>
<th data-sortable="true" scope="col">Status</th>
<th data-sortable="true" scope="col">Description</th>
<th data-sortable="true" scope="col">Date Created</th>
<th data-sortable="true" scope="col">Action</th>
</tr>
</thead>
<tbody id="paymentsTableBody">
@ -250,7 +263,7 @@ if ($_SESSION["isCustomer"] == true) {
</tbody>
</table>
</div>
<div id="pagination"></div>
<!-- <div id="pagination"></div> -->
<script>
@ -286,21 +299,21 @@ if ($_SESSION["isCustomer"] == true) {
});
}
function createPagination() {
const paginationContainer = document.getElementById('pagination');
// function createPagination() {
// const paginationContainer = document.getElementById('pagination');
for (let i = 1; i <= totalPages; i++) {
// created a tag
const pageButton = document.createElement('a');
// created class for a tag
pageButton.className = "page-btn page-" + i
pageButton.textContent = i;
pageButton.addEventListener('click', () => showPage(i));
paginationContainer.appendChild(pageButton);
}
}
// for (let i = 1; i <= totalPages; i++) {
// // created a tag
// const pageButton = document.createElement('a');
// // created class for a tag
// pageButton.className = "page-btn page-" + i
// pageButton.textContent = i;
// pageButton.addEventListener('click', () => showPage(i));
// paginationContainer.appendChild(pageButton);
// }
// }
createPagination();
// createPagination();
showPage(1); // Show the first page by default
</script>
<script>
@ -885,6 +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>
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 -->