Compare commits

...

47 Commits

Author SHA1 Message Date
Stacy c361a31143 Merge branch 'main' of https://code.obanana.io/Obanana.Corporation/obanana_b2b_test into stacy_branch 2024-04-30 14:12:32 +08:00
MarkHipe 2cb98f24d6 Merge pull request 'fixed admin dashboard download csv and initialized dynamic dataset for sales report' (#73) from gelo_branch into main
Reviewed-on: #73
2024-04-30 14:10:49 +08:00
gelonspr f278bb854d fixed admin dashboard download csv and initialized dynamic dataset for sales report 2024-04-30 14:09:53 +08:00
MarkHipe c154d801d2 Merge pull request 'louie_branch' (#72) from louie_branch into main
Reviewed-on: #72
2024-04-30 14:07:17 +08:00
jouls 32fd214c51 Merge branch 'main' of https://code.obanana.io/Obanana.Corporation/obanana_b2b_test into louie_branch 2024-04-30 14:03:55 +08:00
Stacy 3fdab75955 applied price matrix on hover addtocart buttons 2024-04-30 13:47:33 +08:00
Stacy 3e3ebfe66c created back button 2024-04-30 13:46:28 +08:00
Stacy 3f334715f3 updated quantity UI 2024-04-30 13:45:35 +08:00
Stacy 7d847cd447 removed some reload and modified console 2024-04-30 13:44:23 +08:00
jouls b4b69ba223 added dynamic bank information on upcoming payouts based on the default bank payout set by the user 2024-04-30 09:26:24 +08:00
MarkHipe b92be0667d Merge pull request 'minor bugs, add +63 in contact at modal, pagination in admin' (#71) from raymart_branch into main
Reviewed-on: #71
2024-04-30 09:12:20 +08:00
raymart e6ea65914e minor bugs, add +63 in contact at modal, pagination in admin 2024-04-30 09:11:18 +08:00
jouls ca799e9c23 added bank name in upcoming payouts in payouts tab 2024-04-30 09:04:40 +08:00
MarkHipe 465679ae48 Merge pull request 'Updates on checkout, product page, user history, vendor settings, vendor profile' (#70) from jun-branch into main
Reviewed-on: #70
2024-04-30 08:28:00 +08:00
Jun Barroga e1771dccdc Updates on checkout, product page, user history, vendor settings, vendor profile 2024-04-30 08:22:40 +08:00
jouls 2ad0c9e955 changed logic of summation of daily revenue 2024-04-26 17:36:12 +08:00
jouls e8b5b6b50c added return status column on recent orders table 2024-04-26 17:35:53 +08:00
jouls 0dd203aba2 added error handling for routes on vendor pages 2024-04-26 15:47:05 +08:00
jouls 88ae2713bb improvements on new vendors table 2024-04-26 14:26:32 +08:00
jouls e30cbcebd7 improvements on admin dashboard and order history 2024-04-26 13:01:28 +08:00
jouls 0dfa648b19 Added total users and new vendors table, improvements on recent orders table 2024-04-25 18:21:15 +08:00
jouls 8858763cd6 Added New Customers Table 2024-04-25 17:18:36 +08:00
jouls 793afa339f Added Daily Signup Counter 2024-04-25 15:35:16 +08:00
jouls 35a6c3b693 added functions for getAllCustomers and getAllVendors 2024-04-25 15:34:57 +08:00
jouls 46995fef7b removed forgot pass in register user 2024-04-25 15:16:37 +08:00
MarkHipe 69afa41d33 Merge pull request 'fix error' (#69) from mark_3 into main
Reviewed-on: #69
2024-04-24 09:50:50 +08:00
mark H 12a5e426b5 fix error 2024-04-24 09:49:23 +08:00
MarkHipe fc13003509 Merge pull request 'new update lazy loading, search, filter ant etc' (#68) from mark into main
Reviewed-on: #68
2024-04-23 13:19:13 +08:00
mark H e1a8c82baf new update lazy loading, search, filter ant etc 2024-04-23 11:17:55 +08:00
MarkHipe a4bf959c5e Merge pull request 'jun-branch' (#67) from jun-branch into main
Reviewed-on: #67
2024-04-23 09:40:17 +08:00
Jun Barroga dd97fd134c Merge branch 'main' into jun-branch 2024-04-23 09:38:48 +08:00
Jun Barroga 5f1aa3ab36 Fix Variable and Variation Bugs 2024-04-23 09:38:06 +08:00
MarkHipe 2f45d91e53 Merge pull request 'fixed vendor-payments and added doughnut chart for admin dashboard' (#66) from gelo_branch into main
Reviewed-on: #66
2024-04-23 09:36:46 +08:00
gelonspr 95d2332aa2 fixed vendor-payments and added doughnut chart for admin dashboard 2024-04-23 09:34:12 +08:00
MarkHipe db76cbc13a Merge pull request 'louie_branch' (#65) from louie_branch into main
Reviewed-on: #65
2024-04-23 09:32:23 +08:00
jouls c3c8d36238 Merge branch 'main' of https://code.obanana.io/Obanana.Corporation/obanana_b2b_test into louie_branch 2024-04-23 09:31:13 +08:00
MarkHipe 36289d353a Merge pull request 'stacy_branch' (#64) from stacy_branch into main
Reviewed-on: #64
2024-04-23 09:17:25 +08:00
jouls 2c29e3cd17 limited rows on recent order table 2024-04-19 15:58:51 +08:00
jouls 191d081c0f minor changes on recent orders table 2024-04-19 15:51:07 +08:00
jouls f9e03219fa added PHI. time zone 2024-04-19 12:43:39 +08:00
jouls c95015152d Improved payouts tab 2024-04-19 11:19:48 +08:00
jouls d1bf1a6395 fixed admin-payments table amount and formatted date 2024-04-19 08:53:13 +08:00
jouls 3d9d52dfcc Added recent orders, daily orders, daily revenue 2024-04-18 18:03:20 +08:00
jouls 04903b33ed minor changes on upcoming payout amount computation 2024-04-17 18:36:04 +08:00
jouls 2ab77fe749 Added formatting for transaction_date and proper label for modal box 2024-04-17 17:07:27 +08:00
jouls 096cc84506 added renewToken script on vendor_payouts 2024-04-17 11:00:04 +08:00
jouls 31f38da140 fixed routing issue in forgot_password 2024-04-17 10:45:14 +08:00
70 changed files with 4220 additions and 2433 deletions

View File

@ -58,7 +58,7 @@
</div>
<ul class="eccart-pro-items">
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/6_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">T-shirt For Women</a>
@ -70,7 +70,7 @@
</div>
</li>
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/12_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">Women Leather Shoes</a>
@ -82,7 +82,7 @@
</div>
</li>
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/3_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">Girls Nylon Purse</a>
@ -162,7 +162,7 @@
<div class="row">
<div class="col-md-6 ec-cms-block ec-abcms-block text-center">
<div class="ec-cms-block-inner">
<img class="a-img" src="assets/images/offer-image/1.jpg" alt="about">
<img loading="lazy" class="a-img" src="assets/images/offer-image/1.jpg" alt="about">
</div>
</div>
<div class="col-md-6 ec-cms-block ec-abcms-block text-center">
@ -200,7 +200,7 @@
<li class="ec-test-item">
<i class="fi-rr-quote-right top"></i>
<div class="ec-test-inner">
<div class="ec-test-img"><img alt="testimonial" title="testimonial"
<div class="ec-test-img"><img loading="lazy" alt="testimonial" title="testimonial"
src="assets/images/testimonial/1.jpg" /></div>
<div class="ec-test-content">
<div class="ec-test-desc">Lorem Ipsum is simply dummy text of the printing and
@ -223,7 +223,7 @@
<li class="ec-test-item ">
<i class="fi-rr-quote-right top"></i>
<div class="ec-test-inner">
<div class="ec-test-img"><img alt="testimonial" title="testimonial"
<div class="ec-test-img"><img loading="lazy" alt="testimonial" title="testimonial"
src="assets/images/testimonial/2.jpg" /></div>
<div class="ec-test-content">
<div class="ec-test-desc">Lorem Ipsum is simply dummy text of the printing and
@ -246,7 +246,7 @@
<li class="ec-test-item">
<i class="fi-rr-quote-right top"></i>
<div class="ec-test-inner">
<div class="ec-test-img"><img alt="testimonial" title="testimonial"
<div class="ec-test-img"><img loading="lazy" alt="testimonial" title="testimonial"
src="assets/images/testimonial/3.jpg" /></div>
<div class="ec-test-content">
<div class="ec-test-desc">Lorem Ipsum is simply dummy text of the printing and
@ -347,28 +347,28 @@
<!-- instagram item -->
<!-- <div class="ec-insta-item">
<div class="ec-insta-inner">
<a href="#" target="_blank"><img src="assets/images/instragram-image/1.jpg"
<a href="#" target="_blank"><img loading="lazy" src="assets/images/instragram-image/1.jpg"
alt="insta"></a>
</div>
</div> -->
<!-- instagram item -->
<!-- <div class="ec-insta-item">
<div class="ec-insta-inner">
<a href="#" target="_blank"><img src="assets/images/instragram-image/2.jpg"
<a href="#" target="_blank"><img loading="lazy" src="assets/images/instragram-image/2.jpg"
alt="insta"></a>
</div>
</div> -->
<!-- instagram item -->
<!-- <div class="ec-insta-item">
<div class="ec-insta-inner">
<a href="#" target="_blank"><img src="assets/images/instragram-image/3.jpg"
<a href="#" target="_blank"><img loading="lazy" src="assets/images/instragram-image/3.jpg"
alt="insta"></a>
</div>
</div> -->
<!-- instagram item -->
<!-- <div class="ec-insta-item">
<div class="ec-insta-inner">
<a href="#" target="_blank"><img src="assets/images/instragram-image/4.jpg"
<a href="#" target="_blank"><img loading="lazy" src="assets/images/instragram-image/4.jpg"
alt="insta"></a>
</div>
</div> -->
@ -376,7 +376,7 @@
<!-- instagram item -->
<!-- <div class="ec-insta-item">
<div class="ec-insta-inner">
<a href="#" target="_blank"><img src="assets/images/instragram-image/5.jpg"
<a href="#" target="_blank"><img loading="lazy" src="assets/images/instragram-image/5.jpg"
alt="insta"></a>
</div>
</div> -->
@ -384,7 +384,7 @@
<!-- instagram item -->
<!-- <div class="ec-insta-item">
<div class="ec-insta-inner">
<a href="#" target="_blank"><img src="assets/images/instragram-image/6.jpg"
<a href="#" target="_blank"><img loading="lazy" src="assets/images/instragram-image/6.jpg"
alt="insta"></a>
</div>
</div> -->
@ -392,7 +392,7 @@
<!-- instagram item -->
<!-- <div class="ec-insta-item">
<div class="ec-insta-inner">
<a href="#" target="_blank"><img src="assets/images/instragram-image/7.jpg"
<a href="#" target="_blank"><img loading="lazy" src="assets/images/instragram-image/7.jpg"
alt="insta"></a>
</div>
</div> -->
@ -438,7 +438,7 @@
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -477,7 +477,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon"></span>
</div>
@ -501,7 +501,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
@ -525,7 +525,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
@ -549,7 +549,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
@ -574,7 +574,7 @@
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -589,7 +589,7 @@
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png">
<img loading="lazy" alt="icon" src="assets/images/common/settings.png">
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -0,0 +1,380 @@
$(document).ready(function() {
"use strict";
let responseData;
function fetchDataAndInitializeChart() {
fetchData()
.then(function (response) {
responseData = response.data;
console.log(responseData);
const completedOrdersCount = countCompletedOrders(responseData);
const toPayOrdersCount = countToPayOrders(responseData);
const toShipOrdersCount = countToShipOrders(responseData);
const returnedOrdersCount = countReturnedOrders(responseData);
initializeChart(completedOrdersCount, toPayOrdersCount, toShipOrdersCount, returnedOrdersCount);
})
.catch(function (error) {
console.error('Error fetching data:', error);
});
}
fetchDataAndInitializeChart();
function fetchData() {
return axios.get('https://api.obanana.shop/api/v1/orders/');
}
function getCurrentMonthData(data) {
const now = new Date();
const currentMonth = now.getMonth();
const currentYear = now.getFullYear();
return data.filter(order => {
const orderDate = new Date(order.order_date);
return orderDate.getMonth() === currentMonth && orderDate.getFullYear() === currentYear;
});
}
function countCompletedOrders(data) {
const filteredData = getCurrentMonthData(data);
let completedOrdersCount = 0;
filteredData.forEach(function(order) {
if (order.status === 'COMPLETED') {
completedOrdersCount++;
}
});
console.log(completedOrdersCount);
return completedOrdersCount;
}
function countToPayOrders(data) {
const filteredData = getCurrentMonthData(data);
let toPayOrdersCount = 0;
filteredData.forEach(function(order) {
if (order.status === 'TO PAY') {
toPayOrdersCount++;
}
});
console.log(toPayOrdersCount);
return toPayOrdersCount;
}
function countToShipOrders(data) {
const filteredData = getCurrentMonthData(data);
let toShipOrdersCount = 0;
filteredData.forEach(function(order) {
if (order.status === 'TO SHIP') {
toShipOrdersCount++;
}
});
console.log(toShipOrdersCount);
return toShipOrdersCount;
}
function countReturnedOrders(data) {
const filteredData = getCurrentMonthData(data);
let returnedOrdersCount = 0;
filteredData.forEach(function(order) {
if (order.status === 'RETURNED') {
returnedOrdersCount++;
}
});
console.log(returnedOrdersCount);
return returnedOrdersCount;
}
function initializeChart(completedOrdersCount , toPayOrdersCount, toShipOrdersCount, returnedOrdersCount) {
var doughnut = document.getElementById("doughnut-chart");
if (doughnut !== null) {
var myDoughnutChart = new Chart(doughnut, {
type: "doughnut",
data: {
labels: ["Completed", "To Pay", "To Ship", "Returned"],
datasets: [
{
label: "Order Status",
data: [completedOrdersCount, toPayOrdersCount, toShipOrdersCount, returnedOrdersCount],
backgroundColor: ["#88aaf3", "#50d7ab", "#9586cd", "#ed9090"],
borderWidth: 1
}
]
},
options: {
responsive: true,
maintainAspectRatio: false,
legend: {
display: false
},
cutoutPercentage: 75,
tooltips: {
callbacks: {
title: function(tooltipItem, data) {
return "Order : " + data["labels"][tooltipItem[0]["index"]];
},
label: function(tooltipItem, data) {
return data["datasets"][0]["data"][tooltipItem["index"]];
}
},
titleFontColor: "#888",
bodyFontColor: "#555",
titleFontSize: 12,
bodyFontSize: 14,
backgroundColor: "rgba(256,256,256,0.95)",
displayColors: true,
borderColor: "rgba(220, 220, 220, 0.9)",
borderWidth: 2
}
}
});
}
}
var acquisition = document.getElementById("salesChart");
if (acquisition !== null) {
function updateDailyLabels() {
var labelsDaily = [];
for (let i = 6; i >= 0; i--) {
var date = new Date();
date.setDate(date.getDate() - i);
labelsDaily.push(formatDate(date));
}
return labelsDaily;
}
function formatDate(date) {
const options = { day: 'numeric', month: 'short' }; // E.g., 26 Apr
return date.toLocaleDateString('en-US', options);
}
// 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 acqData = [
{ //daily data
first: [91, 180, 44, 75, 150, 66, 70], //COD
second: [300, 44, 177, 76, 23, 189, 12], //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
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
}
];
var configAcq = {
// The type of chart we want to create
type: "line",
// The data for our dataset
data: {
// labels: [
// "4 Jan",
// "5 Jan",
// "6 Jan",
// "7 Jan",
// "8 Jan",
// "9 Jan",
// "10 Jan"
// ],
datasets: [
{
label: "Cash on Delivery",
backgroundColor: "rgba(52, 116, 212, .2)",
borderColor: "rgba(52, 116, 212, .7)",
data: acqData[0].first,
lineTension: 0.3,
pointBackgroundColor: "rgba(52, 116, 212,0)",
pointHoverBackgroundColor: "rgba(52, 116, 212,1)",
pointHoverRadius: 3,
pointHitRadius: 30,
pointBorderWidth: 2,
pointStyle: "rectRounded"
},
{
label: "ObananaPay",
backgroundColor: "rgba(255, 192, 203, .3)",
borderColor: "rgba(255, 192, 203, .7)",
data: acqData[0].second,
lineTension: 0.3,
pointBackgroundColor: "rgba(255, 192, 203, 0)",
pointHoverBackgroundColor: "rgba(255, 192, 203, 1)",
pointHoverRadius: 3,
pointHitRadius: 30,
pointBorderWidth: 2,
pointStyle: "rectRounded"
},
{
label: "Paymongo",
backgroundColor: "rgb(178, 251, 212, .3)",
borderColor: "rgba(178, 251, 212, .7)",
data: acqData[0].third,
lineTension: 0.3,
pointBackgroundColor: "rgba(178, 251, 212, 0)",
pointHoverBackgroundColor: "rgba(178, 251, 212, 1)",
pointHoverRadius: 3,
pointHitRadius: 30,
pointBorderWidth: 2,
pointStyle: "rectRounded"
}
]
},
// Configuration options go here
options: {
responsive: true,
maintainAspectRatio: false,
legend: {
display: false
},
scales: {
xAxes: [
{
gridLines: {
display: false
}
}
],
yAxes: [
{
gridLines: {
display: true,
color: "#eee",
zeroLineColor: "#eee"
},
ticks: {
beginAtZero: true,
stepSize: 100,
max: 1000
}
}
]
},
tooltips: {
mode: "index",
titleFontColor: "#888",
bodyFontColor: "#555",
titleFontSize: 12,
bodyFontSize: 15,
backgroundColor: "rgba(256,256,256,0.95)",
displayColors: true,
xPadding: 20,
yPadding: 10,
borderColor: "rgba(220, 220, 220, 0.9)",
borderWidth: 2,
caretSize: 10,
caretPadding: 15
}
}
};
var ctx = document.getElementById("salesChart").getContext("2d");
var lineAcq = new Chart(ctx, configAcq);
document.getElementById("acqLegend").innerHTML = lineAcq.generateLegend();
var items = document.querySelectorAll(
"#user-acquisition .nav-tabs .nav-item"
);
items.forEach(function (item, index) {
item.addEventListener("click", function() {
// Determine which tab was clicked
var selectedTab = this.textContent.trim();
// Choose data and labels based on the selected tab
switch (selectedTab) {
case "Daily":
configAcq.data.labels = labelsDaily;
configAcq.data.datasets[0].data = acqData[0].first;
configAcq.data.datasets[1].data = acqData[0].second;
configAcq.data.datasets[2].data = acqData[0].third;
break;
case "Monthly":
configAcq.data.labels = labelsMonthly;
configAcq.data.datasets[0].data = acqData[1].first;
configAcq.data.datasets[1].data = acqData[1].second;
configAcq.data.datasets[2].data = acqData[1].third;
break;
case "Yearly":
configAcq.data.labels = labelsYearly;
configAcq.data.datasets[0].data = acqData[2].first;
configAcq.data.datasets[1].data = acqData[2].second;
configAcq.data.datasets[2].data = acqData[2].third;
break;
}
lineAcq.update();
});
});
items[0].click();
}
function convertToCSV(data) {
const now = new Date();
const currentMonth = now.getMonth(); // Months are 0-indexed (0 for January, 11 for December)
const currentYear = now.getFullYear();
const filteredData = data.filter(order => {
const orderDate = new Date(order.order_date);
return orderDate.getMonth() === currentMonth && orderDate.getFullYear() === currentYear;
});
const columnTitles = [
'ORDER ID', 'STATUS', 'BUYER NAME', 'TOTAL AMOUNT', 'METHOD', 'ORDER DATE',
'ORDER TIME', 'PRODUCT NAME', 'PRICE', 'QUANTITY', 'VENDOR ID', 'VENDOR NAME'
];
const header = columnTitles.join(',') + '\n';
const body = filteredData.map(order => {
const orderDate = new Date(order.order_date).toLocaleDateString('en-US');
const orderTime = new Date(order.order_date).toLocaleTimeString('en-US');
const productName = order.items.length > 0 ? `"${order.items[0].product.name}"` : '';
return [
order._id,
order.status,
order.customer[0]?.name,
order.total_amount,
order.payment_method,
orderDate,
orderTime,
productName,
order.items[0]?.price,
order.items[0]?.quantity,
order.items[0]?.vendor_id,
order.items[0]?.vendor_name
].join(',');
}).join('\n');
return header + body;
}
function downloadCSV() {
const now = new Date();
const months = ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"];
const currentMonthName = months[now.getMonth()];
const filename = `${currentMonthName}_orders_overview.csv`;
const csv = convertToCSV(responseData); // Ensure responseData is up to date
const blob = new Blob([csv], { type: 'text/csv' });
const url = window.URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = filename;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
window.URL.revokeObjectURL(url);
}
$('#download-btn').on('click', function(event) {
event.preventDefault();
downloadCSV('orders_data.csv');
});
});

View File

@ -29,12 +29,12 @@
<!-- User Account -->
<li class="dropdown user-menu">
<button class="dropdown-toggle nav-link ec-drop" data-bs-toggle="dropdown" aria-expanded="false">
<img src="assets/img/user/user.png" class="user-image" alt="User Image" />
<img loading="lazy" src="assets/img/user/user.png" class="user-image" alt="User Image" />
</button>
<ul class="dropdown-menu dropdown-menu-right ec-dropdown-menu">
<!-- User image -->
<li class="dropdown-header">
<img src="assets/img/user/user.png" class="img-circle" alt="User Image" />
<img loading="lazy" src="assets/img/user/user.png" class="img-circle" alt="User Image" />
<div class="d-inline-block">
John Deo <small class="pt-1">john.example@gmail.com</small>
</div>
@ -91,7 +91,7 @@
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -113,7 +113,7 @@
<li>
<a href="javscript:void(0)" class="media media-message media-notification media-active">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<span class="status active"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -135,7 +135,7 @@
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -280,7 +280,7 @@
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u6.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u6.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -302,7 +302,7 @@
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u7.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u7.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -324,7 +324,7 @@
<li>
<a href="javscript:void(0)" class="media media-message media-notification media-active">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<span class="status active"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -346,7 +346,7 @@
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -368,7 +368,7 @@
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">

View File

@ -13,6 +13,18 @@ if ($_SESSION["userId"] <> "") {
if($_SESSION["user_type"]!="admin"){
header("location: login.php?alert=Only admins allowed here!");
}
date_default_timezone_set('Asia/Manila');
$currentDate = date('m-d-Y');
$all_orders = getAllOrder();
$all_customers = getAllCustomers();
$all_vendors = getAllVendors();
$allSignups = array_merge($all_customers, $all_vendors);
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
@ -24,6 +36,7 @@ if($_SESSION["user_type"]!="admin"){
<meta name="description" content="oBanana B2B - Admin Dashboard">
<title>oBanana B2B - Admin Dashboard</title>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<!-- GOOGLE FONTS -->
<link rel="preconnect" href="https://fonts.googleapis.com">
@ -90,18 +103,18 @@ if($_SESSION["user_type"]!="admin"){
<li class="dropdown user-menu">
<button class="dropdown-toggle nav-link ec-drop" data-bs-toggle="dropdown"
aria-expanded="false">
<img src="assets/img/user/user.png" class="user-image" alt="User Image" />
<img loading="lazy" src="assets/img/user/user.png" class="user-image" alt="User Image" />
</button>
<ul class="dropdown-menu dropdown-menu-right ec-dropdown-menu">
<!-- User image -->
<li class="dropdown-header">
<img src="assets/img/user/user.png" class="img-circle" alt="User Image" />
<img loading="lazy" src="assets/img/user/user.png" class="img-circle" alt="User Image" />
<div class="d-inline-block">
John Deo <small class="pt-1">john.example@gmail.com</small>
John Deo <small class="pt-1"><?php echo $_SESSION['email']?></small>
</div>
</li>
<li>
<a href="user-profile.html">
<a href="#">
<i class="mdi mdi-account"></i> My Profile
</a>
</li>
@ -160,7 +173,7 @@ if($_SESSION["user_type"]!="admin"){
<a href="javscript:void(0)"
class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u2.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u2.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -185,7 +198,7 @@ if($_SESSION["user_type"]!="admin"){
<a href="javscript:void(0)"
class="media media-message media-notification media-active">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u1.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u1.jpg"
alt="Image">
<span class="status active"></span>
</div>
@ -210,7 +223,7 @@ if($_SESSION["user_type"]!="admin"){
<a href="javscript:void(0)"
class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u5.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u5.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -376,7 +389,7 @@ if($_SESSION["user_type"]!="admin"){
<a href="javscript:void(0)"
class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u6.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u6.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -401,7 +414,7 @@ if($_SESSION["user_type"]!="admin"){
<a href="javscript:void(0)"
class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u7.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u7.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -426,7 +439,7 @@ if($_SESSION["user_type"]!="admin"){
<a href="javscript:void(0)"
class="media media-message media-notification media-active">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u1.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u1.jpg"
alt="Image">
<span class="status active"></span>
</div>
@ -451,7 +464,7 @@ if($_SESSION["user_type"]!="admin"){
<a href="javscript:void(0)"
class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u2.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u2.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -476,7 +489,7 @@ if($_SESSION["user_type"]!="admin"){
<a href="javscript:void(0)"
class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u5.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u5.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -701,8 +714,19 @@ if($_SESSION["user_type"]!="admin"){
<div class="col-xl-3 col-sm-6 p-b-15 lbl-card">
<div class="card card-mini dash-card card-1">
<div class="card-body">
<h2 class="mb-1">1,503</h2>
<p>Daily Signups</p>
<?php
$signupCount = 0;
foreach ($allSignups as $signup) {
$signupDate = date('m-d-Y', strtotime($signup['createdAt']));
if ($signupDate === $currentDate) {
$signupCount++;
}
}
?>
<h2 class="mb-1"><?php echo $signupCount; ?></h2>
<!-- <h2 class="mb-1">1,503</h2> -->
<p>Today's Signups</p>
<span class="mdi mdi-account-arrow-left"></span>
</div>
</div>
@ -710,17 +734,45 @@ if($_SESSION["user_type"]!="admin"){
<div class="col-xl-3 col-sm-6 p-b-15 lbl-card">
<div class="card card-mini dash-card card-2">
<div class="card-body">
<h2 class="mb-1">79,503</h2>
<p>Daily Visitors</p>
<span class="mdi mdi-account-clock"></span>
<?php
$userCount = 0;
foreach ($allSignups as $signup) {
$userCount++;
}
?>
<h2 class="mb-1"><?php echo $userCount; ?></h2>
<!-- <h2 class="mb-1">79,503</h2> -->
<p>Total Users</p>
<span class="mdi mdi-account-multiple"></span>
</div>
</div>
</div>
<div class="col-xl-3 col-sm-6 p-b-15 lbl-card">
<div class="card card-mini dash-card card-3">
<div class="card-body">
<h2 class="mb-1">15,503</h2>
<p>Daily Order</p>
<?php
// Get current date
$orderCount = 0; // Initialize order count
$dailyRevenue = 0;
foreach (array_reverse($all_orders) as $x => $val) {
$paymentStatus = strtolower($val['payment']['status']);
$returnStatus = strtolower($val['return_order']['status']);
$orderStatus = strtolower($val['status']);
$formattedOrderDate = date('m-d-Y', strtotime($val['order_date']));
if ($formattedOrderDate == $currentDate) {
$orderCount++;
if($paymentStatus == "paid" && (!$returnStatus || $orderStatus != "returned" )){
$dailyRevenue += $val['total_amount'];
} // Increment order count for each order on the current date
}
}
$finalDailyRevenue = number_format($dailyRevenue, 2, '.', ',');
?>
<h2 class="mb-1"><?php echo $orderCount; ?></h2>
<p>Today's Orders</p>
<span class="mdi mdi-package-variant"></span>
</div>
</div>
@ -728,9 +780,9 @@ if($_SESSION["user_type"]!="admin"){
<div class="col-xl-3 col-sm-6 p-b-15 lbl-card">
<div class="card card-mini dash-card card-4">
<div class="card-body">
<h2 class="mb-1">$98,503</h2>
<p>Daily Revenue</p>
<span class="mdi mdi-currency-usd"></span>
<h2 class="mb-1"> <?php echo $finalDailyRevenue ?></h2>
<p>Today's Revenue</p>
<span class="mdi mdi-cash-multiple"></span>
</div>
</div>
</div>
@ -748,7 +800,7 @@ if($_SESSION["user_type"]!="admin"){
role="tablist">
<li class="nav-item">
<a class="nav-link active" data-bs-toggle="tab" href="#todays" role="tab"
aria-selected="true">Today's</a>
aria-selected="true">Daily</a>
</li>
<li class="nav-item">
<a class="nav-link" data-bs-toggle="tab" href="#monthly" role="tab"
@ -762,7 +814,7 @@ if($_SESSION["user_type"]!="admin"){
<div class="tab-content pt-4" id="salesReport">
<div class="tab-pane fade show active" id="source-medium" role="tabpanel">
<div class="mb-6" style="max-height:247px">
<canvas id="acquisition" class="chartjs2"></canvas>
<canvas id="salesChart" class="chartjs2" style="width: 100%; height: 400px;"></canvas>
<div id="acqLegend" class="customLegend mb-2"></div>
</div>
</div>
@ -778,10 +830,10 @@ if($_SESSION["user_type"]!="admin"){
<h2>Orders Overview</h2>
</div>
<div class="card-body">
<canvas id="doChart"></canvas>
<canvas id="doughnut-chart"></canvas>
</div>
<a href="#" class="pb-5 d-block text-center text-muted"><i
class="mdi mdi-download mr-2"></i> Download overall report</a>
<a href="#" id="download-btn" class="pb-5 d-block text-center text-muted"><i
class="mdi mdi-download mr-2"></i> Download Current Month's Overall Report</a>
<div class="card-footer d-flex flex-wrap bg-white p-0">
<div class="col-6">
<div class="p-20">
@ -789,9 +841,9 @@ if($_SESSION["user_type"]!="admin"){
<li class="mb-2"><i class="mdi mdi-checkbox-blank-circle-outline mr-2"
style="color: #4c84ff"></i>Order Completed</li>
<li class="mb-2"><i class="mdi mdi-checkbox-blank-circle-outline mr-2"
style="color: #80e1c1 "></i>Order Unpaid</li>
style="color: #80e1c1 "></i>Order To Pay</li>
<li><i class="mdi mdi-checkbox-blank-circle-outline mr-2"
style="color: #ff7b7b "></i>Order returned</li>
style="color: #ff7b7b "></i>Order Returned</li>
</ul>
</div>
</div>
@ -799,11 +851,7 @@ if($_SESSION["user_type"]!="admin"){
<div class="p-20">
<ul class="d-flex flex-column justify-content-between">
<li class="mb-2"><i class="mdi mdi-checkbox-blank-circle-outline mr-2"
style="color: #8061ef"></i>Order Pending</li>
<li class="mb-2"><i class="mdi mdi-checkbox-blank-circle-outline mr-2"
style="color: #ffa128"></i>Order Canceled</li>
<li><i class="mdi mdi-checkbox-blank-circle-outline mr-2"
style="color: #7be6ff"></i>Order Broken</li>
style="color: #8061ef"></i>Order To Ship</li>
</ul>
</div>
</div>
@ -995,165 +1043,83 @@ if($_SESSION["user_type"]!="admin"){
<div class="card card-table-border-none card-default recent-orders" id="recent-orders">
<div class="card-header justify-content-between">
<h2>Recent Orders</h2>
<div class="date-range-report">
<span></span>
</div>
</div>
<div class="card-body pt-0 pb-5">
<table class="table card-table table-responsive table-responsive-large"
style="width:100%">
<thead>
<tr>
<th>Order ID</th>
<th>Product Name</th>
<th class="d-none d-lg-table-cell">Units</th>
<th>Payment Method</th>
<th>Customer Name</th>
<th class="d-none d-lg-table-cell">Vendor Name</th>
<th class="d-none d-lg-table-cell">Total Amount</th>
<th class="d-none d-lg-table-cell">Order Date</th>
<th class="d-none d-lg-table-cell">Order Cost</th>
<th>Status</th>
<th></th>
<th>Return Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>24541</td>
<td>
<a class="text-dark" href=""> Coach Swagger</a>
</td>
<td class="d-none d-lg-table-cell">1 Unit</td>
<td class="d-none d-lg-table-cell">Oct 20, 2018</td>
<td class="d-none d-lg-table-cell">$230</td>
<td>
<span class="badge badge-success">Completed</span>
</td>
<td class="text-right">
<div class="dropdown show d-inline-block widget-dropdown">
<a class="dropdown-toggle icon-burger-mini" href=""
role="button" id="dropdown-recent-order1"
data-bs-toggle="dropdown" aria-haspopup="true"
aria-expanded="false" data-display="static"></a>
<ul class="dropdown-menu dropdown-menu-right">
<li class="dropdown-item">
<a href="#">View</a>
</li>
<li class="dropdown-item">
<a href="#">Remove</a>
</li>
</ul>
</div>
</td>
</tr>
<tr>
<td>24541</td>
<td>
<a class="text-dark" href=""> Toddler Shoes, Gucci Watch</a>
</td>
<td class="d-none d-lg-table-cell">2 Units</td>
<td class="d-none d-lg-table-cell">Nov 15, 2018</td>
<td class="d-none d-lg-table-cell">$550</td>
<td>
<span class="badge badge-primary">Delayed</span>
</td>
<td class="text-right">
<div class="dropdown show d-inline-block widget-dropdown">
<a class="dropdown-toggle icon-burger-mini" href="#"
role="button" id="dropdown-recent-order2"
data-bs-toggle="dropdown" aria-haspopup="true"
aria-expanded="false" data-display="static"></a>
<ul class="dropdown-menu dropdown-menu-right">
<li class="dropdown-item">
<a href="#">View</a>
</li>
<li class="dropdown-item">
<a href="#">Remove</a>
</li>
</ul>
</div>
</td>
</tr>
<tr>
<td>24541</td>
<td>
<a class="text-dark" href=""> Hat Black Suits</a>
</td>
<td class="d-none d-lg-table-cell">1 Unit</td>
<td class="d-none d-lg-table-cell">Nov 18, 2018</td>
<td class="d-none d-lg-table-cell">$325</td>
<td>
<span class="badge badge-warning">On Hold</span>
</td>
<td class="text-right">
<div class="dropdown show d-inline-block widget-dropdown">
<a class="dropdown-toggle icon-burger-mini" href="#"
role="button" id="dropdown-recent-order3"
data-bs-toggle="dropdown" aria-haspopup="true"
aria-expanded="false" data-display="static"></a>
<ul class="dropdown-menu dropdown-menu-right">
<li class="dropdown-item">
<a href="#">View</a>
</li>
<li class="dropdown-item">
<a href="#">Remove</a>
</li>
</ul>
</div>
</td>
</tr>
<tr>
<td>24541</td>
<td>
<a class="text-dark" href=""> Backpack Gents, Swimming Cap Slin</a>
</td>
<td class="d-none d-lg-table-cell">5 Units</td>
<td class="d-none d-lg-table-cell">Dec 13, 2018</td>
<td class="d-none d-lg-table-cell">$200</td>
<td>
<span class="badge badge-success">Completed</span>
</td>
<td class="text-right">
<div class="dropdown show d-inline-block widget-dropdown">
<a class="dropdown-toggle icon-burger-mini" href="#"
role="button" id="dropdown-recent-order4"
data-bs-toggle="dropdown" aria-haspopup="true"
aria-expanded="false" data-display="static"></a>
<ul class="dropdown-menu dropdown-menu-right">
<li class="dropdown-item">
<a href="#">View</a>
</li>
<li class="dropdown-item">
<a href="#">Remove</a>
</li>
</ul>
</div>
</td>
</tr>
<tr>
<td>24541</td>
<td>
<a class="text-dark" href=""> Speed 500 Ignite</a>
</td>
<td class="d-none d-lg-table-cell">1 Unit</td>
<td class="d-none d-lg-table-cell">Dec 23, 2018</td>
<td class="d-none d-lg-table-cell">$150</td>
<td>
<span class="badge badge-danger">Cancelled</span>
</td>
<td class="text-right">
<div class="dropdown show d-inline-block widget-dropdown">
<a class="dropdown-toggle icon-burger-mini" href="#"
role="button" id="dropdown-recent-order5"
data-bs-toggle="dropdown" aria-haspopup="true"
aria-expanded="false" data-display="static"></a>
<ul class="dropdown-menu dropdown-menu-right">
<li class="dropdown-item">
<a href="#">View</a>
</li>
<li class="dropdown-item">
<a href="#">Remove</a>
</li>
</ul>
</div>
</td>
</tr>
<?php
$iterationCount = 0;
$ordersDisplayed = false;
foreach (array_reverse($all_orders) as $x => $val) {
$paymentStatus = strtolower($val['payment']['status']);
$formattedOrderDate = date('m-d-Y', strtotime($val['order_date']));
$paymentMethod = $val['payment_method'];
$customerName = $val['customer'][0]['name'];
$vendorName = $val['items'][0]['vendor_name'];
$totalAmount = $val['total_amount'];
$orderStatus = strtoupper($val['status']);
$returnStatus = strtoupper($val['return_order']['status']);
$statusClass = '';
if ($orderStatus === 'UNPAID' || $orderStatus === 'RETURNED') {
$statusClass = '#cb3747';
} elseif ($orderStatus === 'TO PAY') {
$statusClass = '#50d7ab';
} elseif ($orderStatus === 'TO SHIP') {
$statusClass = '#9586cd';
}
elseif ($orderStatus === 'TO RECEIVE') {
$statusClass = '#ffc319';
} elseif ($orderStatus === 'COMPLETED') {
$statusClass = '#88aaf3';
}
if ($formattedOrderDate == $currentDate) {
$ordersDisplayed = true;
$displayDate = date('m-d-Y, g:i A', strtotime($val['order_date']));
?>
<tr>
<td><?php echo $paymentMethod ?></td>
<td><?php echo $customerName ?></td>
<td><?php echo $vendorName ?></td>
<td> <?php echo number_format($totalAmount, 2, '.', ',') ?></td>
<td><?php echo $displayDate ?></td>
<td><span style="color: <?php echo $statusClass; ?>"><?php echo $orderStatus ?></span></td>
<td><?php echo $returnStatus?: "NONE" ?></td>
</tr>
<?php
$iterationCount++;
if ($iterationCount >= 8) {
break;
}
}
}
if (!$ordersDisplayed) {
?>
<tr>
<td class="align-self-center">No Recent Orders Yet.</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
@ -1162,12 +1128,16 @@ if($_SESSION["user_type"]!="admin"){
</div>
<div class="row">
<div class="col-xl-5">
<div class="col-xl-6">
<!-- New Customers -->
<div class="card ec-cust-card card-table-border-none card-default">
<div class="card-header justify-content-between ">
<?php
$weekAgoDate = date('m-d-Y', strtotime('-7 days'));
?>
<h2>New Customers</h2>
<div>
<div> From <?php echo $weekAgoDate; ?> to <?php echo $currentDate; ?></div>
<!-- <div>
<button class="text-black-50 mr-2 font-size-20">
<i class="mdi mdi-cached"></i>
</button>
@ -1182,220 +1152,139 @@ if($_SESSION["user_type"]!="admin"){
<li class="dropdown-item"><a href="#">Something else here</a></li>
</ul>
</div>
</div>
</div> -->
</div>
<div class="card-body pt-0 pb-15px">
<table class="table ">
<tbody>
<?php
$iterationCount = 0;
$customersDisplayed = false;
foreach (array_reverse($all_customers) as $x => $val) {
$formattedSignupDate = date('m-d-Y', strtotime($val['createdAt']));
$imageUrl = $val['customer_image'];
$fullName = $val['first_name'] . ' ' . $val['last_name'];
$email = $val['user_email'];
if ($formattedSignupDate >= $weekAgoDate && $formattedSignupDate <= $currentDate) {
$customersDisplayed = true;
?>
<tr>
<td>
<div class="media">
<div class="media-image mr-3 rounded-circle">
<a href="profile.html"><img
class="profile-img rounded-circle w-45"
src="assets/img/user/u1.jpg"
alt="customer image"></a>
<img loading="lazy"
class="profile-img rounded-circle w-45"
src="<?php echo $imageUrl !== null ? $imageUrl : 'assets/img/user/u1.jpg'; ?>"
alt="customer image">
</div>
<div class="media-body align-self-center">
<a href="profile.html">
<h6 class="mt-0 text-dark font-weight-medium">Selena
Wagner</h6>
</a>
<small>@selena.oi</small>
<h6 class="mt-0 text-dark font-weight-medium"><?php echo $fullName; ?></h6>
<small><?php echo $email; ?></small>
</div>
</div>
</td>
<td>2 Orders</td>
<td class="text-dark d-none d-md-block">$150</td>
</tr>
<tr>
<td>
<div class="media">
<div class="media-image mr-3 rounded-circle">
<a href="profile.html"><img
class="profile-img rounded-circle w-45"
src="assets/img/user/u2.jpg"
alt="customer image"></a>
</div>
<div class="media-body align-self-center">
<a href="profile.html">
<h6 class="mt-0 text-dark font-weight-medium">Walter
Reuter</h6>
</a>
<small>@walter.me</small>
</div>
</div>
</td>
<td>5 Orders</td>
<td class="text-dark d-none d-md-block">$200</td>
</tr>
<tr>
<td>
<div class="media">
<div class="media-image mr-3 rounded-circle">
<a href="profile.html"><img
class="profile-img rounded-circle w-45"
src="assets/img/user/u3.jpg"
alt="customer image"></a>
</div>
<div class="media-body align-self-center">
<a href="profile.html">
<h6 class="mt-0 text-dark font-weight-medium">Larissa
Gebhardt</h6>
</a>
<small>@larissa.gb</small>
</div>
</div>
</td>
<td>1 Order</td>
<td class="text-dark d-none d-md-block">$50</td>
</tr>
<tr>
<td>
<div class="media">
<div class="media-image mr-3 rounded-circle">
<a href="profile.html"><img
class="profile-img rounded-circle w-45"
src="assets/img/user/u4.jpg"
alt="customer image"></a>
</div>
<div class="media-body align-self-center">
<a href="profile.html">
<h6 class="mt-0 text-dark font-weight-medium">Albrecht
Straub</h6>
</a>
<small>@albrech.as</small>
</div>
</div>
</td>
<td>2 Orders</td>
<td class="text-dark d-none d-md-block">$100</td>
</tr>
<tr>
<td>
<div class="media">
<div class="media-image mr-3 rounded-circle">
<a href="profile.html"><img
class="profile-img rounded-circle w-45"
src="assets/img/user/u5.jpg"
alt="customer image"></a>
</div>
<div class="media-body align-self-center">
<a href="profile.html">
<h6 class="mt-0 text-dark font-weight-medium">Leopold
Ebert</h6>
</a>
<small>@leopold.et</small>
</div>
</div>
</td>
<td>1 Order</td>
<td class="text-dark d-none d-md-block">$60</td>
</tr>
<tr>
<td>
<div class="media">
<div class="media-image mr-3 rounded-circle">
<a href="profile.html"><img
class="profile-img rounded-circle w-45"
src="assets/img/user/u3.jpg"
alt="customer image"></a>
</div>
<div class="media-body align-self-center">
<a href="profile.html">
<h6 class="mt-0 text-dark font-weight-medium">Larissa
Gebhardt</h6>
</a>
<small>@larissa.gb</small>
</div>
</div>
</td>
<td>1 Order</td>
<td class="text-dark d-none d-md-block">$50</td>
<td><?php echo $formattedSignupDate?></td>
</tr>
<?php
$iterationCount++;
if ($iterationCount >= 8) {
break;
}
}
}
if (!$customersDisplayed) {
?>
<tr>
<td class="align-self-center">No new customers in the past week</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-xl-7">
<!-- Top Products -->
<div class="card card-default ec-card-top-prod">
<div class="card-header justify-content-between">
<h2>Top Products</h2>
<div>
<button class="text-black-50 mr-2 font-size-20"><i
class="mdi mdi-cached"></i></button>
<div class="col-xl-6">
<!-- New Customers -->
<div class="card ec-cust-card card-table-border-none card-default">
<div class="card-header justify-content-between ">
<?php
$weekAgoDate = date('m-d-Y', strtotime('-7 days'));
?>
<h2>New Vendors</h2>
<div> From <?php echo $weekAgoDate; ?> to <?php echo $currentDate; ?></div>
<!-- <div>
<button class="text-black-50 mr-2 font-size-20">
<i class="mdi mdi-cached"></i>
</button>
<div class="dropdown show d-inline-block widget-dropdown">
<a class="dropdown-toggle icon-burger-mini" href="#" role="button"
id="dropdown-product" data-bs-toggle="dropdown" aria-haspopup="true"
id="dropdown-customar" data-bs-toggle="dropdown" aria-haspopup="true"
aria-expanded="false" data-display="static">
</a>
<ul class="dropdown-menu dropdown-menu-right">
<li class="dropdown-item"><a href="#">Update Data</a></li>
<li class="dropdown-item"><a href="#">Detailed Log</a></li>
<li class="dropdown-item"><a href="#">Statistics</a></li>
<li class="dropdown-item"><a href="#">Clear Data</a></li>
<li class="dropdown-item"><a href="#">Action</a></li>
<li class="dropdown-item"><a href="#">Another action</a></li>
<li class="dropdown-item"><a href="#">Something else here</a></li>
</ul>
</div>
</div>
</div> -->
</div>
<div class="card-body mt-10px mb-10px py-0">
<div class="row media d-flex pt-15px pb-15px">
<div
class="col-lg-3 col-md-3 col-2 media-image align-self-center rounded">
<a href="#"><img src="assets/img/products/p1.jpg" alt="customer image"></a>
</div>
<div class="col-lg-9 col-md-9 col-10 media-body align-self-center ec-pos">
<a href="#">
<h6 class="mb-10px text-dark font-weight-medium">Baby cotton shoes</h6>
</a>
<p class="float-md-right sale"><span class="mr-2">58</span>Sales</p>
<p class="d-none d-md-block">Statement belting with double-turnlock hardware
adds “swagger” to a simple.</p>
<p class="mb-0 ec-price">
<span class="text-dark">$520</span>
<del>$580</del>
</p>
</div>
</div>
<div class="row media d-flex pt-15px pb-15px">
<div
class="col-lg-3 col-md-3 col-2 media-image align-self-center rounded">
<a href="#"><img src="assets/img/products/p2.jpg" alt="customer image"></a>
</div>
<div class="col-lg-9 col-md-9 col-10 media-body align-self-center ec-pos">
<a href="#">
<h6 class="mb-10px text-dark font-weight-medium">Hoodies for men</h6>
</a>
<p class="float-md-right sale"><span class="mr-2">20</span>Sales</p>
<p class="d-none d-md-block">Statement belting with double-turnlock hardware
adds “swagger” to a simple.</p>
<p class="mb-0 ec-price">
<span class="text-dark">$250</span>
<del>$300</del>
</p>
</div>
</div>
<div class="row media d-flex pt-15px pb-15px">
<div
class="col-lg-3 col-md-3 col-2 media-image align-self-center rounded">
<a href="#"><img src="assets/img/products/p3.jpg" alt="customer image"></a>
</div>
<div class="col-lg-9 col-md-9 col-10 media-body align-self-center ec-pos">
<a href="#">
<h6 class="mb-10px text-dark font-weight-medium">Long slive t-shirt</h6>
</a>
<p class="float-md-right sale"><span class="mr-2">10</span>Sales</p>
<p class="d-none d-md-block">Statement belting with double-turnlock hardware
adds “swagger” to a simple.</p>
<p class="mb-0 ec-price">
<span class="text-dark">$480</span>
<del>$654</del>
</p>
</div>
</div>
<div class="card-body pt-0 pb-15px">
<table class="table ">
<tbody>
<?php
$iterationCount = 0;
$vendorsDisplayed = false;
foreach (array_reverse($all_vendors) as $x => $val) {
$formattedSignupDate = date('m-d-Y', strtotime($val['createdAt']));
$imageUrl = $val['vendor_image'];
$shopName = $val['user_login'];
$fullName = $val['first_name'] . ' ' . $val['last_name'];
$email = $val['user_email'];
if ($formattedSignupDate >= $weekAgoDate && $formattedSignupDate <= $currentDate) {
$vendorsDisplayed = true;
?>
<tr>
<td>
<div class="media">
<div class="media-image mr-3 rounded-circle">
<img loading="lazy"
class="profile-img rounded-circle w-45"
src="<?php echo $imageUrl !== null ? $imageUrl : 'assets/img/user/u1.jpg'; ?>"
alt="customer image">
</div>
<div class="media-body align-self-center">
<h6 class="mt-0 text-dark font-weight-medium"><?php echo $shopName; ?></h6>
<small><?php echo $fullName; ?> || </small>
<small><?php echo $email; ?></small>
</div>
</div>
</td>
<td><?php echo $formattedSignupDate?></td>
</tr>
<?php
$iterationCount++;
if ($iterationCount >= 8) {
break;
}
}
}
if (!$vendorsDisplayed) {
?>
<tr>
<td class="align-self-center">No new vendors in the past week</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
@ -1409,7 +1298,7 @@ if($_SESSION["user_type"]!="admin"){
<p>
Copyright &copy; <span id="ec-year"></span><a class="text-primary"
href="https://themeforest.net/user/ashishmaraviya" target="_blank"> Ekka Admin Dashboard</a>. All Rights Reserved.
</p>
</p>
</div>
</footer>
@ -1427,6 +1316,8 @@ if($_SESSION["user_type"]!="admin"){
<script src="assets/plugins/charts/Chart.min.js"></script>
<script src="assets/js/chart.js"></script>
<!-- gelo added dynamic charts -->
<script src="assets/js/dashboard-chart.js"></script>
<!-- Google map chart -->
<script src="assets/plugins/charts/google-map-loader.js"></script>
<script src="assets/plugins/charts/google-map.js"></script>

View File

@ -13,7 +13,7 @@
<div class="ec-brand">
<a href="index.php" title="Ekka">
<img class="ec-brand-icon" src="assets/img/logo/ec-site-logo.png" alt="" />
<img loading="lazy" class="ec-brand-icon" src="assets/img/logo/ec-site-logo.png" alt="" />
<span class="ec-brand-name text-truncate">oBanana</span>
</a>
</div>

View File

@ -47,7 +47,7 @@ if ($_SESSION["isLoggedIn"] == true and $_SESSION["user_type"] == "admin"){
<div class="ec-brand">
<a href="index.php" title="Ekka">
<img class="ec-brand-icon" src="assets/img/logo/ec-site-logo.png" alt="" />
<img loading="lazy" class="ec-brand-icon" src="assets/img/logo/ec-site-logo.png" alt="" />
<span class="ec-brand-name text-truncate">oBanana</span>
</a>
</div>

View File

@ -14,7 +14,7 @@ if ($_SESSION["user_type"] != "admin") {
header("location: login.php?alert=Only admins allowed here!");
}
$orders = getAllOrder();
$allorders = json_encode($orders, true);
// $allorders = json_encode($orders, true);
?>
<!DOCTYPE html>
@ -24,9 +24,9 @@ $allorders = json_encode($orders, true);
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Ekka - Admin Dashboard HTML Template.">
<meta name="description" content="oBanana B2B - Admin Dashboard">
<title>Ekka - Admin Dashboard HTML Template.</title>
<title>oBanana B2B - Admin Dashboard</title>
<!-- GOOGLE FONTS -->
<link rel="preconnect" href="https://fonts.googleapis.com">
@ -82,7 +82,8 @@ $allorders = json_encode($orders, true);
<table id="responsive-data-table" class="table" style="width:100%">
<thead>
<tr>
<th>Date</th>
<th>Updated Date</th>
<th>Order Date</th>
<th>Customer</th>
<th>Vendor</th>
<th>Product</th>
@ -102,6 +103,7 @@ $allorders = json_encode($orders, true);
?>
<tr>
<td><?php echo date('Y-m-d', strtotime($order['updatedAt'])) ?></td>
<td><?php echo date('Y-m-d', strtotime($order['order_date'])) ?></td>
<td><?php echo $order['customer'][0]['name'] ?></td>
<td><?php echo $order['items'][0]['vendor_name'] ?></td>
<td><?php echo $order['items'][0]['product']['name'] ?></td>
@ -137,7 +139,7 @@ $allorders = json_encode($orders, true);
</div>
<div class="form-group">
<label for="return_image-<?php echo $order['_id']; ?>">Refund Image:</label>
<img class="form-control" id="return_image-<?php echo $order['_id']; ?>" src="<?php echo $order['return_order']['image']; ?>">
<img loading="lazy" class="form-control" id="return_image-<?php echo $order['_id']; ?>" src="<?php echo $order['return_order']['image']; ?>">
</div>
<?php if ($order['return_order']['status'] == 'To Ship') : ?>
<button type="submit" class="btn btn-primary" id="to-receive-button-<?php echo $order['_id']; ?>">To Receive</button>

View File

@ -48,7 +48,7 @@
<div class="ec-brand">
<a href="index.php" title="Ekka">
<img class="ec-brand-icon" src="assets/img/logo/ec-site-logo.png" alt="" />
<img loading="lazy" class="ec-brand-icon" src="assets/img/logo/ec-site-logo.png" alt="" />
<span class="ec-brand-name text-truncate">Ekka</span>
</a>
</div>
@ -323,12 +323,12 @@
<li class="dropdown user-menu">
<button class="dropdown-toggle nav-link ec-drop" data-bs-toggle="dropdown"
aria-expanded="false">
<img src="assets/img/user/user.png" class="user-image" alt="User Image" />
<img loading="lazy" src="assets/img/user/user.png" class="user-image" alt="User Image" />
</button>
<ul class="dropdown-menu dropdown-menu-right ec-dropdown-menu">
<!-- User image -->
<li class="dropdown-header">
<img src="assets/img/user/user.png" class="img-circle" alt="User Image" />
<img loading="lazy" src="assets/img/user/user.png" class="img-circle" alt="User Image" />
<div class="d-inline-block">
John Deo <small class="pt-1">john.example@gmail.com</small>
</div>
@ -394,7 +394,7 @@
<a href="javscript:void(0)"
class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u2.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u2.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -419,7 +419,7 @@
<a href="javscript:void(0)"
class="media media-message media-notification media-active">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u1.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u1.jpg"
alt="Image">
<span class="status active"></span>
</div>
@ -444,7 +444,7 @@
<a href="javscript:void(0)"
class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u5.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u5.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -611,7 +611,7 @@
<a href="javscript:void(0)"
class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u6.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u6.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -636,7 +636,7 @@
<a href="javscript:void(0)"
class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u7.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u7.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -661,7 +661,7 @@
<a href="javscript:void(0)"
class="media media-message media-notification media-active">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u1.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u1.jpg"
alt="Image">
<span class="status active"></span>
</div>
@ -686,7 +686,7 @@
<a href="javscript:void(0)"
class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u2.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u2.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -711,7 +711,7 @@
<a href="javscript:void(0)"
class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u5.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u5.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -960,13 +960,13 @@
<div class="avatar-edit">
<input type='file' id="imageUpload" class="ec-image-upload"
accept=".png, .jpg, .jpeg" />
<label for="imageUpload"><img
<label for="imageUpload"><img loading="lazy"
src="assets/img/icons/edit.svg"
class="svg_img header_svg" alt="edit" /></label>
</div>
<div class="avatar-preview ec-preview">
<div class="imagePreview ec-div-preview">
<img class="ec-image-preview"
<img loading="lazy" class="ec-image-preview"
src="assets/img/products/vender-upload-preview.jpg"
alt="edit" />
</div>
@ -979,13 +979,13 @@
<input type='file' id="thumbUpload01"
class="ec-image-upload"
accept=".png, .jpg, .jpeg" />
<label for="imageUpload"><img
<label for="imageUpload"><img loading="lazy"
src="assets/img/icons/edit.svg"
class="svg_img header_svg" alt="edit" /></label>
</div>
<div class="thumb-preview ec-preview">
<div class="image-thumb-preview">
<img class="image-thumb-preview ec-image-preview"
<img loading="lazy" class="image-thumb-preview ec-image-preview"
src="assets/img/products/vender-upload-thumb-preview.jpg"
alt="edit" />
</div>
@ -996,13 +996,13 @@
<input type='file' id="thumbUpload02"
class="ec-image-upload"
accept=".png, .jpg, .jpeg" />
<label for="imageUpload"><img
<label for="imageUpload"><img loading="lazy"
src="assets/img/icons/edit.svg"
class="svg_img header_svg" alt="edit" /></label>
</div>
<div class="thumb-preview ec-preview">
<div class="image-thumb-preview">
<img class="image-thumb-preview ec-image-preview"
<img loading="lazy" class="image-thumb-preview ec-image-preview"
src="assets/img/products/vender-upload-thumb-preview.jpg"
alt="edit" />
</div>
@ -1013,13 +1013,13 @@
<input type='file' id="thumbUpload03"
class="ec-image-upload"
accept=".png, .jpg, .jpeg" />
<label for="imageUpload"><img
<label for="imageUpload"><img loading="lazy"
src="assets/img/icons/edit.svg"
class="svg_img header_svg" alt="edit" /></label>
</div>
<div class="thumb-preview ec-preview">
<div class="image-thumb-preview">
<img class="image-thumb-preview ec-image-preview"
<img loading="lazy" class="image-thumb-preview ec-image-preview"
src="assets/img/products/vender-upload-thumb-preview.jpg"
alt="edit" />
</div>
@ -1030,13 +1030,13 @@
<input type='file' id="thumbUpload04"
class="ec-image-upload"
accept=".png, .jpg, .jpeg" />
<label for="imageUpload"><img
<label for="imageUpload"><img loading="lazy"
src="assets/img/icons/edit.svg"
class="svg_img header_svg" alt="edit" /></label>
</div>
<div class="thumb-preview ec-preview">
<div class="image-thumb-preview">
<img class="image-thumb-preview ec-image-preview"
<img loading="lazy" class="image-thumb-preview ec-image-preview"
src="assets/img/products/vender-upload-thumb-preview.jpg"
alt="edit" />
</div>

View File

@ -110,12 +110,12 @@ $vendorId = $_SESSION["vendorId"];
<!-- User Account -->
<li class="dropdown user-menu">
<button class="dropdown-toggle nav-link ec-drop" data-bs-toggle="dropdown" aria-expanded="false">
<img src="assets/img/user/user.png" class="user-image" alt="User Image" />
<img loading="lazy" src="assets/img/user/user.png" class="user-image" alt="User Image" />
</button>
<ul class="dropdown-menu dropdown-menu-right ec-dropdown-menu">
<!-- User image -->
<li class="dropdown-header">
<img src="assets/img/user/user.png" class="img-circle" alt="User Image" />
<img loading="lazy" src="assets/img/user/user.png" class="img-circle" alt="User Image" />
<div class="d-inline-block">
John Deo <small class="pt-1">john.example@gmail.com</small>
</div>
@ -172,7 +172,7 @@ $vendorId = $_SESSION["vendorId"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -194,7 +194,7 @@ $vendorId = $_SESSION["vendorId"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification media-active">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<span class="status active"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -216,7 +216,7 @@ $vendorId = $_SESSION["vendorId"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -361,7 +361,7 @@ $vendorId = $_SESSION["vendorId"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u6.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u6.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -383,7 +383,7 @@ $vendorId = $_SESSION["vendorId"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u7.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u7.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -405,7 +405,7 @@ $vendorId = $_SESSION["vendorId"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification media-active">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<span class="status active"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -427,7 +427,7 @@ $vendorId = $_SESSION["vendorId"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -449,7 +449,7 @@ $vendorId = $_SESSION["vendorId"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -673,7 +673,7 @@ $vendorId = $_SESSION["vendorId"];
<div class="avatar-upload">
<div class="avatar-edit">
<input type='file' id="imageUpload" class="ec-image-upload" accept=".png, .jpg, .jpeg" multiple onchange="uploadProductImage()" />
<label for="imageUpload"><img src="assets/img/icons/edit.svg" class="svg_img header_svg" alt="edit" /></label>
<label for="imageUpload"><img loading="lazy" src="assets/img/icons/edit.svg" class="svg_img header_svg" alt="edit" /></label>
</div>
<div class="avatar-preview ec-preview">
<div class="imagePreview ec-div-preview">
@ -683,12 +683,12 @@ $vendorId = $_SESSION["vendorId"];
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img class="ec-image-preview" src="<?php echo $first_image_url; ?>" alt="edit" />
<img loading="lazy" class="ec-image-preview" src="<?php echo $first_image_url; ?>" alt="edit" />
<?php
}
} else {
?>
<img class="ec-image-preview" 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" class="ec-image-preview" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/65/No-Image-Placeholder.svg/495px-No-Image-Placeholder.svg.png?20200912122019" alt="edit" />
<?php
}
?>
@ -710,7 +710,7 @@ $vendorId = $_SESSION["vendorId"];
</div>
<div class="thumb-preview ec-preview">
<div class="image-thumb-preview">
<img class="" src="<?php echo $image_url; ?>" alt="edit" />
<img loading="lazy" class="" src="<?php echo $image_url; ?>" alt="edit" />
</div>
</div>
</div>
@ -725,7 +725,7 @@ $vendorId = $_SESSION["vendorId"];
</div>
<div class="thumb-preview ec-preview">
<div class="image-thumb-preview">
<img class="image-thumb-preview ec-image-preview" src="assets/images/product-image/vender-upload-thumb-preview.jpg" alt="edit" />
<img loading="lazy" class="image-thumb-preview ec-image-preview" src="assets/images/product-image/vender-upload-thumb-preview.jpg" alt="edit" />
</div>
</div>
</div>

View File

@ -71,12 +71,12 @@ if($_SESSION["user_type"]!="admin"){
<li class="dropdown user-menu">
<button class="dropdown-toggle nav-link ec-drop" data-bs-toggle="dropdown"
aria-expanded="false">
<img src="assets/img/user/user.png" class="user-image" alt="User Image" />
<img loading="lazy" src="assets/img/user/user.png" class="user-image" alt="User Image" />
</button>
<ul class="dropdown-menu dropdown-menu-right ec-dropdown-menu">
<!-- User image -->
<li class="dropdown-header">
<img src="assets/img/user/user.png" class="img-circle" alt="User Image" />
<img loading="lazy" src="assets/img/user/user.png" class="img-circle" alt="User Image" />
<div class="d-inline-block">
John Deo <small class="pt-1">john.example@gmail.com</small>
</div>
@ -142,7 +142,7 @@ if($_SESSION["user_type"]!="admin"){
<a href="javscript:void(0)"
class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u2.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u2.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -167,7 +167,7 @@ if($_SESSION["user_type"]!="admin"){
<a href="javscript:void(0)"
class="media media-message media-notification media-active">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u1.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u1.jpg"
alt="Image">
<span class="status active"></span>
</div>
@ -192,7 +192,7 @@ if($_SESSION["user_type"]!="admin"){
<a href="javscript:void(0)"
class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u5.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u5.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -359,7 +359,7 @@ if($_SESSION["user_type"]!="admin"){
<a href="javscript:void(0)"
class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u6.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u6.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -384,7 +384,7 @@ if($_SESSION["user_type"]!="admin"){
<a href="javscript:void(0)"
class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u7.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u7.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -409,7 +409,7 @@ if($_SESSION["user_type"]!="admin"){
<a href="javscript:void(0)"
class="media media-message media-notification media-active">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u1.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u1.jpg"
alt="Image">
<span class="status active"></span>
</div>
@ -434,7 +434,7 @@ if($_SESSION["user_type"]!="admin"){
<a href="javscript:void(0)"
class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u2.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u2.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -459,7 +459,7 @@ if($_SESSION["user_type"]!="admin"){
<a href="javscript:void(0)"
class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u5.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u5.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -727,9 +727,9 @@ if($_SESSION["user_type"]!="admin"){
<div class="image-container" style="height: 300px;"> <!-- Adjust the height as needed -->
<?php
if (isset($product['product_image']) && !empty($product['product_image'])) {
echo '<img src="' . $product['product_image'] . '" alt="Product Image" class="img-fluid" style="object-fit: cover; width: 100%; height: 100%;">';
echo '<img loading="lazy" src="' . $product['product_image'] . '" alt="Product Image" class="img-fluid" style="object-fit: cover; width: 100%; height: 100%;">';
} else {
echo '<img src="assets/img/vendor/u1.jpg" class="img-fluid rounded-circle" alt="Placeholder Image" style="object-fit: cover; width: 100%; height: 100%;">';
echo '<img loading="lazy" src="assets/img/vendor/u1.jpg" class="img-fluid rounded-circle" alt="Placeholder Image" style="object-fit: cover; width: 100%; height: 100%;">';
}
?>
</div>

View File

@ -101,7 +101,7 @@ $users = getUsers();
<div class="row">
<?php
$totalUsers = count($users);
$usersPerPage = 20;
$usersPerPage = 15;
$totalPages = ceil($totalUsers / $usersPerPage);
$currentPage = isset($_GET['page']) ? $_GET['page'] : 1;
$start = ($currentPage - 1) * $usersPerPage;
@ -115,7 +115,7 @@ $users = getUsers();
<a href="javascript:0" class="view-detail" id="modalTrigger-<?php echo $user['_id']; ?>"><i class="mdi mdi-eye-plus-outline"></i></a>
<!-- <a href="javascript:0" data-bs-toggle="modal" data-bs-target="#modalContact-<?php echo $user['_id']; ?>" class="view-detail"><i class="mdi mdi-eye-plus-outline"></i></a> -->
<a href="javascript:0" class="media text-secondary">
<img src="https://upload.wikimedia.org/wikipedia/commons/7/7e/Circle-icons-profile.svg" class="mr-3 img-fluid" alt="Avatar Image">
<img loading="lazy" src="https://upload.wikimedia.org/wikipedia/commons/7/7e/Circle-icons-profile.svg" class="mr-3 img-fluid" alt="Avatar Image">
<div class="media-body">
<h5 class="mt-0 mb-2 text-dark"><?php echo $user['username'] ?></h5>
<div class="icon">
@ -266,8 +266,31 @@ $users = getUsers();
<!-- Pagination Links -->
<div class="pagination">
<?php
for ($page = 1; $page <= $totalPages; $page++) {
/* for ($page = 1; $page <= $totalPages; $page++) {
echo '<a href="?page=' . $page . '">' . $page . '</a>';
} */
$maxPages = 5; // Maximum number of pages to display
$ellipsis = true; // Whether to show ellipsis if there are more pages
$startPage = max(1, $currentPage - floor($maxPages / 2));
$endPage = min($totalPages, $startPage + $maxPages - 1);
if ($ellipsis && $startPage > 1) {
echo '<a href="?page=1">1</a>';
if ($startPage > 2) {
echo '<span>...</span>';
}
}
for ($page = $startPage; $page <= $endPage; $page++) {
echo '<a href="?page=' . $page . '">' . $page . '</a>';
}
if ($ellipsis && $endPage < $totalPages) {
if ($endPage < $totalPages - 1) {
echo '<span>...</span>';
}
echo '<a href="?page=' . $totalPages . '">' . $totalPages . '</a>';
}
?>
</div>

View File

@ -77,12 +77,12 @@ if($_SESSION["user_type"]!="admin"){
<!-- User Account -->
<li class="dropdown user-menu">
<button class="dropdown-toggle nav-link ec-drop" data-bs-toggle="dropdown" aria-expanded="false">
<img src="assets/img/user/user.png" class="user-image" alt="User Image" />
<img loading="lazy" src="assets/img/user/user.png" class="user-image" alt="User Image" />
</button>
<ul class="dropdown-menu dropdown-menu-right ec-dropdown-menu">
<!-- User image -->
<li class="dropdown-header">
<img src="assets/img/user/user.png" class="img-circle" alt="User Image" />
<img loading="lazy" src="assets/img/user/user.png" class="img-circle" alt="User Image" />
<div class="d-inline-block">
John Deo <small class="pt-1">john.example@gmail.com</small>
</div>
@ -139,7 +139,7 @@ if($_SESSION["user_type"]!="admin"){
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -161,7 +161,7 @@ if($_SESSION["user_type"]!="admin"){
<li>
<a href="javscript:void(0)" class="media media-message media-notification media-active">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<span class="status active"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -183,7 +183,7 @@ if($_SESSION["user_type"]!="admin"){
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -328,7 +328,7 @@ if($_SESSION["user_type"]!="admin"){
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u6.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u6.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -350,7 +350,7 @@ if($_SESSION["user_type"]!="admin"){
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u7.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u7.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -372,7 +372,7 @@ if($_SESSION["user_type"]!="admin"){
<li>
<a href="javscript:void(0)" class="media media-message media-notification media-active">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<span class="status active"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -394,7 +394,7 @@ if($_SESSION["user_type"]!="admin"){
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -416,7 +416,7 @@ if($_SESSION["user_type"]!="admin"){
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -632,7 +632,7 @@ if($_SESSION["user_type"]!="admin"){
<div class="vendor-info card-body text-center p-4">
<a href="javascript:0" class="text-secondary d-inline-block mb-3">
<div class="image mb-3">
<img src="assets/img/vendor/u1.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
<img loading="lazy" src="assets/img/vendor/u1.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
</div>
<h5 class="card-title text-dark">Emma Smith</h5>
@ -672,7 +672,7 @@ if($_SESSION["user_type"]!="admin"){
<div class="vendor-info card-body text-center p-4">
<a href="javascript:0" class="text-secondary d-inline-block mb-3">
<div class="image mb-3">
<img src="assets/img/vendor/u2.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
<img loading="lazy" src="assets/img/vendor/u2.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
</div>
<h5 class="card-title text-dark">Bobly Smith</h5>
@ -712,7 +712,7 @@ if($_SESSION["user_type"]!="admin"){
<div class="vendor-info card-body text-center p-4">
<a href="javascript:0" class="text-secondary d-inline-block mb-3">
<div class="image mb-3">
<img src="assets/img/vendor/u3.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
<img loading="lazy" src="assets/img/vendor/u3.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
</div>
<h5 class="card-title text-dark">Robin Hood</h5>
@ -754,7 +754,7 @@ if($_SESSION["user_type"]!="admin"){
<div class="vendor-info card-body text-center p-4">
<a href="javascript:0" class="text-secondary d-inline-block mb-3">
<div class="image mb-3">
<img src="assets/img/vendor/u4.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
<img loading="lazy" src="assets/img/vendor/u4.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
</div>
<h5 class="card-title text-dark">devin chingol</h5>
@ -796,7 +796,7 @@ if($_SESSION["user_type"]!="admin"){
<div class="vendor-info card-body text-center p-4">
<a href="javascript:0" class="text-secondary d-inline-block mb-3">
<div class="image mb-3">
<img src="assets/img/vendor/u5.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
<img loading="lazy" src="assets/img/vendor/u5.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
</div>
<h5 class="card-title text-dark">Nitilo Smith</h5>
@ -838,7 +838,7 @@ if($_SESSION["user_type"]!="admin"){
<div class="vendor-info card-body text-center p-4">
<a href="javascript:0" class="text-secondary d-inline-block mb-3">
<div class="image mb-3">
<img src="assets/img/vendor/u6.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
<img loading="lazy" src="assets/img/vendor/u6.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
</div>
<h5 class="card-title text-dark">Mehulo Kathia</h5>
@ -880,7 +880,7 @@ if($_SESSION["user_type"]!="admin"){
<div class="vendor-info card-body text-center p-4">
<a href="javascript:0" class="text-secondary d-inline-block mb-3">
<div class="image mb-3">
<img src="assets/img/vendor/u7.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
<img loading="lazy" src="assets/img/vendor/u7.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
</div>
<h5 class="card-title text-dark">Bridg Stone</h5>
@ -922,7 +922,7 @@ if($_SESSION["user_type"]!="admin"){
<div class="vendor-info card-body text-center p-4">
<a href="javascript:0" class="text-secondary d-inline-block mb-3">
<div class="image mb-3">
<img src="assets/img/vendor/u8.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
<img loading="lazy" src="assets/img/vendor/u8.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
</div>
<h5 class="card-title text-dark">pintu Trainee</h5>
@ -964,7 +964,7 @@ if($_SESSION["user_type"]!="admin"){
<div class="vendor-info card-body text-center p-4">
<a href="javascript:0" class="text-secondary d-inline-block mb-3">
<div class="image mb-3">
<img src="assets/img/vendor/u9.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
<img loading="lazy" src="assets/img/vendor/u9.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
</div>
<h5 class="card-title text-dark">DL Kapdia</h5>
@ -1006,7 +1006,7 @@ if($_SESSION["user_type"]!="admin"){
<div class="vendor-info card-body text-center p-4">
<a href="javascript:0" class="text-secondary d-inline-block mb-3">
<div class="image mb-3">
<img src="assets/img/vendor/u10.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
<img loading="lazy" src="assets/img/vendor/u10.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
</div>
<h5 class="card-title text-dark">Manu Semli</h5>
@ -1048,7 +1048,7 @@ if($_SESSION["user_type"]!="admin"){
<div class="vendor-info card-body text-center p-4">
<a href="javascript:0" class="text-secondary d-inline-block mb-3">
<div class="image mb-3">
<img src="assets/img/vendor/u11.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
<img loading="lazy" src="assets/img/vendor/u11.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
</div>
<h5 class="card-title text-dark">Niki Smith</h5>
@ -1090,7 +1090,7 @@ if($_SESSION["user_type"]!="admin"){
<div class="vendor-info card-body text-center p-4">
<a href="javascript:0" class="text-secondary d-inline-block mb-3">
<div class="image mb-3">
<img src="assets/img/vendor/u12.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
<img loading="lazy" src="assets/img/vendor/u12.jpg" class="img-fluid rounded-circle" alt="Avatar Image">
</div>
<h5 class="card-title text-dark">Jullie Bronzna</h5>
@ -1162,7 +1162,7 @@ if($_SESSION["user_type"]!="admin"){
<div class="profile-content-left px-4">
<div class="text-center widget-profile px-0 border-0">
<div class="card-img mx-auto rounded-circle">
<img src="assets/img/user/u1.jpg" alt="user image">
<img loading="lazy" src="assets/img/user/u1.jpg" alt="user image">
</div>
<div class="card-body">
@ -1229,7 +1229,7 @@ if($_SESSION["user_type"]!="admin"){
</div>
<div class="thumb-preview ec-preview">
<div class="image-thumb-preview">
<img class="image-thumb-preview ec-image-preview v-img" src="/assets/images/banner/7.jpg" alt="edit" />
<img loading="lazy" class="image-thumb-preview ec-image-preview v-img" src="/assets/images/banner/7.jpg" alt="edit" />
</div>
</div>
</div>
@ -1242,7 +1242,7 @@ if($_SESSION["user_type"]!="admin"){
</div>
<div class="thumb-preview ec-preview">
<div class="image-thumb-preview">
<img class="image-thumb-preview ec-image-preview v-img" src="/assets/images/vendor/5.jpg" alt="edit" />
<img loading="lazy" class="image-thumb-preview ec-image-preview v-img" src="/assets/images/vendor/5.jpg" alt="edit" />
</div>
</div>
</div>

View File

@ -163,9 +163,9 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<div class="image mb-3">
<?php
if (isset($vendor['vendor_image']) && !empty($vendor['vendor_image'])) {
echo '<img src="' . $vendor['vendor_image'] . '" class="img-fluid rounded-circle" alt="Avatar Image" style="width: 150px; height: 150px; object-fit: cover; border-radius: 50%;"> ';
echo '<img loading="lazy" src="' . $vendor['vendor_image'] . '" class="img-fluid rounded-circle" alt="Avatar Image" style="width: 150px; height: 150px; object-fit: cover; border-radius: 50%;"> ';
} else {
echo '<img src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" class="img-fluid rounded-circle" alt="Placeholder Image">';
echo '<img loading="lazy" src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" class="img-fluid rounded-circle" alt="Placeholder Image">';
}
?>
</div>
@ -240,9 +240,9 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<div class="vendor-image" style="padding-top:20px; ">
<?php
if (isset($vendor['vendor_image']) && !empty($vendor['vendor_image'])) {
echo '<img src="' . $vendor['vendor_image'] . '" alt="edit" id="imgPrev' . $vendor['_id'] . '" class="img-fluid rounded-circle" alt="Avatar Image" style="align-items:left; width:100px; height:100px; object-fit:cover; border-radius:80%;"> ';
echo '<img loading="lazy" src="' . $vendor['vendor_image'] . '" alt="edit" id="imgPrev' . $vendor['_id'] . '" class="img-fluid rounded-circle" alt="Avatar Image" style="align-items:left; width:100px; height:100px; object-fit:cover; border-radius:80%;"> ';
} else {
echo '<img src="https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg" id="imgPrev" alt="edit" class="img-fluid rounded-circle" alt="Placeholder Image" style="align-items:left; width:80px; height:80px; object-fit:cover; border-radius:50%;">';
echo '<img loading="lazy" src="https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg" id="imgPrev" alt="edit" class="img-fluid rounded-circle" alt="Placeholder Image" style="align-items:left; width:80px; height:80px; object-fit:cover; border-radius:50%;">';
}
?>
</div>
@ -814,11 +814,32 @@ function validateEmail(vendorId) {
// echo "<a href='?page=$i' class='" . ($currentpage == $i ? 'active' : '') . "'>$i</a>";
// }
if ($totalVendors >= $vendorsPerPage) {
/* if ($totalVendors >= $vendorsPerPage) {
for ($i = 1; $i <= $totalPages; $i++) {
echo "<a href='?page=$i' class='" . ($currentpage == $i ? 'active' : '') . "'>$i</a>";
}
}
} */
$start = max(1, $currentpage - 2);
$end = min($totalPages, $start + 4);
if ($start > 1) {
echo "<a href='?page=1'>1</a>";
if ($start > 2) {
echo "<span>&nbsp;...&nbsp;</span>";
}
}
for ($i = $start; $i <= $end; $i++) {
echo "<a href='?page=$i' class='" . ($currentpage == $i ? 'active' : '') . "'>$i</a>&nbsp;";
}
if ($end < $totalPages) {
if ($end < $totalPages - 1) {
echo "<span>&nbsp;...&nbsp;</span>";
}
echo "<a href='?page=$totalPages'>$totalPages</a>";
}
?>
</div>
@ -845,7 +866,7 @@ function validateEmail(vendorId) {
</div>
<div class="thumb-preview ec-preview">
<div class="image-thumb-preview">
<img class="image-thumb-preview ec-image-preview v-img"
<img loading="lazy" class="image-thumb-preview ec-image-preview v-img"
src="assets/images/banner/7.jpg" alt="edit" />
</div>
</div>
@ -860,7 +881,7 @@ function validateEmail(vendorId) {
</div>
<div class="thumb-preview ec-preview">
<div class="image-thumb-preview">
<img class="image-thumb-preview ec-image-preview v-img"
<img loading="lazy" class="image-thumb-preview ec-image-preview v-img"
src="assets/images/vendor/5.jpg" alt="edit" />
</div>
</div>
@ -1011,7 +1032,7 @@ function validateEmail(vendorId) {
<li>
<div class="media media-message">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u1.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u1.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -1036,7 +1057,7 @@ function validateEmail(vendorId) {
<li>
<div class="media media-message ">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u2.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u2.jpg"
alt="Image">
<span class="status active"></span>
</div>
@ -1062,7 +1083,7 @@ function validateEmail(vendorId) {
<li>
<div class="media media-message">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u3.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u3.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -1087,7 +1108,7 @@ function validateEmail(vendorId) {
<li>
<div class="media media-message">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u4.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u4.jpg"
alt="Image">
<span class="status active"></span>
</div>
@ -1114,7 +1135,7 @@ function validateEmail(vendorId) {
<li>
<div class="media media-message">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u5.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u5.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -1141,7 +1162,7 @@ function validateEmail(vendorId) {
<li>
<div class="media media-message">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u6.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u6.jpg"
alt="Image">
<span class="status"></span>
</div>
@ -1168,7 +1189,7 @@ function validateEmail(vendorId) {
<li>
<div class="media media-message">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u7.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u7.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -1195,7 +1216,7 @@ function validateEmail(vendorId) {
<li>
<div class="media media-message">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u8.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u8.jpg"
alt="Image">
<span class="status"></span>
</div>
@ -1222,7 +1243,7 @@ function validateEmail(vendorId) {
<li>
<div class="media media-message">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u1.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u1.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -1248,7 +1269,7 @@ function validateEmail(vendorId) {
<li>
<div class="media media-message">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u2.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u2.jpg"
alt="Image">
<span class="status"></span>
</div>
@ -1274,7 +1295,7 @@ function validateEmail(vendorId) {
<li>
<div class="media media-message">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u3.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u3.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -1300,7 +1321,7 @@ function validateEmail(vendorId) {
<li>
<div class="media media-message">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u4.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u4.jpg"
alt="Image">
<span class="status active"></span>
</div>
@ -1327,7 +1348,7 @@ function validateEmail(vendorId) {
<li>
<div class="media media-message">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u5.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u5.jpg"
alt="Image">
<span class="status"></span>
</div>
@ -1354,7 +1375,7 @@ function validateEmail(vendorId) {
<li>
<div class="media media-message">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u6.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u6.jpg"
alt="Image">
<span class="status away"></span>
</div>
@ -1381,7 +1402,7 @@ function validateEmail(vendorId) {
<li>
<div class="media media-message">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u7.jpg"
<img loading="lazy" class="rounded-circle" src="assets/img/user/u7.jpg"
alt="Image">
<span class="status"></span>
</div>

View File

@ -95,7 +95,7 @@ $vendorId = $_SESSION["vendorId"];
<div class="avatar-upload">
<div class="avatar-edit">
<input type='file' id="imageUpload" class="ec-image-upload" accept=".png, .jpg, .jpeg" multiple onchange="uploadProductImage()" />
<label for="imageUpload"><img src="assets/img/icons/edit.svg" class="svg_img header_svg" alt="edit" /></label>
<label for="imageUpload"><img loading="lazy" src="assets/img/icons/edit.svg" class="svg_img header_svg" alt="edit" /></label>
</div>
<div class="avatar-preview ec-preview">
<div class="imagePreview ec-div-preview">
@ -105,12 +105,12 @@ $vendorId = $_SESSION["vendorId"];
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img class="ec-image-preview" src="<?php echo $first_image_url; ?>" alt="edit" />
<img loading="lazy" class="ec-image-preview" src="<?php echo $first_image_url; ?>" alt="edit" />
<?php
}
} else {
?>
<img class="ec-image-preview" 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" class="ec-image-preview" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/65/No-Image-Placeholder.svg/495px-No-Image-Placeholder.svg.png?20200912122019" alt="edit" />
<?php
}
?>
@ -132,7 +132,7 @@ $vendorId = $_SESSION["vendorId"];
</div>
<div class="thumb-preview ec-preview">
<div class="image-thumb-preview">
<img class="" src="<?php echo $image_url; ?>" alt="edit" />
<img loading="lazy" class="" src="<?php echo $image_url; ?>" alt="edit" />
</div>
</div>
</div>
@ -147,7 +147,7 @@ $vendorId = $_SESSION["vendorId"];
</div>
<div class="thumb-preview ec-preview">
<div class="image-thumb-preview">
<img class="image-thumb-preview ec-image-preview" src="assets/images/product-image/vender-upload-thumb-preview.jpg" alt="edit" />
<img loading="lazy" class="image-thumb-preview ec-image-preview" src="assets/images/product-image/vender-upload-thumb-preview.jpg" alt="edit" />
</div>
</div>
</div>

View File

@ -81,12 +81,12 @@ if ($_SESSION["user_type"] != "admin") {
<!-- User Account -->
<li class="dropdown user-menu">
<button class="dropdown-toggle nav-link ec-drop" data-bs-toggle="dropdown" aria-expanded="false">
<img src="assets/img/user/user.png" class="user-image" alt="User Image" />
<img loading="lazy" src="assets/img/user/user.png" class="user-image" alt="User Image" />
</button>
<ul class="dropdown-menu dropdown-menu-right ec-dropdown-menu">
<!-- User image -->
<li class="dropdown-header">
<img src="assets/img/user/user.png" class="img-circle" alt="User Image" />
<img loading="lazy" src="assets/img/user/user.png" class="img-circle" alt="User Image" />
<div class="d-inline-block">
John Deo <small class="pt-1">john.example@gmail.com</small>
</div>
@ -143,7 +143,7 @@ if ($_SESSION["user_type"] != "admin") {
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -165,7 +165,7 @@ if ($_SESSION["user_type"] != "admin") {
<li>
<a href="javscript:void(0)" class="media media-message media-notification media-active">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<span class="status active"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -187,7 +187,7 @@ if ($_SESSION["user_type"] != "admin") {
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -332,7 +332,7 @@ if ($_SESSION["user_type"] != "admin") {
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u6.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u6.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -354,7 +354,7 @@ if ($_SESSION["user_type"] != "admin") {
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u7.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u7.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -376,7 +376,7 @@ if ($_SESSION["user_type"] != "admin") {
<li>
<a href="javscript:void(0)" class="media media-message media-notification media-active">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<span class="status active"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -398,7 +398,7 @@ if ($_SESSION["user_type"] != "admin") {
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -420,7 +420,7 @@ if ($_SESSION["user_type"] != "admin") {
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -654,7 +654,7 @@ if ($_SESSION["user_type"] != "admin") {
?>
<tr>
<td><img class="vendor-thumb" src="assets/img/vendor/u1.jpg" alt="vendor image" /></td>
<td><img loading="lazy" class="vendor-thumb" src="assets/img/vendor/u1.jpg" alt="vendor image" /></td>
<td><?php echo $vendor['first_name'] ?></td>
<td><?php echo $vendor['user_email']; ?></td>
<td>28</td>
@ -703,7 +703,7 @@ if ($_SESSION["user_type"] != "admin") {
</div>
<div class="thumb-preview ec-preview">
<div class="image-thumb-preview">
<img class="image-thumb-preview ec-image-preview v-img"
<img loading="lazy" class="image-thumb-preview ec-image-preview v-img"
src="assets/images/banner/7.jpg" alt="edit" />
</div>
</div>
@ -718,7 +718,7 @@ if ($_SESSION["user_type"] != "admin") {
</div>
<div class="thumb-preview ec-preview">
<div class="image-thumb-preview">
<img class="image-thumb-preview ec-image-preview v-img"
<img loading="lazy" class="image-thumb-preview ec-image-preview v-img"
src="assets/images/vendor/5.jpg" alt="edit" />
</div>
</div>

View File

@ -46,7 +46,7 @@ $vendorId = $_SESSION["vendorId"];
<div class="ec-brand">
<a href="index.php" title="Ekka">
<img class="ec-brand-icon" src="assets/img/logo/ec-site-logo.png" alt="" />
<img loading="lazy" class="ec-brand-icon" src="assets/img/logo/ec-site-logo.png" alt="" />
<span class="ec-brand-name text-truncate">oBanana</span>
</a>
</div>
@ -319,12 +319,12 @@ $vendorId = $_SESSION["vendorId"];
<!-- User Account -->
<li class="dropdown user-menu">
<button class="dropdown-toggle nav-link ec-drop" data-bs-toggle="dropdown" aria-expanded="false">
<img src="assets/img/user/user.png" class="user-image" alt="User Image" />
<img loading="lazy" src="assets/img/user/user.png" class="user-image" alt="User Image" />
</button>
<ul class="dropdown-menu dropdown-menu-right ec-dropdown-menu">
<!-- User image -->
<li class="dropdown-header">
<img src="assets/img/user/user.png" class="img-circle" alt="User Image" />
<img loading="lazy" src="assets/img/user/user.png" class="img-circle" alt="User Image" />
<div class="d-inline-block">
John Deo <small class="pt-1">john.example@gmail.com</small>
</div>
@ -381,7 +381,7 @@ $vendorId = $_SESSION["vendorId"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -403,7 +403,7 @@ $vendorId = $_SESSION["vendorId"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification media-active">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<span class="status active"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -425,7 +425,7 @@ $vendorId = $_SESSION["vendorId"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -570,7 +570,7 @@ $vendorId = $_SESSION["vendorId"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u6.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u6.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -592,7 +592,7 @@ $vendorId = $_SESSION["vendorId"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u7.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u7.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -614,7 +614,7 @@ $vendorId = $_SESSION["vendorId"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification media-active">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<span class="status active"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -636,7 +636,7 @@ $vendorId = $_SESSION["vendorId"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -658,7 +658,7 @@ $vendorId = $_SESSION["vendorId"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -902,9 +902,9 @@ $vendorId = $_SESSION["vendorId"];
<div class="image-container" style="height: 300px;"> <!-- Adjust the height as needed -->
<?php
if (isset($product['product_image']) && !empty($product['product_image'])) {
echo '<img src="' . $product['product_image'] . '" alt="Product Image" class="img-fluid" style="object-fit: cover; width: 100%; height: 100%;">';
echo '<img loading="lazy" src="' . $product['product_image'] . '" alt="Product Image" class="img-fluid" style="object-fit: cover; width: 100%; height: 100%;">';
} else {
echo '<img src="assets/img/vendor/u1.jpg" class="img-fluid rounded-circle" alt="Placeholder Image" style="object-fit: cover; width: 100%; height: 100%;">';
echo '<img loading="lazy" src="assets/img/vendor/u1.jpg" class="img-fluid rounded-circle" alt="Placeholder Image" style="object-fit: cover; width: 100%; height: 100%;">';
}
?>
</div>

View File

@ -155,12 +155,12 @@ if($_SESSION["user_type"]!="admin"){
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img class="img-fluid" src="<?php echo $first_image_url; ?>" alt="edit" style="object-fit: cover; width: 100%; height: 100%;"/>
<img loading="lazy" class="img-fluid" src="<?php echo $first_image_url; ?>" alt="edit" style="object-fit: cover; width: 100%; height: 100%;"/>
<?php
}
} else {
?>
<img class="img-fluid rounded-circle" src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="edit" />
<img loading="lazy" class="img-fluid rounded-circle" src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="edit" />
<?php
}
?>
@ -210,8 +210,8 @@ if($_SESSION["user_type"]!="admin"){
filteredProducts.forEach(prod => {
const productImage = prod.images.split(',') ?? [];
const image = productImage[0] ?
`<img class="img-fluid" src="${productImage[0]}" alt="product image" style="object-fit: cover; width: 100%; height: 100%;" />` :
`<img class="img-fluid rounded-circle" src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="placeholder image" style="object-fit: cover; width: 100%; height: 100%;" />`;
`<img loading="lazy" class="img-fluid" src="${productImage[0]}" alt="product image" style="object-fit: cover; width: 100%; height: 100%;" />` :
`<img loading="lazy" class="img-fluid rounded-circle" src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="placeholder image" style="object-fit: cover; width: 100%; height: 100%;" />`;
const card = document.createElement('div');
card.classList.add('col-lg-3', 'col-md-4', 'col-sm-6');
@ -264,10 +264,10 @@ if($_SESSION["user_type"]!="admin"){
const productImage = prod.images.split(',') ??[]
// console.log(productImage)
const image = productImage[0] ?`
<img class="img-fluid" src="${productImage[0]}" alt="edit" style="object-fit: cover; width: 100%; height: 100%;"/>
<img loading="lazy" class="img-fluid" src="${productImage[0]}" alt="edit" style="object-fit: cover; width: 100%; height: 100%;"/>
`:`
<img class="img-fluid rounded-circle" src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="edit" style="object-fit: cover; width: 100%; height: 100%;"/>
<img loading="lazy" class="img-fluid rounded-circle" src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="edit" style="object-fit: cover; width: 100%; height: 100%;"/>
`
const card = document.createElement('div')

View File

@ -116,12 +116,12 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<!-- User Account -->
<li class="dropdown user-menu">
<button class="dropdown-toggle nav-link ec-drop" data-bs-toggle="dropdown" aria-expanded="false">
<img src="assets/img/user/user.png" class="user-image" alt="User Image" />
<img loading="lazy" src="assets/img/user/user.png" class="user-image" alt="User Image" />
</button>
<ul class="dropdown-menu dropdown-menu-right ec-dropdown-menu">
<!-- User image -->
<li class="dropdown-header">
<img src="assets/img/user/user.png" class="img-circle" alt="User Image" />
<img loading="lazy" src="assets/img/user/user.png" class="img-circle" alt="User Image" />
<div class="d-inline-block">
John Deo <small class="pt-1">john.example@gmail.com</small>
</div>
@ -178,7 +178,7 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -200,7 +200,7 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification media-active">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<span class="status active"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -222,7 +222,7 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -367,7 +367,7 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u6.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u6.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -389,7 +389,7 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u7.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u7.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -411,7 +411,7 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification media-active">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u1.jpg" alt="Image">
<span class="status active"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -433,7 +433,7 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u2.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -455,7 +455,7 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<li>
<a href="javscript:void(0)" class="media media-message media-notification">
<div class="position-relative mr-3">
<img class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<img loading="lazy" class="rounded-circle" src="assets/img/user/u5.jpg" alt="Image">
<span class="status away"></span>
</div>
<div class="media-body d-flex justify-content-between">
@ -666,9 +666,9 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<div class="ec-catalog-vendor" style="display: inline-block;">
<a href="vendor-profile.php?id=<?php echo $vendor["_id"] ?>">
<?php if (isset($vendor['vendor_image'])) : ?>
<img src="<?php echo $vendor['vendor_image']; ?>" alt="<?php echo $vendor['user_login']; ?>" class="vendor-image" style="max-width: 100px; max-height: 100px;">
<img loading="lazy" src="<?php echo $vendor['vendor_image']; ?>" alt="<?php echo $vendor['user_login']; ?>" class="vendor-image" style="max-width: 100px; max-height: 100px;">
<?php else : ?>
<img src="https://api.obanana.com/images/storage/web_images/1708588564876-viber_image_2024-02-22_15-54-42-498.png" class="vendor-image-placeholder" style="max-width: 100px; max-height: 100px;">
<img loading="lazy" src="https://api.obanana.com/images/storage/web_images/1708588564876-viber_image_2024-02-22_15-54-42-498.png" class="vendor-image-placeholder" style="max-width: 100px; max-height: 100px;">
<?php endif; ?>
</a>
</div>
@ -742,12 +742,12 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img class="img-fluid" src="<?php echo $first_image_url; ?>" alt="edit" style="object-fit: cover; width: 100%; height: 100%;"/>
<img loading="lazy" class="img-fluid" src="<?php echo $first_image_url; ?>" alt="edit" style="object-fit: cover; width: 100%; height: 100%;"/>
<?php
}
} else {
?>
<img class="img-fluid rounded-circle" src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="edit" />
<img loading="lazy" class="img-fluid rounded-circle" src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="edit" />
<?php
}
?>

View File

@ -65,25 +65,25 @@ foreach ($vendorPayouts as $payout) {
}
}
if (isset($_SESSION["token"])) {
$token = $_SESSION["token"];
$token_parts = explode(".", $token);
$token_payload = base64_decode($token_parts[1]);
$token_data = json_decode($token_payload);
// if (isset($_SESSION["token"])) {
// $token = $_SESSION["token"];
// $token_parts = explode(".", $token);
// $token_payload = base64_decode($token_parts[1]);
// $token_data = json_decode($token_payload);
$issued_at_time = $token_data->iat;
$expiration_time = $token_data->exp;
$renewal_time = $issued_at_time + 3300;
// $issued_at_time = $token_data->iat;
// $expiration_time = $token_data->exp;
// $renewal_time = $issued_at_time + 200;
if (time() >= $renewal_time || time() >= $expiration_time) {
header("Location: token-renew.php");
exit;
}
}
// // if (time() >= $renewal_time || time() >= $expiration_time) {
// // header("Location: token-renew.php");
// // exit;
// // }
// }
// $token = loginRenew($_SESSION["email"], $_SESSION["password"], $token);
// $_SESSION["token"] = $token;
date_default_timezone_set('Asia/Manila');
?>
<!DOCTYPE html>
@ -114,7 +114,7 @@ if (isset($_SESSION["token"])) {
<!-- FAVICON -->
<link href="assets/img/favicon.png" rel="shortcut icon" />
<script>
<!-- <script>
function renewToken() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "token-renew.php", true);
@ -122,15 +122,64 @@ if (isset($_SESSION["token"])) {
}
setInterval(function() {
var currentTime = <?php echo time(); ?>;
var renewalTime = <?php echo $renewal_time; ?>;
var expirationTime = <?php echo $expiration_time; ?>;
var currentTime = <?php // echo time(); ?>;
var renewalTime = <?php // echo $renewal_time; ?>;
var expirationTime = <?php // echo $expiration_time; ?>;
if (currentTime >= renewalTime || currentTime >= expirationTime) {
renewToken();
}
}, 60000);
</script> -->
<script>
var token_parts = "<?php echo $_SESSION["token"]; ?>".split(".");
console.log("Token Payload: " + token_parts[1]);
var token_payload = atob(token_parts[1]);
var token_data = JSON.parse(token_payload);
var issued_at_time = token_data.iat;
var expiration_time = token_data.exp;
var renewal_time = issued_at_time + 200;
console.log("Issued At Time: " + new Date(issued_at_time * 1000).toLocaleString());
console.log("Expiration Time: " + new Date(expiration_time * 1000).toLocaleString());
console.log("Renewal Time: " + new Date(renewal_time * 1000).toLocaleString());
function renewToken() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "token-renew.php", true);
xhr.onreadystatechange = function () {
if (xhr.readyState === XMLHttpRequest.DONE && xhr.status === 200) {
var newToken = xhr.responseText;
token_parts = newToken.split(".");
token_payload = atob(token_parts[1]);
token_data = JSON.parse(token_payload);
issued_at_time = token_data.iat
renewal_time = issued_at_time + 200
expiration_time = token_data.exp;
console.log("New Token: " + token_parts)
console.log("Token renewed at: " + new Date().toLocaleString());
console.log("New expiration time: " + new Date(expiration_time * 1000).toLocaleString());
}
};
xhr.send();
}
setInterval(function() {
var currentTime = Date.now() / 1000;
var renewalTime = renewal_time;
var expirationTime = expiration_time;
console.log("Current Time: " + new Date(currentTime * 1000).toLocaleString());
console.log("Renewal Time: " + new Date(renewalTime * 1000).toLocaleString());
console.log("Expiration Time: " + new Date(expirationTime * 1000).toLocaleString());
if (currentTime >= renewalTime || currentTime >= expirationTime) {
console.log("Renewing token...");
renewToken();
}
}, 60000);
</script>
</head>
<body class="ec-header-fixed ec-sidebar-fixed ec-sidebar-dark ec-header-light" id="body">
@ -168,7 +217,7 @@ if (isset($_SESSION["token"])) {
<div class="ec-disp">
<div class="text-center widget-profile px-0 border-0">
<div class="card-img mx-auto rounded-circle">
<img src="<?php
<img loading="lazy" src="<?php
if($array["vendor_image"]!=""){
echo $array["vendor_image"];
} else {
@ -214,6 +263,7 @@ if (isset($_SESSION["token"])) {
?>
<?php echo $_SESSION["token"] ?><br>
<?php $real_time = date('Y-m-d H:i:s', $expiration_time); echo $real_time?>
<?php // echo $_SESSION["email"] ?> <br>
<?php // echo "Updated token: " . $token; ?>
<?php // echo $_SESSION["password"] ?>
@ -288,7 +338,7 @@ if (isset($_SESSION["token"])) {
</div>
<div class="card-body pt-0 pb-0 table-responsive">
<table class="table">
<table id='paymentsTable'class="table">
<thead>
<tr>
<th><input type="checkbox"></th>
@ -312,12 +362,13 @@ if (isset($_SESSION["token"])) {
if ($orderItems['payment']['status'] === 'PAID') {
foreach ($orderItems['items'] as $item) {
$displayDate = date('m-d-Y, g:i A', strtotime($orderItems['updatedAt']));
$isPayoutCompleted = !empty($orderItems['payout_status']);
?>
<tr>
<td><input type="checkbox" <?php echo $isPayoutCompleted ? 'disabled' : ''; ?>></td>
<td><?php echo $orderItems['payment_method']; ?></td>
<td><?php echo $item['price']; ?></td>
<td><?php echo $orderItems['total_amount']; ?></td>
<td>
<span class="badge badge-success"><?php echo $orderItems['payment']['status']; ?></span>
</td>
@ -327,7 +378,7 @@ if (isset($_SESSION["token"])) {
<td>
<a class="text-dark" href=""><?php echo $item['product']['name']; ?></a>
</td>
<td><?php echo $orderItems['updatedAt']; ?></td>
<td><?php echo $displayDate; ?></td>
<td hidden><?php echo $orderItems['_id']; ?></td>
<td class="text-right">
<div class="dropdown show d-inline-block widget-dropdown">

View File

@ -16555,6 +16555,7 @@ h6 {
left: 0;
bottom: 0;
background: #ffffff;
opacity:0.6;
z-index: 999;
}
@ -16577,7 +16578,7 @@ h6 {
}
#ec-overlay .ec-ellipsis div:nth-child(1) {
background: #3474d4;
background: #ffaa00;
left: 8px;
-webkit-animation: lds-ellipsis1 0.6s infinite;
animation: lds-ellipsis1 0.6s infinite;
@ -16591,12 +16592,11 @@ h6 {
}
#ec-overlay .ec-ellipsis div:nth-child(3) {
background: #3474d4;
background: #ffaa00;
left: 32px;
-webkit-animation: lds-ellipsis2 0.6s infinite;
animation: lds-ellipsis2 0.6s infinite;
}
#ec-overlay .ec-ellipsis div:nth-child(4) {
background: #555;
left: 56px;

File diff suppressed because it is too large Load Diff

View File

@ -96,7 +96,7 @@ if ($_SESSION["userId"] <> "") {
</div>
<ul class="eccart-pro-items">
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img src="assets/images/product-image/6_1.jpg" alt="product"></a>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy" src="assets/images/product-image/6_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">T-shirt For Women</a>
<span class="cart-price"><span>$76.00</span> x 1</span>
@ -107,7 +107,7 @@ if ($_SESSION["userId"] <> "") {
</div>
</li>
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img src="assets/images/product-image/12_1.jpg" alt="product"></a>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy" src="assets/images/product-image/12_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">Women Leather Shoes</a>
<span class="cart-price"><span>$64.00</span> x 1</span>
@ -118,7 +118,7 @@ if ($_SESSION["userId"] <> "") {
</div>
</li>
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img src="assets/images/product-image/3_1.jpg" alt="product"></a>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy" src="assets/images/product-image/3_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">Girls Nylon Purse</a>
<span class="cart-price"><span>$59.00</span> x 1</span>
@ -229,19 +229,35 @@ if ($_SESSION["userId"] <> "") {
?>
<tr id="cart_order_<?php echo $order['_id'] ?>">
<td data-label="Product" class="ec-cart-pro-name"><a href="product-left-sidebar.php?id=<?php echo $order['items'][0]['product']['product_id']; ?>"><img class="ec-cart-pro-img mr-4" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="" /><?php echo $order['items'][0]['product']['name']; ?></a></td>
<td data-label="Product" class="ec-cart-pro-name"><a href="product-left-sidebar.php?id=<?php echo $order['items'][0]['product']['product_id']; ?>">
<img loading="lazy" class="ec-cart-pro-img mr-4" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="" />
<?php echo $order['items'][0]['product']['name']; ?></a>
</td>
<td data-label="Price" class="ec-cart-pro-price"><span class="amount"><?php echo $order['items'][0]['price']; ?></span></td>
<td data-label="Quantity" class="ec-cart-pro-qty" style="text-align: center;">
<div class="cart-qty-plus-minus2" style="width:100px; margin:auto;">
<div class="qty-btn" onclick="qtyDecrementCart('<?php echo $order['_id']; ?>' , '<?php echo $order['items'][0]['_id']; ?>',false, '<?php echo $order['items'][0]['product']['product_id']; ?>')">-</div>
<input id="cart_qty-input-<?php echo $order['items'][0]['_id']; ?>" class="qty-input" type="number" name="ec_qtybtn" value="<?php echo $order['items'][0]['quantity']; ?>" oninput="handleQtyInputCart(this, '<?php echo $order['_id']; ?>', '<?php echo $order['items'][0]['_id']; ?>','<?php echo $order['items'][0]['product']['product_id']; ?>')" />
<div class="qty-btn" onclick="qtyIncrementCart('<?php echo $order['_id']; ?>' , '<?php echo $order['items'][0]['_id']; ?>',false, '<?php echo $order['items'][0]['product']['product_id']; ?>')">+</div>
<!-- CART UI -->
<div class="cart-qty-plus-minus2 d-flex justify-content-center mt-1">
<div class="qty-btn" style="color:#ffaa00; font-size:35px; margin-right:5px; cursor: pointer;" onclick="qtyDecrementCart('<?php echo $order['_id']; ?>' ,
'<?php echo $order['items'][0]['_id']; ?>',false, '<?php echo $order['items'][0]['product']['product_id']; ?>')"
onmouseover="this.style.color='#a15d00'" onmouseout="this.style.color='#ffaa00'">-
</div>
<input style="width:100px; height:40px mt-3" id="cart_qty-input-<?php echo $order['items'][0]['_id']; ?>" class="qty-input" type="number" name="ec_qtybtn"
value="<?php echo $order['items'][0]['quantity']; ?>" oninput="handleQtyInputCart(this, '<?php echo $order['_id']; ?>',
'<?php echo $order['items'][0]['_id']; ?>','<?php echo $order['items'][0]['product']['product_id']; ?>')" />
<div class="qty-btn" style="color:#ffaa00; font-size:30px; margin-left:5px; cursor: pointer;" onclick="qtyIncrementCart('<?php echo $order['_id']; ?>' ,
'<?php echo $order['items'][0]['_id']; ?>',false, '<?php echo $order['items'][0]['product']['product_id']; ?>')"
onmouseover="this.style.color='#a15d00'" onmouseout="this.style.color='#ffaa00'">+</div>
</div>
<span id="cart_qty_<?php echo $order['_id'] ?>"></span>
</td>
<td data-label="Total" class="cart_subtotal-<?php echo $order['_id']; ?>" style="font-weight:bold"> <?php echo $order['total_amount'] ?></td>
<td data-label="Remove" class="ec-cart-pro-remove">
<a onclick="deleteOrderCart('<?php echo $order['_id']; ?>')"><i class="ecicon eci-trash-o"></i></a>
<!-- <a onclick="deleteOrderCart('<?php # echo $order['_id']; ?>')"><i class="ecicon eci-trash-o"></i></a> -->
<a href="#" class="removeCart" onclick="deleteOrderCart('<?php echo $order['_id']; ?>')">
<i class="ecicon eci-trash" style="color:#7e7e7e;" onmouseover="this.style.color='#aaaaaa'"
onmouseout="this.style.color='#7e7e7e'">
</i>
</a>
</td>
</tr>
<?php
@ -589,7 +605,7 @@ if ($_SESSION["userId"] <> "") {
</script>
<!-- <tr>
<td data-label="Product" class="ec-cart-pro-name"><a
href="shop-left-sidebar-col-4.php"><img
href="shop-left-sidebar-col-4.php"><img loading="lazy"
class="ec-cart-pro-img mr-4"
src="assets/images/product-image/2.jpg" alt="" />Unisex
Fully Solid Hoodie</a></td>
@ -609,7 +625,7 @@ if ($_SESSION["userId"] <> "") {
</tr>
<tr>
<td data-label="Product" class="ec-cart-pro-name"><a
href="shop-left-sidebar-col-4.php"><img
href="shop-left-sidebar-col-4.php"><img loading="lazy"
class="ec-cart-pro-img mr-4"
src="assets/images/product-image/3.jpg"
alt="" />Beautiful T-shirt For Women</a></td>
@ -629,7 +645,7 @@ if ($_SESSION["userId"] <> "") {
</tr>
<tr>
<td data-label="Product" class="ec-cart-pro-name"><a
href="shop-left-sidebar-col-4.php"><img
href="shop-left-sidebar-col-4.php"><img loading="lazy"
class="ec-cart-pro-img mr-4"
src="assets/images/product-image/4.jpg" alt="" />Wool
Hat For Men</a></td>
@ -772,8 +788,8 @@ if ($_SESSION["userId"] <> "") {
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image" src="assets/images/product-image/6_1.jpg" alt="Product" />
<img class="hover-image" src="assets/images/product-image/6_2.jpg" alt="Product" />
<img loading="lazy" class="main-image" src="assets/images/product-image/6_1.jpg" alt="Product" />
<img loading="lazy" class="hover-image" src="assets/images/product-image/6_2.jpg" alt="Product" />
</a>
<span class="percentage">20%</span>
<a href="#" class="quickview" data-link-action="quickview" title="Quick view"
@ -840,8 +856,8 @@ if ($_SESSION["userId"] <> "") {
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image" src="assets/images/product-image/7_1.jpg" alt="Product" />
<img class="hover-image" src="assets/images/product-image/7_2.jpg" alt="Product" />
<img loading="lazy" class="main-image" src="assets/images/product-image/7_1.jpg" alt="Product" />
<img loading="lazy" class="hover-image" src="assets/images/product-image/7_2.jpg" alt="Product" />
</a>
<span class="percentage">20%</span>
<span class="flags">
@ -911,8 +927,8 @@ if ($_SESSION["userId"] <> "") {
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image" src="assets/images/product-image/1_1.jpg" alt="Product" />
<img class="hover-image" src="assets/images/product-image/1_2.jpg" alt="Product" />
<img loading="lazy" class="main-image" src="assets/images/product-image/1_1.jpg" alt="Product" />
<img loading="lazy" class="hover-image" src="assets/images/product-image/1_2.jpg" alt="Product" />
</a>
<span class="percentage">20%</span>
<span class="flags">
@ -990,8 +1006,8 @@ if ($_SESSION["userId"] <> "") {
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image" src="assets/images/product-image/2_1.jpg" alt="Product" />
<img class="hover-image" src="assets/images/product-image/2_2.jpg" alt="Product" />
<img loading="lazy" class="main-image" src="assets/images/product-image/2_1.jpg" alt="Product" />
<img loading="lazy" class="hover-image" src="assets/images/product-image/2_2.jpg" alt="Product" />
</a>
<span class="percentage">20%</span>
<span class="flags">
@ -1061,36 +1077,36 @@ if ($_SESSION["userId"] <> "") {
<!-- Swiper -->
<div class="qty-product-cover">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
<div class="qty-nav-thumb">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
</div>
@ -1185,7 +1201,7 @@ if ($_SESSION["userId"] <> "") {
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -1223,7 +1239,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1245,7 +1261,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1267,7 +1283,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1289,7 +1305,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1313,7 +1329,7 @@ if ($_SESSION["userId"] <> "") {
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -1328,7 +1344,7 @@ if ($_SESSION["userId"] <> "") {
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -149,7 +149,7 @@
<!-- Ec Header Logo Start -->
<div class="align-self-center">
<div class="header-logo">
<a href="index.php"><img src="assets/images/logo/logo.png" alt="Site Logo" /><img
<a href="index.php"><img loading="lazy" src="assets/images/logo/logo.png" alt="Site Logo" /><img loading="lazy"
class="dark-logo" src="assets/images/logo/dark-logo.png" alt="Site Logo"
style="display: none;" /></a>
</div>
@ -210,7 +210,7 @@
<!-- Ec Header Logo Start -->
<div class="col">
<div class="header-logo">
<a href="index.php"><img src="assets/images/logo/logo.png" alt="Site Logo" /><img
<a href="index.php"><img loading="lazy" src="assets/images/logo/logo.png" alt="Site Logo" /><img loading="lazy"
class="dark-logo" src="assets/images/logo/dark-logo.png" alt="Site Logo"
style="display: none;" /></a>
</div>
@ -292,16 +292,16 @@
</li>
<li>
<ul class="ec-main-banner w-100">
<li><a class="p-0" href="shop-left-sidebar-col-4.php"><img
<li><a class="p-0" href="shop-left-sidebar-col-4.php"><img loading="lazy"
class="img-responsive" src="assets/images/menu-banner/1.jpg"
alt=""></a></li>
<li><a class="p-0" href="shop-left-sidebar-col-4.html"><img
<li><a class="p-0" href="shop-left-sidebar-col-4.html"><img loading="lazy"
class="img-responsive" src="assets/images/menu-banner/2.jpg"
alt=""></a></li>
<li><a class="p-0" href="shop-right-sidebar-col-3.html"><img
<li><a class="p-0" href="shop-right-sidebar-col-3.html"><img loading="lazy"
class="img-responsive" src="assets/images/menu-banner/3.jpg"
alt=""></a></li>
<li><a class="p-0" href="shop-right-sidebar-col-4.html"><img
<li><a class="p-0" href="shop-right-sidebar-col-4.html"><img loading="lazy"
class="img-responsive" src="assets/images/menu-banner/4.jpg"
alt=""></a></li>
</ul>
@ -537,7 +537,7 @@
<li><a href="shop-list-full-col-2.html">Full width 2 columns</a></li>
</ul>
</li>
<li><a class="p-0" href="shop-left-sidebar-col-4.php"><img class="img-responsive"
<li><a class="p-0" href="shop-left-sidebar-col-4.php"><img loading="lazy" class="img-responsive"
src="assets/images/menu-banner/1.jpg" alt=""></a>
</li>
</ul>
@ -735,7 +735,7 @@
</div>
<ul class="eccart-pro-items">
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/6_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">T-shirt For Women</a>
@ -747,7 +747,7 @@
</div>
</li>
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/12_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">Women Leather Shoes</a>
@ -759,7 +759,7 @@
</div>
</li>
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/3_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">Girls Nylon Purse</a>
@ -848,7 +848,7 @@
<tbody>
<tr>
<td data-label="Product" class="ec-cart-pro-name"><a
href="shop-left-sidebar-col-4.php"><img
href="shop-left-sidebar-col-4.php"><img loading="lazy"
class="ec-cart-pro-img mr-4"
src="assets/images/product-image/1.jpg" alt="" />Stylish
Baby Shoes</a></td>
@ -868,7 +868,7 @@
</tr>
<tr>
<td data-label="Product" class="ec-cart-pro-name"><a
href="shop-left-sidebar-col-4.php"><img
href="shop-left-sidebar-col-4.php"><img loading="lazy"
class="ec-cart-pro-img mr-4"
src="assets/images/product-image/2.jpg" alt="" />Unisex
Fully Solid Hoodie</a></td>
@ -888,7 +888,7 @@
</tr>
<tr>
<td data-label="Product" class="ec-cart-pro-name"><a
href="shop-left-sidebar-col-4.php"><img
href="shop-left-sidebar-col-4.php"><img loading="lazy"
class="ec-cart-pro-img mr-4"
src="assets/images/product-image/3.jpg"
alt="" />Beautiful T-shirt For Women</a></td>
@ -908,7 +908,7 @@
</tr>
<tr>
<td data-label="Product" class="ec-cart-pro-name"><a
href="shop-left-sidebar-col-4.php"><img
href="shop-left-sidebar-col-4.php"><img loading="lazy"
class="ec-cart-pro-img mr-4"
src="assets/images/product-image/4.jpg" alt="" />Wool
Hat For Men</a></td>
@ -1052,8 +1052,8 @@
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image" src="assets/images/product-image/6_1.jpg" alt="Product" />
<img class="hover-image" src="assets/images/product-image/6_2.jpg" alt="Product" />
<img loading="lazy" class="main-image" src="assets/images/product-image/6_1.jpg" alt="Product" />
<img loading="lazy" class="hover-image" src="assets/images/product-image/6_2.jpg" alt="Product" />
</a>
<span class="percentage">20%</span>
<a href="#" class="quickview" data-link-action="quickview" title="Quick view"
@ -1120,8 +1120,8 @@
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image" src="assets/images/product-image/7_1.jpg" alt="Product" />
<img class="hover-image" src="assets/images/product-image/7_2.jpg" alt="Product" />
<img loading="lazy" class="main-image" src="assets/images/product-image/7_1.jpg" alt="Product" />
<img loading="lazy" class="hover-image" src="assets/images/product-image/7_2.jpg" alt="Product" />
</a>
<span class="percentage">20%</span>
<span class="flags">
@ -1191,8 +1191,8 @@
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image" src="assets/images/product-image/1_1.jpg" alt="Product" />
<img class="hover-image" src="assets/images/product-image/1_2.jpg" alt="Product" />
<img loading="lazy" class="main-image" src="assets/images/product-image/1_1.jpg" alt="Product" />
<img loading="lazy" class="hover-image" src="assets/images/product-image/1_2.jpg" alt="Product" />
</a>
<span class="percentage">20%</span>
<span class="flags">
@ -1270,8 +1270,8 @@
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image" src="assets/images/product-image/2_1.jpg" alt="Product" />
<img class="hover-image" src="assets/images/product-image/2_2.jpg" alt="Product" />
<img loading="lazy" class="main-image" src="assets/images/product-image/2_1.jpg" alt="Product" />
<img loading="lazy" class="hover-image" src="assets/images/product-image/2_2.jpg" alt="Product" />
</a>
<span class="percentage">20%</span>
<span class="flags">
@ -1344,8 +1344,8 @@
<div class="row">
<div class="col-sm-12 col-lg-3 ec-footer-contact">
<div class="ec-footer-widget">
<div class="ec-footer-logo"><a href="#"><img src="assets/images/logo/footer-logo.png"
alt=""><img class="dark-footer-logo" src="assets/images/logo/dark-logo.png"
<div class="ec-footer-logo"><a href="#"><img loading="lazy" src="assets/images/logo/footer-logo.png"
alt=""><img loading="lazy" class="dark-footer-logo" src="assets/images/logo/dark-logo.png"
alt="Site Logo" style="display: none;" /></a></div>
<h4 class="ec-footer-heading">Contact us</h4>
<div class="ec-footer-links">
@ -1457,7 +1457,7 @@
<div class="col footer-bottom-right">
<div class="footer-bottom-payment d-flex justify-content-end">
<div class="payment-link">
<img src="assets/images/icons/payment.png" alt="">
<img loading="lazy" src="assets/images/icons/payment.png" alt="">
</div>
</div>
@ -1481,36 +1481,36 @@
<!-- Swiper -->
<div class="qty-product-cover">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
<div class="qty-nav-thumb">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
</div>
@ -1610,7 +1610,7 @@
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -1649,7 +1649,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon"></span>
</div>
@ -1673,7 +1673,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
@ -1697,7 +1697,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
@ -1721,7 +1721,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
@ -1746,7 +1746,7 @@
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -1761,7 +1761,7 @@
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -13,6 +13,7 @@ if ($_SESSION["userId"] <> "") {
}
$products = productListVendor($_GET["id"]);
$productsDecode = json_encode($products, true);
$filteredProducts = [];
if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['category'])) {
@ -192,7 +193,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
</div>
<ul class="eccart-pro-items">
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img src="assets/images/product-image/6_1.jpg" alt="product"></a>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy" src="assets/images/product-image/6_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">T-shirt For Women</a>
<span class="cart-price"><span>$76.00</span> x 1</span>
@ -203,7 +204,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
</div>
</li>
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img src="assets/images/product-image/12_1.jpg" alt="product"></a>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy" src="assets/images/product-image/12_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">Women Leather Shoes</a>
<span class="cart-price"><span>$64.00</span> x 1</span>
@ -214,7 +215,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
</div>
</li>
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img src="assets/images/product-image/3_1.jpg" alt="product"></a>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy" src="assets/images/product-image/3_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">Girls Nylon Purse</a>
<span class="cart-price"><span>$59.00</span> x 1</span>
@ -304,9 +305,9 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<a href="vendor-profile.html">
<?php
if (isset($vendor["vendor_image"])) {
?><img src="<?php echo $vendor["vendor_image"] ?>" alt="vendor img"><?php
?><img loading="lazy" src="<?php echo $vendor["vendor_image"] ?>" alt="vendor img"><?php
} else {
?><img src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="vendor img"><?php
?><img loading="lazy" src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="vendor img"><?php
}
?>
</a>
@ -372,7 +373,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
</div>
</div>
<div class="col-md-6 ec-sort-select">
<span class="sort-by">Sort by</span>
<!-- <span class="sort-by">Sort by</span>
<div class="ec-select-inner">
<select name="ec-select" id="ec-select">
<option selected disabled>Position</option>
@ -382,7 +383,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<option value="4">Price, low to high</option>
<option value="5">Price, high to low</option>
</select>
</div>
</div> -->
</div>
</div>
<!-- Shop Top End -->
@ -390,11 +391,11 @@ 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">
<div class="row" id="product-container">
<?php
//var_dump($products);
foreach ($filteredProducts as $product){
$vendorOfProduct = getVendorbyId($product['vendor_api_id']);
// $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">
@ -409,12 +410,12 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 330px; object-fit: cover;"/>
<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 class="main-image" src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="edit" />
<img loading="lazy" class="main-image" src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="edit" />
<?php
}
?>
@ -537,7 +538,233 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
</div>
<!--Shop content End -->
</div>
<script>
// JavaScript
document.addEventListener("DOMContentLoaded", function() {
function loadProducts(page,isFilter) {
let xhrVendors1 = new XMLHttpRequest();
// Define the endpoint URL for fetching vendors
let vendorsEndpointURL = `https://<?php echo htmlspecialchars($_SESSION["data_endpoint"]); ?>/api/v1/products/vendor/<?php echo $_GET['id'] ?>`;
// let xhr = new XMLHttpRequest();/
// Open a GET request to fetch vendors
xhrVendors1.open("GET", vendorsEndpointURL, true);
// Set up a callback function to handle the vendors response
xhrVendors1.onreadystatechange = function() {
if (xhrVendors1.readyState === 4 && xhrVendors1.status === 200) {
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);
} 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)
// 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);
// 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");
productContainer.innerHTML = "";
let productsFinal = JSON.parse(xhrVendors1.responseText);
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 card = document.createElement("div");
let token ="<?php echo $_SESSION['token'] ?>";
let email ="<?php echo $_SESSION['email'] ?>";
let password ="<?php echo $_SESSION['password'] ?>";
let customer_data ='<?php echo json_encode($customer_data) ?>';
// Load product images dynamically
let imageContainer = document.createElement("div");
if (product.images && product.images.length > 0) {
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("class", "main-image");
img.setAttribute("src", firstImageUrl);
img.setAttribute("alt", "Product");
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("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");
imageContainer.appendChild(img);
}
// Create product card
let card = document.createElement("div");
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">
<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>
</div>
</div>
</div>
<div class="ec-pro-content">
<h5 class="ec-pro-title"><a href="product-left-sidebar.php?id=${product._id}" style="width: 90%; text-wrap: wrap;">${product.product_name}</a></h5>
<div class="ec-pro-list-desc">${product.product_description ??""}</div>
<span class="ec-price">
${(product.sale_price && product.sale_price > 0) ?
`<span class="old-price">&#8369;${product?.regular_price}</span>
<span class="new-price">&#8369;${product?.sale_price}</span>` : product.regular_price ?
`<span class="new-price">&#8369;${product?.regular_price}</span>`: 'inquire'
}
</span>
</div>
</div>`;
productContainer.appendChild(card);
// updatePaginationUI(page, products.results.length);
});
gridList()
}
}
xhrVendors1.send();
// gridList()
};
function getCheckedCheckboxes() {
var checkboxes = document.querySelectorAll('input[name="category[]"]:checked');
var values = [];
checkboxes.forEach(function(checkbox) {
values.push(checkbox.value.toLowerCase().trim());
});
return values;
}
// Function to get min and max prices
function getMinMaxPrices() {
var minPrice = document.getElementById('minPrice').value;
var maxPrice = document.getElementById('maxPrice').value;
return {
minPrice: minPrice,
maxPrice: maxPrice
};
}
// Function to handle form submission
function applyFilters() {
var checkedCategories = getCheckedCheckboxes();
var prices = getMinMaxPrices();
// Pass the values to your filter function
filterFunction(checkedCategories, prices.minPrice, prices.maxPrice);
}
var checkboxes = document.querySelectorAll('input[name="category[]"]');
checkboxes.forEach(function(checkbox) {
checkbox.addEventListener('change', function() {
loadProducts(1, true);
});
});
// Listen for changes in min and max price inputs
var minPriceInput = document.getElementById('minPrice');
minPriceInput.addEventListener('input', function() {
loadProducts(1, true);
});
var maxPriceInput = document.getElementById('maxPrice');
maxPriceInput.addEventListener('input', function() {
loadProducts(1, true);
});
function gridList(e) {
console.log("hereeeee")
var $gridCont = $('.shop-pro-inner');
var $gridView = $('.pro-gl-content');
// e.preventDefault();
$gridCont.removeClass('list-view');
$gridView.removeClass('width-100');
}
// Send the request to fetch vendors
var checkboxes = document.querySelectorAll('input[name="category[]"]');
checkboxes.forEach(function(checkbox) {
checkbox.addEventListener('change', function() {
loadProducts(1, true);
});
});
// Listen for changes in min and max price inputs
var minPriceInput = document.getElementById('minPrice');
minPriceInput.addEventListener('input', function() {
loadProducts(1, true);
});
var maxPriceInput = document.getElementById('maxPrice');
maxPriceInput.addEventListener('input', function() {
loadProducts(1, true);
});
});
</script>
<!-- Sidebar Area Start -->
<div class="ec-shop-leftside ec-vendor-sidebar col-lg-3 col-md-12 order-lg-first order-md-last">
<div class="ec-sidebar-wrap ec-border-box">
@ -602,19 +829,23 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<li>
<div style="padding-top:10px;">
<label for="minPrice" style="margin-bottom:-5px;">Min Price:</label>
<input style="height:40px" type="number" name="minPrice" id="minPrice" value="<?php echo isset($_POST['minPrice']) ? $_POST['minPrice'] : (isset($_GET['minPrice']) ? $_GET['minPrice'] : ''); ?>" />
<input style="height:40px" type="number" name="minPrice" id="minPrice" />
<!-- <input style="height:40px" type="number" name="minPrice" id="minPrice" value="<?php echo isset($_POST['minPrice']) ? $_POST['minPrice'] : (isset($_GET['minPrice']) ? $_GET['minPrice'] : ''); ?>" /> -->
</div>
</li>
<li>
<div>
<label for="maxPrice" style="margin-bottom:-5px;">Max Price:</label>
<input style="height:40px" type="number" name="maxPrice" id="maxPrice" value="<?php echo isset($_POST['maxPrice']) ? $_POST['maxPrice'] : (isset($_GET['maxPrice']) ? $_GET['maxPrice'] : ''); ?>" />
<input style="height:40px" type="number" name="maxPrice" id="maxPrice" />
<!-- <input style="height:40px" type="number" name="maxPrice" id="maxPrice" value="<?php echo isset($_POST['maxPrice']) ? $_POST['maxPrice'] : (isset($_GET['maxPrice']) ? $_GET['maxPrice'] : ''); ?>" /> -->
</div>
</li>
<li>
<div style="padding-top:10px;">
<!-- <div style="padding-top:10px;">
<button style="font-size:12px; height:30px; width:60px;" class="btn-primary" type="submit">Apply</button>
</div>
</div> -->
</li>
</ul>
<!-- <button type="submit">Apply</button> -->
@ -819,7 +1050,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<div class="row">
<div class="col-sm-12 col-lg-3 ec-footer-contact">
<div class="ec-footer-widget">
<div class="ec-footer-logo"><a href="#"><img src="assets/images/logo/footer-logo.png" alt=""><img class="dark-footer-logo" src="assets/images/logo/dark-logo.png" alt="Site Logo" style="display: none;" /></a></div>
<div class="ec-footer-logo"><a href="#"><img loading="lazy" src="assets/images/logo/footer-logo.png" alt=""><img loading="lazy" class="dark-footer-logo" src="assets/images/logo/dark-logo.png" alt="Site Logo" style="display: none;" /></a></div>
<h4 class="ec-footer-heading">Contact us</h4>
<div class="ec-footer-links">
<ul class="align-items-center">
@ -920,7 +1151,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<!-- <div class="col footer-bottom-right">
<div class="footer-bottom-payment d-flex justify-content-end">
<div class="payment-link">
<img src="assets/images/icons/payment.png" alt="">
<img loading="lazy" src="assets/images/icons/payment.png" alt="">
</div>
</div>
@ -944,36 +1175,36 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<!-- Swiper -->
<div class="qty-product-cover">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
<div class="qty-nav-thumb">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
</div>
@ -1065,7 +1296,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -1103,7 +1334,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1125,7 +1356,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1147,7 +1378,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1169,7 +1400,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1193,7 +1424,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -1208,7 +1439,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -322,7 +322,7 @@
$pid = rand(0, count($bestSellers) - 1);
?>
<div class="ec-sb-pro-sl-item">
<a href="product-left-sidebar.php?id=<?php echo $bestSellers[$pid]["_id"]; ?>" class="sidekka_pro_img"><img src="<?php echo $bestSellers[$pid]["product_image"] ?>" alt="product" /></a>
<a href="product-left-sidebar.php?id=<?php echo $bestSellers[$pid]["_id"]; ?>" class="sidekka_pro_img"><img loading="lazy" src="<?php echo $bestSellers[$pid]["product_image"] ?>" alt="product" /></a>
<div class="ec-pro-content">
<h5 class="ec-pro-title"><a id="best-sellers-title" class="bs-title" href="product-left-sidebar.php?id=<?php echo $bestSellers[$pid]["_id"]; ?>"><?php echo $bestSellers[$pid]["product_name"] ?></a></h5>
<!-- <div class="ec-pro-rating">
@ -356,7 +356,7 @@
<div class="ec-sb-pro-sl">
<div>
<div class="ec-sb-pro-sl-item">
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img src="assets/images/product-image/1.jpg" alt="product" /></a>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy" src="assets/images/product-image/1.jpg" alt="product" /></a>
<div class="ec-pro-content">
<h5 class="ec-pro-title"><a href="shop-left-sidebar-col-4.php">baby fabric shoes</a></h5>
<div class="ec-pro-rating">
@ -375,7 +375,7 @@
</div>
<div>
<div class="ec-sb-pro-sl-item">
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img src="assets/images/product-image/2.jpg" alt="product" /></a>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy" src="assets/images/product-image/2.jpg" alt="product" /></a>
<div class="ec-pro-content">
<h5 class="ec-pro-title"><a href="shop-left-sidebar-col-4.php">Men's hoodies t-shirt</a>
</h5>
@ -395,7 +395,7 @@
</div>
<div>
<div class="ec-sb-pro-sl-item">
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img src="assets/images/product-image/3.jpg" alt="product" /></a>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy" src="assets/images/product-image/3.jpg" alt="product" /></a>
<div class="ec-pro-content">
<h5 class="ec-pro-title"><a href="shop-left-sidebar-col-4.php">Girls t-shirt</a></h5>
<div class="ec-pro-rating">
@ -414,7 +414,7 @@
</div>
<div>
<div class="ec-sb-pro-sl-item">
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img src="assets/images/product-image/4.jpg" alt="product" /></a>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy" src="assets/images/product-image/4.jpg" alt="product" /></a>
<div class="ec-pro-content">
<h5 class="ec-pro-title"><a href="shop-left-sidebar-col-4.php">woolen hat for men</a></h5>
<div class="ec-pro-rating">
@ -433,7 +433,7 @@
</div>
<div>
<div class="ec-sb-pro-sl-item">
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img src="assets/images/product-image/5.jpg" alt="product" /></a>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy" src="assets/images/product-image/5.jpg" alt="product" /></a>
<div class="ec-pro-content">
<h5 class="ec-pro-title"><a href="shop-left-sidebar-col-4.php">Womens purse</a></h5>
<div class="ec-pro-rating">
@ -452,7 +452,7 @@
</div>
<div>
<div class="ec-sb-pro-sl-item">
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img src="assets/images/product-image/6.jpg" alt="product" /></a>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy" src="assets/images/product-image/6.jpg" alt="product" /></a>
<div class="ec-pro-content">
<h5 class="ec-pro-title"><a href="shop-left-sidebar-col-4.php">Baby toy doctor kit</a>
</h5>
@ -472,7 +472,7 @@
</div>
<div>
<div class="ec-sb-pro-sl-item">
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img src="assets/images/product-image/7.jpg" alt="product" /></a>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy" src="assets/images/product-image/7.jpg" alt="product" /></a>
<div class="ec-pro-content">
<h5 class="ec-pro-title"><a href="shop-left-sidebar-col-4.php">teddy bear baby toy</a>
</h5>
@ -492,7 +492,7 @@
</div>
<div>
<div class="ec-sb-pro-sl-item">
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img src="assets/images/product-image/2.jpg" alt="product" /></a>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy" src="assets/images/product-image/2.jpg" alt="product" /></a>
<div class="ec-pro-content">
<h5 class="ec-pro-title"><a href="shop-left-sidebar-col-4.php">Mens hoodies blue</a></h5>
<div class="ec-pro-rating">

View File

@ -599,8 +599,8 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image" src="<?php echo $item['product']['product_image']; ?>" alt="Product" />
<!-- <img class="hover-image"
<img loading="lazy" class="main-image" src="<?php echo $item['product']['product_image']; ?>" alt="Product" />
<!-- <img loading="lazy" class="hover-image"
src="assets/images/product-image/1_2.jpg"
alt="Product" /> -->
</a>
@ -657,10 +657,10 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image"
<img loading="lazy" class="main-image"
src="assets/images/product-image/8_1.jpg"
alt="Product" />
<img class="hover-image"
<img loading="lazy" class="hover-image"
src="assets/images/product-image/8_2.jpg"
alt="Product" />
</a>
@ -1038,25 +1038,25 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="ec-sb-block-content">
<div class="ec-check-pay-img-inner">
<div class="ec-check-pay-img">
<img src="assets/images/icons/payment1.png" alt="">
<img loading="lazy" src="assets/images/icons/payment1.png" alt="">
</div>
<div class="ec-check-pay-img">
<img src="assets/images/icons/payment2.png" alt="">
<img loading="lazy" src="assets/images/icons/payment2.png" alt="">
</div>
<div class="ec-check-pay-img">
<img src="assets/images/icons/payment3.png" alt="">
<img loading="lazy" src="assets/images/icons/payment3.png" alt="">
</div>
<div class="ec-check-pay-img">
<img src="assets/images/icons/payment4.png" alt="">
<img loading="lazy" src="assets/images/icons/payment4.png" alt="">
</div>
<div class="ec-check-pay-img">
<img src="assets/images/icons/payment5.png" alt="">
<img loading="lazy" src="assets/images/icons/payment5.png" alt="">
</div>
<div class="ec-check-pay-img">
<img src="assets/images/icons/payment6.png" alt="">
<img loading="lazy" src="assets/images/icons/payment6.png" alt="">
</div>
<div class="ec-check-pay-img">
<img src="assets/images/icons/payment7.png" alt="">
<img loading="lazy" src="assets/images/icons/payment7.png" alt="">
</div>
</div>
</div>
@ -1087,8 +1087,8 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image" src="assets/images/product-image/6_1.jpg" alt="Product" />
<img class="hover-image" src="assets/images/product-image/6_2.jpg" alt="Product" />
<img loading="lazy" class="main-image" src="assets/images/product-image/6_1.jpg" alt="Product" />
<img loading="lazy" class="hover-image" src="assets/images/product-image/6_2.jpg" alt="Product" />
</a>
<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>
@ -1138,8 +1138,8 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image" src="assets/images/product-image/7_1.jpg" alt="Product" />
<img class="hover-image" src="assets/images/product-image/7_2.jpg" alt="Product" />
<img loading="lazy" class="main-image" src="assets/images/product-image/7_1.jpg" alt="Product" />
<img loading="lazy" class="hover-image" src="assets/images/product-image/7_2.jpg" alt="Product" />
</a>
<span class="percentage">20%</span>
<span class="flags">
@ -1192,8 +1192,8 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image" src="assets/images/product-image/1_1.jpg" alt="Product" />
<img class="hover-image" src="assets/images/product-image/1_2.jpg" alt="Product" />
<img loading="lazy" class="main-image" src="assets/images/product-image/1_1.jpg" alt="Product" />
<img loading="lazy" class="hover-image" src="assets/images/product-image/1_2.jpg" alt="Product" />
</a>
<span class="percentage">20%</span>
<span class="flags">
@ -1247,8 +1247,8 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image" src="assets/images/product-image/2_1.jpg" alt="Product" />
<img class="hover-image" src="assets/images/product-image/2_2.jpg" alt="Product" />
<img loading="lazy" class="main-image" src="assets/images/product-image/2_1.jpg" alt="Product" />
<img loading="lazy" class="hover-image" src="assets/images/product-image/2_2.jpg" alt="Product" />
</a>
<span class="percentage">20%</span>
<span class="flags">
@ -1308,36 +1308,36 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<!-- Swiper -->
<div class="qty-product-cover">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
<div class="qty-nav-thumb">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
</div>
@ -1430,7 +1430,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -1468,7 +1468,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1490,7 +1490,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1512,7 +1512,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1534,7 +1534,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1558,7 +1558,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -1573,7 +1573,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -389,7 +389,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
</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>
@ -419,7 +419,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
</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" id="submitBtn">Submit</button>
</form>
@ -452,7 +452,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<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>
@ -512,6 +512,39 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
</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);
}
}
</script>
<script>
// raymart/sir mark added function to show the addresses of the customer in the third modal march 04 2024
$('#thirdModal').on('shown.bs.modal', function (event) {
@ -983,12 +1016,12 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" />
<img loading="lazy" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" />
<?php
}
} else {
?>
<img class="main-image" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" alt="edit" />
<img loading="lazy" class="main-image" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" alt="edit" />
<?php
}
?>
@ -1064,10 +1097,10 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image"
<img loading="lazy" class="main-image"
src="assets/images/product-image/8_1.jpg"
alt="Product" />
<img class="hover-image"
<img loading="lazy" class="hover-image"
src="assets/images/product-image/8_2.jpg"
alt="Product" />
</a>
@ -1455,6 +1488,21 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
const randomIndex = Math.floor(Math.random() * refchar.length);
uniqueRef += refchar.charAt(randomIndex);
}
let paymentDeetsId = 'obn_cod_id_';
for (let i = 0; i < 16; i++) {
const randomIndex = Math.floor(Math.random() * refchar.length);
paymentDeetsId += refchar.charAt(randomIndex);
}
let paymentUniqueId = '';
for (let i = 0; i < 24; i++) {
const randomIndex = Math.floor(Math.random() * refchar.length);
paymentUniqueId += refchar.charAt(randomIndex);
}
let dataPaymentUniqueId = '';
for (let i = 0; i < 24; i++) {
const randomIndex = Math.floor(Math.random() * refchar.length);
dataPaymentUniqueId += refchar.charAt(randomIndex);
}
const selectedFName = document.getElementById('selectedFName').innerText;
const selectedLName = document.getElementById('selectedLName').innerText;
@ -1521,6 +1569,54 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
payment: {
status: "UNPAID",
reference_number: uniqueRef,
details: [
{
id: paymentDeetsId,
attributes:{
data:{
attributes:{
amount: parseFloat(orderId.total_amount) * 100 ,
description: orderId.items[0].product.name + " (" + orderId.items[0].quantity + ")" ,
status: "unpaid",
fee:shippingFees * 100,
tax_amount:"null",
taxes:[],
reference_number: uniqueRef,
payments:[
{
attributes:{
billing:{
phone: billingNumber
},
source: {
type: "Cash On Delivery"
},
amount:parseFloat(orderId.total_amount) * 100,
currency: "PHP",
description: orderId.items[0].product.name + " (" + orderId.items[0].quantity + ")" ,
fee:shippingFees,
net_amount: parseFloat(orderId.total_amount) * 100,
statement_descriptor: "Obanana E-commerce Checkout",
status: "unpaid",
tax_amount:0,
refunds: [],
},
_id: paymentUniqueId,
createdAt: iso8601String,
updatedAt: iso8601String
}
],
currency:"PHP",
},
_id:dataPaymentUniqueId,
createdAt: iso8601String,
updatedAt: iso8601String
},
created_at: iso8601String,
updated_at: iso8601String
}
}
]
},
total_amount: parseFloat(orderId.total_amount) + shippingFees,
status: "TO PAY",
@ -1586,25 +1682,25 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="ec-sb-block-content">
<div class="ec-check-pay-img-inner">
<div class="ec-check-pay-img">
<img src="assets/images/icons/payment1.png" alt="">
<img loading="lazy" src="assets/images/icons/payment1.png" alt="">
</div>
<div class="ec-check-pay-img">
<img src="assets/images/icons/payment2.png" alt="">
<img loading="lazy" src="assets/images/icons/payment2.png" alt="">
</div>
<div class="ec-check-pay-img">
<img src="assets/images/icons/payment3.png" alt="">
<img loading="lazy" src="assets/images/icons/payment3.png" alt="">
</div>
<div class="ec-check-pay-img">
<img src="assets/images/icons/payment4.png" alt="">
<img loading="lazy" src="assets/images/icons/payment4.png" alt="">
</div>
<div class="ec-check-pay-img">
<img src="assets/images/icons/payment5.png" alt="">
<img loading="lazy" src="assets/images/icons/payment5.png" alt="">
</div>
<div class="ec-check-pay-img">
<img src="assets/images/icons/payment6.png" alt="">
<img loading="lazy" src="assets/images/icons/payment6.png" alt="">
</div>
<div class="ec-check-pay-img">
<img src="assets/images/icons/payment7.png" alt="">
<img loading="lazy" src="assets/images/icons/payment7.png" alt="">
</div>
</div>
</div>
@ -1635,8 +1731,8 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image" src="assets/images/product-image/6_1.jpg" alt="Product" />
<img class="hover-image" src="assets/images/product-image/6_2.jpg" alt="Product" />
<img loading="lazy" class="main-image" src="assets/images/product-image/6_1.jpg" alt="Product" />
<img loading="lazy" class="hover-image" src="assets/images/product-image/6_2.jpg" alt="Product" />
</a>
<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>
@ -1686,8 +1782,8 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image" src="assets/images/product-image/7_1.jpg" alt="Product" />
<img class="hover-image" src="assets/images/product-image/7_2.jpg" alt="Product" />
<img loading="lazy" class="main-image" src="assets/images/product-image/7_1.jpg" alt="Product" />
<img loading="lazy" class="hover-image" src="assets/images/product-image/7_2.jpg" alt="Product" />
</a>
<span class="percentage">20%</span>
<span class="flags">
@ -1740,8 +1836,8 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image" src="assets/images/product-image/1_1.jpg" alt="Product" />
<img class="hover-image" src="assets/images/product-image/1_2.jpg" alt="Product" />
<img loading="lazy" class="main-image" src="assets/images/product-image/1_1.jpg" alt="Product" />
<img loading="lazy" class="hover-image" src="assets/images/product-image/1_2.jpg" alt="Product" />
</a>
<span class="percentage">20%</span>
<span class="flags">
@ -1795,8 +1891,8 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image" src="assets/images/product-image/2_1.jpg" alt="Product" />
<img class="hover-image" src="assets/images/product-image/2_2.jpg" alt="Product" />
<img loading="lazy" class="main-image" src="assets/images/product-image/2_1.jpg" alt="Product" />
<img loading="lazy" class="hover-image" src="assets/images/product-image/2_2.jpg" alt="Product" />
</a>
<span class="percentage">20%</span>
<span class="flags">
@ -1856,36 +1952,36 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<!-- Swiper -->
<div class="qty-product-cover">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
<div class="qty-nav-thumb">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
</div>
@ -1978,7 +2074,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -2016,7 +2112,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -2038,7 +2134,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -2060,7 +2156,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -2082,7 +2178,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -2106,7 +2202,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -2121,7 +2217,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -63,7 +63,7 @@
</div>
<ul class="eccart-pro-items">
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/6_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">T-shirt For Women</a>
@ -75,7 +75,7 @@
</div>
</li>
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/12_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">Women Leather Shoes</a>
@ -87,7 +87,7 @@
</div>
</li>
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/3_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">Girls Nylon Purse</a>
@ -292,7 +292,7 @@
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -331,7 +331,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon"></span>
</div>
@ -355,7 +355,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
@ -379,7 +379,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
@ -403,7 +403,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
@ -428,7 +428,7 @@
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -443,7 +443,7 @@
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

42
faq.php
View File

@ -58,7 +58,7 @@
</div>
<ul class="eccart-pro-items">
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/6_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">T-shirt For Women</a>
@ -70,7 +70,7 @@
</div>
</li>
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/12_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">Women Leather Shoes</a>
@ -82,7 +82,7 @@
</div>
</li>
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/3_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">Girls Nylon Purse</a>
@ -162,7 +162,7 @@
<div class="row">
<!-- <div class="col-md-6 ec-cms-block ec-abcms-block text-center">
<div class="ec-cms-block-inner">
<img class="a-img" src="assets/images/offer-image/1.jpg" alt="about">
<img loading="lazy" class="a-img" src="assets/images/offer-image/1.jpg" alt="about">
</div>
</div> -->
<div class="col-md-12 ec-cms-block ec-abcms-block text-center">
@ -213,7 +213,7 @@
<li class="ec-test-item">
<i class="fi-rr-quote-right top"></i>
<div class="ec-test-inner">
<div class="ec-test-img"><img alt="testimonial" title="testimonial"
<div class="ec-test-img"><img loading="lazy" alt="testimonial" title="testimonial"
src="assets/images/testimonial/1.jpg" /></div>
<div class="ec-test-content">
<div class="ec-test-desc">Lorem Ipsum is simply dummy text of the printing and
@ -236,7 +236,7 @@
<li class="ec-test-item ">
<i class="fi-rr-quote-right top"></i>
<div class="ec-test-inner">
<div class="ec-test-img"><img alt="testimonial" title="testimonial"
<div class="ec-test-img"><img loading="lazy" alt="testimonial" title="testimonial"
src="assets/images/testimonial/2.jpg" /></div>
<div class="ec-test-content">
<div class="ec-test-desc">Lorem Ipsum is simply dummy text of the printing and
@ -259,7 +259,7 @@
<li class="ec-test-item">
<i class="fi-rr-quote-right top"></i>
<div class="ec-test-inner">
<div class="ec-test-img"><img alt="testimonial" title="testimonial"
<div class="ec-test-img"><img loading="lazy" alt="testimonial" title="testimonial"
src="assets/images/testimonial/3.jpg" /></div>
<div class="ec-test-content">
<div class="ec-test-desc">Lorem Ipsum is simply dummy text of the printing and
@ -360,28 +360,28 @@
<!-- instagram item -->
<!-- <div class="ec-insta-item">
<div class="ec-insta-inner">
<a href="#" target="_blank"><img src="assets/images/instragram-image/1.jpg"
<a href="#" target="_blank"><img loading="lazy" src="assets/images/instragram-image/1.jpg"
alt="insta"></a>
</div>
</div> -->
<!-- instagram item -->
<!-- <div class="ec-insta-item">
<div class="ec-insta-inner">
<a href="#" target="_blank"><img src="assets/images/instragram-image/2.jpg"
<a href="#" target="_blank"><img loading="lazy" src="assets/images/instragram-image/2.jpg"
alt="insta"></a>
</div>
</div> -->
<!-- instagram item -->
<!-- <div class="ec-insta-item">
<div class="ec-insta-inner">
<a href="#" target="_blank"><img src="assets/images/instragram-image/3.jpg"
<a href="#" target="_blank"><img loading="lazy" src="assets/images/instragram-image/3.jpg"
alt="insta"></a>
</div>
</div> -->
<!-- instagram item -->
<!-- <div class="ec-insta-item">
<div class="ec-insta-inner">
<a href="#" target="_blank"><img src="assets/images/instragram-image/4.jpg"
<a href="#" target="_blank"><img loading="lazy" src="assets/images/instragram-image/4.jpg"
alt="insta"></a>
</div>
</div> -->
@ -389,7 +389,7 @@
<!-- instagram item -->
<!-- <div class="ec-insta-item">
<div class="ec-insta-inner">
<a href="#" target="_blank"><img src="assets/images/instragram-image/5.jpg"
<a href="#" target="_blank"><img loading="lazy" src="assets/images/instragram-image/5.jpg"
alt="insta"></a>
</div>
</div> -->
@ -397,7 +397,7 @@
<!-- instagram item -->
<!-- <div class="ec-insta-item">
<div class="ec-insta-inner">
<a href="#" target="_blank"><img src="assets/images/instragram-image/6.jpg"
<a href="#" target="_blank"><img loading="lazy" src="assets/images/instragram-image/6.jpg"
alt="insta"></a>
</div>
</div> -->
@ -405,7 +405,7 @@
<!-- instagram item -->
<!-- <div class="ec-insta-item">
<div class="ec-insta-inner">
<a href="#" target="_blank"><img src="assets/images/instragram-image/7.jpg"
<a href="#" target="_blank"><img loading="lazy" src="assets/images/instragram-image/7.jpg"
alt="insta"></a>
</div>
</div> -->
@ -451,7 +451,7 @@
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -490,7 +490,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon"></span>
</div>
@ -514,7 +514,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
@ -538,7 +538,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
@ -562,7 +562,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
@ -587,7 +587,7 @@
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -602,7 +602,7 @@
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png">
<img loading="lazy" alt="icon" src="assets/images/common/settings.png">
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -16,7 +16,7 @@
<div class="row">
<div class="col-sm-12 col-lg-3 ec-footer-contact">
<div class="ec-footer-widget">
<div class="ec-footer-logo"><a href="index.php"><img src="assets/images/logo/logo.png" alt=""><img class="dark-footer-logo" src="assets/images/logo/dark-logo.png" alt="Site Logo" style="display: none;" /></a></div>
<div class="ec-footer-logo"><a href="index.php"><img loading="lazy" src="assets/images/logo/logo.png" alt=""><img loading="lazy" class="dark-footer-logo" src="assets/images/logo/dark-logo.png" alt="Site Logo" style="display: none;" /></a></div>
<h4 class="ec-footer-heading">Contact us</h4>
<div class="ec-footer-links">
<ul class="align-items-center">
@ -155,7 +155,7 @@
<div class="col footer-bottom-right">
<div class="footer-bottom-payment d-flex justify-content-end">
<div class="payment-link">
<img src="assets/images/icons/payment.png" alt="">
<img loading="lazy" src="assets/images/icons/payment.png" alt="">
</div>
</div>

View File

@ -308,7 +308,7 @@ var pass2I = document.getElementById(`passInput2`);
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -346,7 +346,7 @@ var pass2I = document.getElementById(`passInput2`);
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -368,7 +368,7 @@ var pass2I = document.getElementById(`passInput2`);
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -390,7 +390,7 @@ var pass2I = document.getElementById(`passInput2`);
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -412,7 +412,7 @@ var pass2I = document.getElementById(`passInput2`);
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -436,7 +436,7 @@ var pass2I = document.getElementById(`passInput2`);
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -451,7 +451,7 @@ var pass2I = document.getElementById(`passInput2`);
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -142,7 +142,7 @@
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -180,7 +180,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -202,7 +202,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -224,7 +224,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -246,7 +246,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -270,7 +270,7 @@
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -285,7 +285,7 @@
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -57,7 +57,7 @@
</div>
<ul class="eccart-pro-items">
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/6_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">T-shirt For Women</a>
@ -69,7 +69,7 @@
</div>
</li>
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/12_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">Women Leather Shoes</a>
@ -81,7 +81,7 @@
</div>
</li>
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/3_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">Girls Nylon Purse</a>
@ -227,7 +227,7 @@
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -266,7 +266,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon"></span>
</div>
@ -290,7 +290,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
@ -314,7 +314,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
@ -338,7 +338,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
@ -363,7 +363,7 @@
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -378,7 +378,7 @@
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -2010,3 +2010,48 @@ function updatePayout($token, $payoutId)
return $response;
}
function getAllCustomers ()
{
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://" . $_SESSION["data_endpoint"] . "/api/v1/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'X-Api-Key: {{apiKey}}'
),
));
$response = curl_exec($curl);
curl_close($curl);
$json = json_decode($response, true);
return $json;
}
function getAllVendors ()
{
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://" . $_SESSION["data_endpoint"] . "/api/v1/vendors",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'X-Api-Key: {{apiKey}}'
),
));
$response = curl_exec($curl);
curl_close($curl);
$json = json_decode($response, true);
return $json;
}

View File

@ -215,7 +215,7 @@ if ($_SESSION["userId"] <> "") {
<div id="ec-popnews-close2"><i class="ecicon eci-close"></i></div>
<div class="row">
<div class="col-md-6 disp-no-767">
<img src="../assets/images/img-1.png" alt="newsletter">
<img loading="lazy" src="../assets/images/img-1.png" alt="newsletter">
</div>
<div class="col-md-6">
<div id="ec-popnews-box-content2">
@ -223,10 +223,10 @@ if ($_SESSION["userId"] <> "") {
<p>Enjoy promos, discounts and more when you download, register and pay with ObananaPay.</p>
<div class="obpay-download">
<a href="https://play.google.com/store/apps/details?id=com.obanana.pay2" target="_blank">
<img src="../assets/images/playstore.png" alt="newsletter" style="object-fit:cover; height:45px; width:110px;">
<img loading="lazy" src="../assets/images/playstore.png" alt="newsletter" style="object-fit:cover; height:45px; width:110px;">
</a>
<a href="https://apps.apple.com/ph/app/obananapay/id6447606481" target="_blank">
<img src="../assets/images/appstore.png" alt="newsletter" style="object-fit:cover; height:45px; width:110px;">
<img loading="lazy" src="../assets/images/appstore.png" alt="newsletter" style="object-fit:cover; height:45px; width:110px;">
</a>
</div>
@ -321,7 +321,7 @@ if ($_SESSION["userId"] <> "") {
<!-- Ec Header Logo Start -->
<div class="align-self-center">
<div class="header-logo">
<a href="index.php"><img src="assets/images/logo/logo.png" alt="Site Logo" /><img class="dark-logo" src="assets/images/logo/dark-logo.png" alt="Site Logo" style="display: none;" /></a>
<a href="index.php"><img loading="lazy" src="assets/images/logo/logo.png" alt="Site Logo" /><img loading="lazy" class="dark-logo" src="assets/images/logo/dark-logo.png" alt="Site Logo" style="display: none;" /></a>
</div>
</div>
<!-- Ec Header Logo End -->
@ -421,12 +421,12 @@ if ($_SESSION["userId"] <> "") {
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img src="<?php echo $first_image_url; ?>" alt="product" />
<img loading="lazy" src="<?php echo $first_image_url; ?>" alt="product" />
<?php
}
} else {
?>
<img class="hover-image" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" alt="edit" />
<img loading="lazy" class="hover-image" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" alt="edit" />
<?php
}
?>
@ -801,7 +801,7 @@ if ($_SESSION["userId"] <> "") {
<!-- Ec Header Logo Start -->
<div class="col">
<div class="header-logo">
<a href="index.php"><img src="assets/images/logo/logo.png" alt="Site Logo" /><img class="dark-logo" src="assets/images/logo/dark-logo.png" alt="Site Logo" style="display: none;" /></a>
<a href="index.php"><img loading="lazy" src="assets/images/logo/logo.png" alt="Site Logo" /><img loading="lazy" class="dark-logo" src="assets/images/logo/dark-logo.png" alt="Site Logo" style="display: none;" /></a>
</div>
</div>
<!-- Ec Header Logo End -->
@ -884,16 +884,16 @@ if ($_SESSION["userId"] <> "") {
</li>
<li>
<ul class="ec-main-banner w-100">
<li><a class="p-0" href="shop-left-sidebar-col-4.php"><img
<li><a class="p-0" href="shop-left-sidebar-col-4.php"><img loading="lazy"
class="img-responsive" src="assets/images/menu-banner/1.jpg"
alt=""></a></li>
<li><a class="p-0" href="shop-left-sidebar-col-4.html"><img
<li><a class="p-0" href="shop-left-sidebar-col-4.html"><img loading="lazy"
class="img-responsive" src="assets/images/menu-banner/2.jpg"
alt=""></a></li>
<li><a class="p-0" href="shop-right-sidebar-col-3.html"><img
<li><a class="p-0" href="shop-right-sidebar-col-3.html"><img loading="lazy"
class="img-responsive" src="assets/images/menu-banner/3.jpg"
alt=""></a></li>
<li><a class="p-0" href="shop-right-sidebar-col-4.html"><img
<li><a class="p-0" href="shop-right-sidebar-col-4.html"><img loading="lazy"
class="img-responsive" src="assets/images/menu-banner/4.jpg"
alt=""></a></li>
</ul>
@ -1145,7 +1145,7 @@ if ($_SESSION["userId"] <> "") {
<li><a href="shop-list-full-col-2.html">Full width 2 columns</a></li>
</ul>
</li>
<li><a class="p-0" href="shop-left-sidebar-col-4.php"><img class="img-responsive" src="assets/images/menu-banner/1.jpg" alt=""></a>
<li><a class="p-0" href="shop-left-sidebar-col-4.php"><img loading="lazy" class="img-responsive" src="assets/images/menu-banner/1.jpg" alt=""></a>
</li>
</ul>
</li>

164
index.php
View File

@ -118,7 +118,7 @@ if ($_SESSION["userId"] <> "") {
<!-- Main slider -->
<div class="swiper-wrapper">
<div class="ec-slide-item swiper-slide d-flex ec-slide-1">
<img src="https://api.obanana.com/images/storage/web_images/1707370320758-banner_powerbank.jpg" alt="" width="1920">
<img loading="lazy" src="https://api.obanana.com/images/storage/web_images/1707370320758-banner_powerbank.jpg" alt="" width="1920">
<div class="container align-self-center">
<div class="row">
<div class="col-xl-6 col-lg-7 col-md-7 col-sm-7 align-self-center">
@ -133,7 +133,7 @@ if ($_SESSION["userId"] <> "") {
</div>
</div>
<div class="ec-slide-item swiper-slide d-flex ec-slide-2">
<img src="https://api.obanana.com/images/storage/web_images/1703049975908-3.png" alt="" width="1920">
<img loading="lazy" src="https://api.obanana.com/images/storage/web_images/1703049975908-3.png" alt="" width="1920">
<div class="container align-self-center">
<div class="row">
<div class="col-xl-6 col-lg-7 col-md-7 col-sm-7 align-self-center">
@ -148,7 +148,7 @@ if ($_SESSION["userId"] <> "") {
</div>
</div>
<div class="ec-slide-item swiper-slide d-flex ec-slide-2">
<img src="https://api.obanana.com/images/storage/web_images/1705052043932-omnia banner 3-min.png" alt="" width="1920">
<img loading="lazy" src="https://api.obanana.com/images/storage/web_images/1705052043932-omnia banner 3-min.png" alt="" width="1920">
<div class="container align-self-center">
<div class="row">
<div class="col-xl-6 col-lg-7 col-md-7 col-sm-7 align-self-center">
@ -237,19 +237,19 @@ if ($_SESSION["userId"] <> "") {
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img 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: 280px;" />
<?php
}
} else {
?>
<img class="hover-image" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" alt="edit" />
<img loading="lazy" class="hover-image" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" alt="edit" />
<?php
}
?>
</a>
<!-- <a href="product-left-sidebar.php?id=<?php echo $forAll[$pid]["_id"]; ?>" class="image">
<img class="main-image" src="<?php echo $forAll[$pid]["product_image"] ?>" alt="Product" />
<img class="hover-image" src="<?php echo $forAll[$pid]["product_image"] ?>" alt="Product" />
<img loading="lazy" class="main-image" src="<?php echo $forAll[$pid]["product_image"] ?>" alt="Product" />
<img loading="lazy" class="hover-image" src="<?php echo $forAll[$pid]["product_image"] ?>" alt="Product" />
</a> -->
<!-- <span class="percentage">20%</span> -->
<!-- raymart edit action -->
@ -357,19 +357,19 @@ if ($_SESSION["userId"] <> "") {
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img 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: 280px;" />
<?php
}
} else {
?>
<img class="hover-image" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" alt="edit" />
<img loading="lazy" class="hover-image" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" alt="edit" />
<?php
}
?>
</a>
<!-- <a href="product-left-sidebar.php?id=<?php echo $electronics[$pid]["_id"]; ?>" class="image">
<img class="main-image" src="<?php echo $electronics[$pid]["product_image"] ?>" alt="Product" />
<img class="hover-image" src="<?php echo $electronics[$pid]["product_image"] ?>" alt="Product" />
<img loading="lazy" class="main-image" src="<?php echo $electronics[$pid]["product_image"] ?>" alt="Product" />
<img loading="lazy" class="hover-image" src="<?php echo $electronics[$pid]["product_image"] ?>" alt="Product" />
</a> -->
<!-- <span class="percentage">20%</span> -->
@ -479,19 +479,19 @@ if ($_SESSION["userId"] <> "") {
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img 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: 280px;" />
<?php
}
} else {
?>
<img class="hover-image" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" alt="edit" />
<img loading="lazy" class="hover-image" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" alt="edit" />
<?php
}
?>
</a>
<!-- <a href="product-left-sidebar.php?id=<?php echo $smartHome[$pid]["_id"]; ?>" class="image">
<img class="main-image" src="<?php echo $smartHome[$pid]["product_image"] ?>" alt="Product" />
<img class="hover-image" src="<?php echo $smartHome[$pid]["product_image"] ?>" alt="Product" />
<img loading="lazy" class="main-image" src="<?php echo $smartHome[$pid]["product_image"] ?>" alt="Product" />
<img loading="lazy" class="hover-image" src="<?php echo $smartHome[$pid]["product_image"] ?>" alt="Product" />
</a> -->
<!-- <span class="percentage">20%</span> -->
<!-- raymart edit action feb 14 2024-->
@ -599,19 +599,19 @@ if ($_SESSION["userId"] <> "") {
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img 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: 280px;" />
<?php
}
} else {
?>
<img class="hover-image" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" alt="edit" />
<img loading="lazy" class="hover-image" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" alt="edit" />
<?php
}
?>
</a>
<!-- <a href="product-left-sidebar.php?id=<?php echo $forVehicle[$pid]["_id"]; ?>" class="image">
<img class="main-image" src="<?php echo $forVehicle[$pid]["product_image"] ?>" alt="Product" />
<img class="hover-image" src="<?php echo $forVehicle[$pid]["product_image"] ?>" alt="Product" />
<img loading="lazy" class="main-image" src="<?php echo $forVehicle[$pid]["product_image"] ?>" alt="Product" />
<img loading="lazy" class="hover-image" src="<?php echo $forVehicle[$pid]["product_image"] ?>" alt="Product" />
</a> -->
<!-- <span class="percentage">20%</span> -->
<!-- raymart added action feb 14 2024-->
@ -709,7 +709,7 @@ if ($_SESSION["userId"] <> "") {
<div class="row">
<div class="banner-block col-lg-6 col-md-12 margin-b-30" data-animation="slideInRight">
<div class="bnr-overlay">
<img src="https://api.obanana.com/images/storage/web_images/1704184846040-3.png" alt="" />
<img loading="lazy" src="https://api.obanana.com/images/storage/web_images/1704184846040-3.png" alt="" />
<div class="banner-text">
<!-- <span class="ec-banner-stitle">New Arrivals</span>
<span class="ec-banner-title">mens<br> Sport shoes</span>
@ -725,7 +725,7 @@ if ($_SESSION["userId"] <> "") {
</div>
<div class="banner-block col-lg-6 col-md-12" data-animation="slideInLeft">
<div class="bnr-overlay">
<img src="https://api.obanana.com/images/storage/web_images/1704185293794-4.png" alt="" />
<img loading="lazy" src="https://api.obanana.com/images/storage/web_images/1704185293794-4.png" alt="" />
<div class="banner-text">
<!-- <span class="ec-banner-stitle">New Trending</span>
<span class="ec-banner-title">Smart<br> watches</span>
@ -766,19 +766,19 @@ if ($_SESSION["userId"] <> "") {
<div class="col-lg-3">
<ul class="ec-cat-tab-nav nav">
<li class="cat-item"><a class="cat-link active" data-bs-toggle="tab" href="#tab-cat-1">
<div class="cat-icons"><img class="cat-icon" src="https://api.obanana.com/images/storage/web_images/1705281191973-Electronics_gray.png" style="width: 55px;" alt="cat-icon"><img class="cat-icon-hover" src="https://api.obanana.com/images/storage/web_images/1705279346519-Electronics.png" style="width: 55px;" alt="cat-icon"></div>
<div class="cat-icons"><img loading="lazy" class="cat-icon" src="https://api.obanana.com/images/storage/web_images/1705281191973-Electronics_gray.png" style="width: 55px;" alt="cat-icon"><img loading="lazy" class="cat-icon-hover" src="https://api.obanana.com/images/storage/web_images/1705279346519-Electronics.png" style="width: 55px;" alt="cat-icon"></div>
<div class="cat-desc"><span>Electronics</span><span></span></div>
</a></li>
<li class="cat-item"><a class="cat-link" data-bs-toggle="tab" href="#tab-cat-2">
<div class="cat-icons"><img class="cat-icon" src="https://api.obanana.com/images/storage/web_images/1705281156875-Smarthome_gray.png" style="width: 55px;" alt="cat-icon"><img class="cat-icon-hover" src="https://api.obanana.com/images/storage/web_images/1705281330439-Smarthome_white.png" style="width: 55px;" alt="cat-icon"></div>
<div class="cat-icons"><img loading="lazy" class="cat-icon" src="https://api.obanana.com/images/storage/web_images/1705281156875-Smarthome_gray.png" style="width: 55px;" alt="cat-icon"><img loading="lazy" class="cat-icon-hover" src="https://api.obanana.com/images/storage/web_images/1705281330439-Smarthome_white.png" style="width: 55px;" alt="cat-icon"></div>
<div class="cat-desc"><span>Smart Home</span><span></span></div>
</a></li>
<li class="cat-item"><a class="cat-link" data-bs-toggle="tab" href="#tab-cat-3">
<div class="cat-icons"><img class="cat-icon" src="https://api.obanana.com/images/storage/web_images/1705281114426-Ebike_gray.png" style="width: 55px;" alt="cat-icon"><img class="cat-icon-hover" src="https://api.obanana.com/images/storage/web_images/1705279973475-Ebike.png" style="width: 55px;" alt="cat-icon"></div>
<div class="cat-icons"><img loading="lazy" class="cat-icon" src="https://api.obanana.com/images/storage/web_images/1705281114426-Ebike_gray.png" style="width: 55px;" alt="cat-icon"><img loading="lazy" class="cat-icon-hover" src="https://api.obanana.com/images/storage/web_images/1705279973475-Ebike.png" style="width: 55px;" alt="cat-icon"></div>
<div class="cat-desc"><span>E-Bike</span><span></span></div>
</a></li>
<li class="cat-item"><a class="cat-link" data-bs-toggle="tab" href="#tab-cat-4">
<div class="cat-icons"><img class="cat-icon" src="https://api.obanana.com/images/storage/web_images/1705280971569-Heavy Equipments_GRAY.png" style="width: 55px;" alt="cat-icon"><img class="cat-icon-hover" src="https://api.obanana.com/images/storage/web_images/1705280002759-Heavy Equipments.png" style="width: 55px;" alt="cat-icon"></div>
<div class="cat-icons"><img loading="lazy" class="cat-icon" src="https://api.obanana.com/images/storage/web_images/1705280971569-Heavy Equipments_GRAY.png" style="width: 55px;" alt="cat-icon"><img loading="lazy" class="cat-icon-hover" src="https://api.obanana.com/images/storage/web_images/1705280002759-Heavy Equipments.png" style="width: 55px;" alt="cat-icon"></div>
<div class="cat-desc"><span>Heavy Equipment</span><span></span></div>
</a></li>
</ul>
@ -791,7 +791,7 @@ if ($_SESSION["userId"] <> "") {
<!-- 1st Category tab end -->
<div class="tab-pane fade show active" id="tab-cat-1">
<div class="row">
<img src="https://api.obanana.com/images/storage/web_images/1704437307503-Electronics.png" alt="" />
<img loading="lazy" src="https://api.obanana.com/images/storage/web_images/1704437307503-Electronics.png" alt="" />
</div>
<span class="panel-overlay">
<a href="search_product_action.php?category=Electronics" class="btn btn-primary">View All</a>
@ -800,7 +800,7 @@ if ($_SESSION["userId"] <> "") {
<!-- 1st Category tab end -->
<div class="tab-pane fade" id="tab-cat-2">
<div class="row">
<img src="https://api.obanana.com/images/storage/web_images/1704437379904-Smarthome.png" alt="" />
<img loading="lazy" src="https://api.obanana.com/images/storage/web_images/1704437379904-Smarthome.png" alt="" />
</div>
<span class="panel-overlay">
<a href="search_product_action.php?category=Smart Home" class="btn btn-primary">View All</a>
@ -810,7 +810,7 @@ if ($_SESSION["userId"] <> "") {
<!-- 3rd Category tab start -->
<div class="tab-pane fade" id="tab-cat-3">
<div class="row">
<img src="https://api.obanana.com/images/storage/web_images/1704437443706-Ebike.png" alt="" />
<img loading="lazy" src="https://api.obanana.com/images/storage/web_images/1704437443706-Ebike.png" alt="" />
</div>
<span class="panel-overlay">
<a href="search_product_action.php?category=E-bike" class="btn btn-primary">View All</a>
@ -820,7 +820,7 @@ if ($_SESSION["userId"] <> "") {
<!-- 4th Category tab start -->
<div class="tab-pane fade" id="tab-cat-4">
<div class="row">
<img src="https://api.obanana.com/images/storage/web_images/1704437503897-Heavy Equipments.png" alt="" />
<img loading="lazy" src="https://api.obanana.com/images/storage/web_images/1704437503897-Heavy Equipments.png" alt="" />
</div>
<span class="panel-overlay">
<a href="search_product_action.php?category=Heavy Equipment" class="btn btn-primary">View All</a>
@ -853,7 +853,7 @@ if ($_SESSION["userId"] <> "") {
<div class="ec-fs-pro-inner">
<div class="ec-fs-pro-image-outer col-lg-6 col-md-6 col-sm-6">
<div class="ec-fs-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image"><img class="main-image" src="assets/images/product-image/1_1.jpg" alt="Product" /></a>
<a href="shop-left-sidebar-col-4.php" class="image"><img loading="lazy" class="main-image" src="assets/images/product-image/1_1.jpg" alt="Product" /></a>
<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>
</div>
@ -892,7 +892,7 @@ if ($_SESSION["userId"] <> "") {
<div class="ec-fs-pro-inner">
<div class="ec-fs-pro-image-outer col-lg-6 col-md-6 col-sm-6">
<div class="ec-fs-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image"><img class="main-image" src="assets/images/product-image/3_1.jpg" alt="Product" /></a>
<a href="shop-left-sidebar-col-4.php" class="image"><img loading="lazy" class="main-image" src="assets/images/product-image/3_1.jpg" alt="Product" /></a>
<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>
</div>
@ -944,7 +944,7 @@ if ($_SESSION["userId"] <> "") {
<div class="ec-fs-pro-inner">
<div class="ec-fs-pro-image-outer col-lg-6 col-md-6 col-sm-6">
<div class="ec-fs-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image"><img class="main-image" src="assets/images/product-image/8_1.jpg" alt="Product" /></a>
<a href="shop-left-sidebar-col-4.php" class="image"><img loading="lazy" class="main-image" src="assets/images/product-image/8_1.jpg" alt="Product" /></a>
<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>
</div>
@ -982,7 +982,7 @@ if ($_SESSION["userId"] <> "") {
<div class="ec-fs-pro-inner">
<div class="ec-fs-pro-image-outer col-lg-6 col-md-6 col-sm-6">
<div class="ec-fs-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image"><img class="main-image" src="assets/images/product-image/10_1.jpg" alt="Product" /></a>
<a href="shop-left-sidebar-col-4.php" class="image"><img loading="lazy" class="main-image" src="assets/images/product-image/10_1.jpg" alt="Product" /></a>
<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>
</div>
@ -1060,18 +1060,18 @@ if ($_SESSION["userId"] <> "") {
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img src="<?php echo $vendor['vendor_image']; ?>" alt="vendor img" style="width: 100%; height: 100%; object-fit: cover;" />
<img loading="lazy" src="<?php echo $vendor['vendor_image']; ?>" alt="vendor img" style="width: 100%; height: 100%; object-fit: cover;" />
<?php
}
} else {
?>
<img alt="vendor img" style="width: 100%; height: 100%; object-fit: cover;" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" />
<img loading="lazy" alt="vendor img" style="width: 100%; height: 100%; object-fit: cover;" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" />
<?php
}
?>
<!-- <img src="<?php echo $vendor['vendor_image']; ?>" alt="vendor img" style="width: 100%; height: 100%; object-fit: cover;"> -->
<!-- <img loading="lazy" src="<?php echo $vendor['vendor_image']; ?>" alt="vendor img" style="width: 100%; height: 100%; object-fit: cover;"> -->
<!-- <img alt="vendor img" style="width: 100%; height: 100%; object-fit: cover;" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" /> -->
<!-- <img loading="lazy" alt="vendor img" style="width: 100%; height: 100%; object-fit: cover;" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" /> -->
</div>
<div class="ec-vendor-info">
@ -1102,7 +1102,7 @@ if ($_SESSION["userId"] <> "") {
<!-- raymart added style feb 26 2024 -->
<div class="ec-prod-img" style="max-width: 140px; height: 150px;">
<!-- <div class="ec-prod-img"> -->
<a href="product-left-sidebar.php?id=<?php echo $product["_id"]; ?>"><img src="<?php echo $product['product_image']; ?>" alt="product img"></a>
<a href="product-left-sidebar.php?id=<?php echo $product["_id"]; ?>"><img loading="lazy" src="<?php echo $product['product_image']; ?>" alt="product img"></a>
</div>
<?php } ?>
</div>
@ -1180,7 +1180,7 @@ if ($_SESSION["userId"] <> "") {
<div class="col-xl-6 col-lg-7 col-md-7 col-sm-7 align-self-center ec-offer-content">
<h2 class="ec-offer-title">Sunglasses</h2>
<h3 class="ec-offer-stitle" data-animation="slideInDown">Super Offer</h3>
<span class="ec-offer-img" data-animation="zoomIn"><img src="assets/images/offer-image/1.png" alt="offer image" /></span>
<span class="ec-offer-img" data-animation="zoomIn"><img loading="lazy" src="assets/images/offer-image/1.png" alt="offer image" /></span>
<span class="ec-offer-desc">Acetate Frame Sunglasses</span>
<span class="ec-offer-price">$40.00 Only</span>
<a class="btn btn-primary" href="shop-left-sidebar-col-4.php" data-animation="zoomIn">Shop Now</a>
@ -1189,7 +1189,7 @@ if ($_SESSION["userId"] <> "") {
</div>
</section> -->
<section class="section section-space-p section-space-m" style="display: flex; align-items: center; justify-content: center; position: relative;">
<img src="https://api.obanana.com/images/storage/web_images/1706766307254-Powerbank Collection Banner (1).png" alt="" style="width: 100%; height: 100%; object-fit: cover;" />
<img loading="lazy" src="https://api.obanana.com/images/storage/web_images/1706766307254-Powerbank Collection Banner (1).png" alt="" style="width: 100%; height: 100%; object-fit: cover;" />
<a href="search_product_action.php?category=Powerbank" class="btn btn-primary" style="position: absolute; z-index: 1; top: 15%; left: 3%;">Buy Now</a>
</section>
@ -1242,19 +1242,19 @@ if ($_SESSION["userId"] <> "") {
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img 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: 280px;" />
<?php
}
} else {
?>
<img class="hover-image" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" alt="edit" />
<img loading="lazy" class="hover-image" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" alt="edit" />
<?php
}
?>
</a>
<!-- <a href="product-left-sidebar.php?id=<?php echo $newArrival[$pid]["_id"]; ?>" class="image">
<img class="main-image" src="<?php echo $newArrival[$pid]["product_image"] ?>" alt="Product" />
<img class="hover-image" src="<?php echo $newArrival[$pid]["product_image"] ?>" alt="Product" />
<img loading="lazy" class="main-image" src="<?php echo $newArrival[$pid]["product_image"] ?>" alt="Product" />
<img loading="lazy" class="hover-image" src="<?php echo $newArrival[$pid]["product_image"] ?>" alt="Product" />
</a> -->
<!-- raymart edit action feb 14 2024 -->
<div class="ec-pro-actions"style="bottom: -36px;">
@ -1358,7 +1358,7 @@ if ($_SESSION["userId"] <> "") {
<li class="ec-test-item">
<i class="fi-rr-quote-right top"></i>
<div class="ec-test-inner">
<div class="ec-test-img"><img alt="testimonial" title="testimonial" src="assets/images/testimonial/1.jpg" /></div>
<div class="ec-test-img"><img loading="lazy" alt="testimonial" title="testimonial" src="assets/images/testimonial/1.jpg" /></div>
<div class="ec-test-content">
<div class="ec-test-desc">Lorem Ipsum is simply dummy text of the printing and
typesetting industry. Lorem Ipsum has been the industry's standard dummy text
@ -1380,7 +1380,7 @@ if ($_SESSION["userId"] <> "") {
<li class="ec-test-item ">
<i class="fi-rr-quote-right top"></i>
<div class="ec-test-inner">
<div class="ec-test-img"><img alt="testimonial" title="testimonial" src="assets/images/testimonial/2.jpg" /></div>
<div class="ec-test-img"><img loading="lazy" alt="testimonial" title="testimonial" src="assets/images/testimonial/2.jpg" /></div>
<div class="ec-test-content">
<div class="ec-test-desc">Lorem Ipsum is simply dummy text of the printing and
typesetting industry. Lorem Ipsum has been the industry's standard dummy text
@ -1402,7 +1402,7 @@ if ($_SESSION["userId"] <> "") {
<li class="ec-test-item">
<i class="fi-rr-quote-right top"></i>
<div class="ec-test-inner">
<div class="ec-test-img"><img alt="testimonial" title="testimonial" src="assets/images/testimonial/3.jpg" /></div>
<div class="ec-test-img"><img loading="lazy" alt="testimonial" title="testimonial" src="assets/images/testimonial/3.jpg" /></div>
<div class="ec-test-content">
<div class="ec-test-desc">Lorem Ipsum is simply dummy text of the printing and
typesetting industry. Lorem Ipsum has been the industry's standard dummy text
@ -1436,28 +1436,28 @@ if ($_SESSION["userId"] <> "") {
<div class="ec-brand-outer">
<ul id="ec-brand-slider">
<li class="ec-brand-item" data-animation="zoomIn">
<div class="ec-brand-img"><a href="#"><img alt="brand" title="brand" src="assets/images/brand-image/1.png" /></a></div>
<div class="ec-brand-img"><a href="#"><img loading="lazy" alt="brand" title="brand" src="assets/images/brand-image/1.png" /></a></div>
</li>
<li class="ec-brand-item" data-animation="zoomIn">
<div class="ec-brand-img"><a href="#"><img alt="brand" title="brand" src="assets/images/brand-image/2.png" /></a></div>
<div class="ec-brand-img"><a href="#"><img loading="lazy" alt="brand" title="brand" src="assets/images/brand-image/2.png" /></a></div>
</li>
<li class="ec-brand-item" data-animation="zoomIn">
<div class="ec-brand-img"><a href="#"><img alt="brand" title="brand" src="assets/images/brand-image/3.png" /></a></div>
<div class="ec-brand-img"><a href="#"><img loading="lazy" alt="brand" title="brand" src="assets/images/brand-image/3.png" /></a></div>
</li>
<li class="ec-brand-item" data-animation="zoomIn">
<div class="ec-brand-img"><a href="#"><img alt="brand" title="brand" src="assets/images/brand-image/4.png" /></a></div>
<div class="ec-brand-img"><a href="#"><img loading="lazy" alt="brand" title="brand" src="assets/images/brand-image/4.png" /></a></div>
</li>
<li class="ec-brand-item" data-animation="zoomIn">
<div class="ec-brand-img"><a href="#"><img alt="brand" title="brand" src="assets/images/brand-image/5.png" /></a></div>
<div class="ec-brand-img"><a href="#"><img loading="lazy" alt="brand" title="brand" src="assets/images/brand-image/5.png" /></a></div>
</li>
<li class="ec-brand-item" data-animation="zoomIn">
<div class="ec-brand-img"><a href="#"><img alt="brand" title="brand" src="assets/images/brand-image/6.png" /></a></div>
<div class="ec-brand-img"><a href="#"><img loading="lazy" alt="brand" title="brand" src="assets/images/brand-image/6.png" /></a></div>
</li>
<li class="ec-brand-item" data-animation="zoomIn">
<div class="ec-brand-img"><a href="#"><img alt="brand" title="brand" src="assets/images/brand-image/7.png" /></a></div>
<div class="ec-brand-img"><a href="#"><img loading="lazy" alt="brand" title="brand" src="assets/images/brand-image/7.png" /></a></div>
</li>
<li class="ec-brand-item" data-animation="zoomIn">
<div class="ec-brand-img"><a href="#"><img alt="brand" title="brand" src="assets/images/brand-image/8.png" /></a></div>
<div class="ec-brand-img"><a href="#"><img loading="lazy" alt="brand" title="brand" src="assets/images/brand-image/8.png" /></a></div>
</li>
</ul>
</div>
@ -1486,46 +1486,46 @@ if ($_SESSION["userId"] <> "") {
<!-- instagram item -->
<!-- <div class="ec-insta-item">
<div class="ec-insta-inner">
<a href="#" target="_blank"><img src="assets/images/instragram-image/1.jpg" alt="insta"></a>
<a href="#" target="_blank"><img loading="lazy" src="assets/images/instragram-image/1.jpg" alt="insta"></a>
</div>
</div> -->
<!-- instagram item -->
<!-- <div class="ec-insta-item">
<div class="ec-insta-inner">
<a href="#" target="_blank"><img src="assets/images/instragram-image/2.jpg" alt="insta"></a>
<a href="#" target="_blank"><img loading="lazy" src="assets/images/instragram-image/2.jpg" alt="insta"></a>
</div>
</div> -->
<!-- instagram item -->
<!-- <div class="ec-insta-item">
<div class="ec-insta-inner">
<a href="#" target="_blank"><img src="assets/images/instragram-image/3.jpg" alt="insta"></a>
<a href="#" target="_blank"><img loading="lazy" src="assets/images/instragram-image/3.jpg" alt="insta"></a>
</div>
</div> -->
<!-- instagram item -->
<!-- <div class="ec-insta-item">
<div class="ec-insta-inner">
<a href="#" target="_blank"><img src="assets/images/instragram-image/4.jpg" alt="insta"></a>
<a href="#" target="_blank"><img loading="lazy" src="assets/images/instragram-image/4.jpg" alt="insta"></a>
</div>
</div> -->
<!-- instagram item -->
<!-- instagram item -->
<!-- <div class="ec-insta-item">
<div class="ec-insta-inner">
<a href="#" target="_blank"><img src="assets/images/instragram-image/5.jpg" alt="insta"></a>
<a href="#" target="_blank"><img loading="lazy" src="assets/images/instragram-image/5.jpg" alt="insta"></a>
</div>
</div> -->
<!-- instagram item -->
<!-- instagram item -->
<!-- <div class="ec-insta-item">
<div class="ec-insta-inner">
<a href="#" target="_blank"><img src="assets/images/instragram-image/6.jpg" alt="insta"></a>
<a href="#" target="_blank"><img loading="lazy" src="assets/images/instragram-image/6.jpg" alt="insta"></a>
</div>
</div> -->
<!-- instagram item -->
<!-- instagram item -->
<!-- <div class="ec-insta-item">
<div class="ec-insta-inner">
<a href="#" target="_blank"><img src="assets/images/instragram-image/7.jpg" alt="insta"></a>
<a href="#" target="_blank"><img loading="lazy" src="assets/images/instragram-image/7.jpg" alt="insta"></a>
</div>
</div> -->
<!-- instagram item -->
@ -1549,36 +1549,36 @@ if ($_SESSION["userId"] <> "") {
<!-- Swiper -->
<div class="qty-product-cover">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
<div class="qty-nav-thumb">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
</div>
@ -1650,7 +1650,7 @@ if ($_SESSION["userId"] <> "") {
<div id="ec-popnews-close"><i class="ecicon eci-close"></i></div>
<div class="row">
<div class="col-md-6 disp-no-767">
<img src="../assets/images/img-1.png" alt="newsletter">
<img loading="lazy" src="../assets/images/img-1.png" alt="newsletter">
</div>
<div class="col-md-6">
<div id="ec-popnews-box-content">
@ -1658,10 +1658,10 @@ if ($_SESSION["userId"] <> "") {
<p>Enjoy promos, discounts and more when you download, register and pay with ObananaPay.</p>
<div class="obpay-download">
<a href="https://play.google.com/store/apps/details?id=com.obanana.pay2" target="_blank">
<img src="../assets/images/Playstore.jpg" alt="newsletter" style="object-fit:cover; height:45px; width:110px;">
<img loading="lazy" src="../assets/images/Playstore.jpg" alt="newsletter" style="object-fit:cover; height:45px; width:110px;">
</a>
<a href="https://apps.apple.com/ph/app/obananapay/id6447606481" target="_blank">
<img src="../assets/images/Appstore.jpg" alt="newsletter" style="object-fit:cover; height:45px; width:110px;">
<img loading="lazy" src="../assets/images/Appstore.jpg" alt="newsletter" style="object-fit:cover; height:45px; width:110px;">
</a>
</div>
@ -1697,7 +1697,7 @@ if ($_SESSION["userId"] <> "") {
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -1735,7 +1735,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1757,7 +1757,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1779,7 +1779,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1801,7 +1801,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1825,7 +1825,7 @@ if ($_SESSION["userId"] <> "") {
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon">
</div>
</div>
</div>
@ -1840,7 +1840,7 @@ if ($_SESSION["userId"] <> "") {
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png">
<img loading="lazy" alt="icon" src="assets/images/common/settings.png">
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -59,7 +59,7 @@
</div>
<ul class="eccart-pro-items">
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/6_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">T-shirt For Women</a>
@ -71,7 +71,7 @@
</div>
</li>
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/12_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">Women Leather Shoes</a>
@ -83,7 +83,7 @@
</div>
</li>
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/3_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">Girls Nylon Purse</a>
@ -235,7 +235,7 @@
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -274,7 +274,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon"></span>
</div>
@ -298,7 +298,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
@ -322,7 +322,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
@ -346,7 +346,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
@ -371,7 +371,7 @@
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -386,7 +386,7 @@
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -1,5 +1,7 @@
<?php
include "functions.php";
include "../";
$url = $_SESSION["url"];
$_SESSION["email"] = $_POST["name"];
@ -19,7 +21,13 @@
if ($result > 0) {
$_SESSION["isVendor"] = true;
}
header("location: $url");
if ($url == "/forgot_password.php" || $url == "/forget_otp.php")
{
header("location: index.php");
}else {
header("location: $url");
}
} else {
// $_SESSION["loginError"] = "Invalid email or password. Please try again.";
header("location: login.php?error=1");

View File

@ -148,9 +148,9 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<div class="vendor-info" style="display: flex; align-items: center;">
<div class="ec-catalog-vendor" style="display: inline-block;">
<?php if (isset($vendor['vendor_image'])) : ?>
<img src="<?php echo $vendor['vendor_image']; ?>" alt="<?php echo $vendor['user_login']; ?>" class="vendor-image" style="max-width: 100px; max-height: 100px;">
<img loading="lazy" src="<?php echo $vendor['vendor_image']; ?>" alt="<?php echo $vendor['user_login']; ?>" class="vendor-image" style="max-width: 100px; max-height: 100px;">
<?php else : ?>
<img src="https://api.obanana.com/images/storage/web_images/1708588564876-viber_image_2024-02-22_15-54-42-498.png" class="vendor-image-placeholder" style="max-width: 100px; max-height: 100px;">
<img loading="lazy" src="https://api.obanana.com/images/storage/web_images/1708588564876-viber_image_2024-02-22_15-54-42-498.png" class="vendor-image-placeholder" style="max-width: 100px; max-height: 100px;">
<?php endif; ?>
</div>
<div class="vendor-details" style="display: inline-block;">
@ -232,7 +232,7 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<!-- Recent Purchase Popup -->
<div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -270,7 +270,7 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -292,7 +292,7 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -314,7 +314,7 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -336,7 +336,7 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -360,7 +360,7 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -375,7 +375,7 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -70,21 +70,34 @@ if ($_SESSION["userId"] <> "") {
</style>
<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;
}
});
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;
}
}
};
xhr.send();
}
function updateWishItemCount() {
$.get("wishlistitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data) {
if (data != "") {
document.getElementById("wishItemCount").innerHTML = data;
}
});
function updateWishItemCount() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "wishlistitems.php?id=<?php echo $_SESSION['customerId']; ?>", true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
var data = xhr.responseText;
if (data !== "") {
document.getElementById("wishItemCount").innerHTML = data;
}
}
};
xhr.send();
}
</script>
</head>
@ -112,7 +125,7 @@ if ($_SESSION["userId"] <> "") {
<!-- Main slider -->
<div class="swiper-wrapper">
<div class="ec-slide-item swiper-slide d-flex ec-slide-1">
<img src="https://api.obanana.com/images/storage/web_images/1708068709103-0-02-06-f2fd3afbfa98cf9fcb81bce9df0691a06bb004b883d08ef2e80c4a3bdaf17f8f_1c6db9236e4582.jpg" alt="" width="1920">
<img loading="lazy" src="https://api.obanana.com/images/storage/web_images/1708068709103-0-02-06-f2fd3afbfa98cf9fcb81bce9df0691a06bb004b883d08ef2e80c4a3bdaf17f8f_1c6db9236e4582.jpg" alt="" width="1920">
<div class="container align-self-center">
<div class="row">
<div class="col-xl-6 col-lg-7 col-md-7 col-sm-7 align-self-center">
@ -144,7 +157,7 @@ if ($_SESSION["userId"] <> "") {
<div class="row">
<div class="col-lg-6 col-md-12">
<div class="ec-cat-bnr">
<a href="shop-left-sidebar-col-4.php"><span><img src="https://api.obanana.com/images/storage/web_images/1708412192539-NEXT%20DAY%20delivery.png" alt=""></span></a>
<span><img loading="lazy" src="https://api.obanana.com/images/storage/web_images/1708412192539-NEXT%20DAY%20delivery.png" alt=""></span>
</div>
</div>
<div class="col-lg-6 col-md-12">
@ -177,7 +190,7 @@ if ($_SESSION["userId"] <> "") {
</div>
</div>
<div class="col-md-6 ec-sort-select">
<span class="sort-by">Sort by</span>
<!-- <span class="sort-by">Sort by</span>
<div class="ec-select-inner">
<select name="ec-select" id="ec-select">
<option selected disabled>Position</option>
@ -187,7 +200,7 @@ if ($_SESSION["userId"] <> "") {
<option value="4">Price, low to high</option>
<option value="5">Price, high to low</option>
</select>
</div>
</div> -->
</div>
</div>
<!-- Shop Top End -->
@ -196,150 +209,347 @@ if ($_SESSION["userId"] <> "") {
<!-- 02-19-2024 Jun Jihad Same Day Delivery page -->
<div class="shop-pro-content">
<div class="shop-pro-inner">
<div class="row">
<?php
$simpleProducts = sddProducts();
$productsPerPage = 8;
$currentPage = isset($_GET['page']) ? $_GET['page'] : 1;
$startIndex = ($currentPage - 1) * $productsPerPage;
$endIndex = $startIndex + $productsPerPage - 1;
$endIndex = min($endIndex, count($simpleProducts) - 1);
for ($i = $startIndex; $i <= $endIndex; $i++) {
// $vendorOfProduct = getVendorbyId($product['vendor_api_id']);
$pid = $i;
$vendorOfProduct = getVendorbyId($simpleProducts[$pid]['vendor_api_id']);
?>
<div class="col-lg-3 col-md-6 col-sm-6 col-xs-6 mb-6 pro-gl-content">
<div class="ec-product-inner" style="width: 260px;">
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="product-left-sidebar.php?id=<?php echo $simpleProducts[$pid]["_id"]; ?>" >
<?php
if (isset($simpleProducts[$pid]['images'])) {
$image_urls = explode(',', $simpleProducts[$pid]['images']);
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 280px; width: 100%;"/>
<?php
}
} else {
?>
<img class="ec-image-preview" src="assets/images/product-image/vender-upload-preview.jpg" alt="edit" />
<?php
}
?>
<!-- <img class="main-image" src="<?php echo $simpleProducts[$pid]["images"] ?>" alt="Product" /> -->
<!-- <img class="hover-image" src="<?php echo $simpleProducts[$pid]["images"] ?>" alt="Product" /> -->
</a>
<div class="ec-pro-actions">
<button title="Add To Cart" onclick="popupAddToCart(`<?php echo htmlspecialchars(json_encode($simpleProducts[$pid]), 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($simpleProducts[$pid]), ENT_QUOTES, 'UTF-8'); ?>', '<?php echo htmlspecialchars(json_encode($customer_data), ENT_QUOTES, 'UTF-8'); ?>');"><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 $simpleProducts[$pid]["_id"]; ?>">
<?php echo $simpleProducts[$pid]["product_name"] ?></a></h5>
<!-- <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"> <?php echo $simpleProducts[$pid]["specifications"] ?></div>
<span class="ec-price">
<?php if (isset($simpleProducts[$pid]["sale_price"]) && $simpleProducts[$pid]["sale_price"] > 0) : ?>
<span class="old-price">&#8369;<?php echo number_format($simpleProducts[$pid]["regular_price"], 2, ".", ",") ?></span>
<span class="new-price">&#8369;<?php echo number_format($simpleProducts[$pid]["sale_price"], 2, ".", ",") ?></span>
<?php elseif (isset($simpleProducts[$pid]["regular_price"]) && $simpleProducts[$pid]["regular_price"] != "") : ?>
<span class="new-price">&#8369;<?php echo number_format($simpleProducts[$pid]["regular_price"], 2, ".", ",") ?></span>
<?php elseif ($simpleProducts[$pid]["regular_price"] == "" || $simpleProducts[$pid]["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">
<div class="ec-pro-color">
<span class="ec-pro-opt-label">Color</span>
<ul class="ec-opt-swatch ec-change-img">
<li class="active"><a href="#" class="ec-opt-clr-img"
data-src="assets/images/product-image/8_2.jpg"
data-src-hover="assets/images/product-image/8_2.jpg"
data-tooltip="Gray"><span
style="background-color:#e9dddd;"></span></a></li>
<li><a href="#" class="ec-opt-clr-img"
data-src="assets/images/product-image/8_3.jpg"
data-src-hover="assets/images/product-image/8_3.jpg"
data-tooltip="Orange"><span
style="background-color:#ffd5cb;"></span></a></li>
<li><a href="#" class="ec-opt-clr-img"
data-src="assets/images/product-image/8_4.jpg"
data-src-hover="assets/images/product-image/8_4.jpg"
data-tooltip="Green"><span
style="background-color:#92e4fd;"></span></a></li>
</ul>
</div>
</div> -->
</div>
</div>
</div>
<?php
}
// }
?>
</div>
<div class="row" id="product-container2">
</div>
<!-- Ec Pagination Start -->
<div class="ec-pro-pagination">
<span>Showing <?php echo $startIndex + 1; ?>-<?php echo $endIndex + 1; ?> of <?php echo count($simpleProducts); ?> item(s)</span>
<ul class="ec-pro-pagination-inner">
<div class="ec-pro-pagination" style="padding:10px">
<span class="page-indicator"></span>
<ul class="ec-pro-pagination-inner" id='prod-search-pagination'>
<?php
$totalPages = ceil(count($simpleProducts) / $productsPerPage);
$maxPaginationLinks = 5;
$startPage = max(1, $currentPage - floor($maxPaginationLinks / 2));
$endPage = min($startPage + $maxPaginationLinks - 1, $totalPages);
if ($startPage > 1) {
?>
<li><a href="?page=1">1</a></li>
<?php
if ($startPage > 2) {
?>
<li><span>...</span></li>
<?php
}
}
for ($page = $startPage; $page <= $endPage; $page++) {
$activeClass = ($page == $currentPage) ? 'active' : '';
?>
<li><a class="<?php echo $activeClass; ?>" href="?page=<?php echo $page; ?>"><?php echo $page; ?></a></li>
<?php
}
if ($endPage < $totalPages) {
if ($endPage < $totalPages - 1) {
?>
<li><span>...</span></li>
<?php
}
?>
<li><a href="?page=<?php echo $totalPages; ?>"><?php echo $totalPages; ?></a></li>
<?php
}
?>
</ul>
</div>
<!-- 02-19-2024 Jun Jihad Same Day Delivery page -->
<!-- Ec Pagination End -->
</div>
<!--Shop content End -->
</div>
<script>
// JavaScript
document.addEventListener("DOMContentLoaded", function() {
const productsPerPage = 30;
let currentPage = 1;
let page = currentPage;
loadProducts(page); // Initial load of products
// JavaScript
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;
}
// 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 !== ''){
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});
// Final filtered products
// console.log({results:filteredProducts});
let final = filteredProducts
return final;
}
function loadProducts(page,isFilter) {
// Make AJAX request to fetch products for given page
let xhr = new XMLHttpRequest();
xhr.open("GET", "https://<?php echo htmlspecialchars($_SESSION["data_endpoint"]); ?>/api/v1/products", true);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4 && xhr.status == 200) {
// Parse JSON response
let products1 = JSON.parse(xhr.responseText);
let products = products1.filter((e) => {
return e.promo[0]?.['next-day-delivery'] === "Yes" && (e.product_type === '' || e.product_type === 'simple' || e.product_type === 'variable');
});
console.log(products)
// if(isFilter===true){
var checkedCategories = getCheckedCheckboxes();
var prices = getMinMaxPrices();
// Pass the values to your filter function
products= filterFunction(checkedCategories, prices.minPrice, prices.maxPrice,products);
// }
// Construct HTML for product cards
let productContainer = document.getElementById("product-container2");
productContainer.innerHTML = ""; // Clear previous content
console.log(products)
let startIndex = (page - 1) * productsPerPage;
let endIndex = startIndex + productsPerPage - 1;
// Filter products for current page
if(products.length>0){
let productsForPage = products.slice(startIndex, endIndex + 1);
productsForPage.forEach(function(prod) {
let product = prod;
// let vendor = prod.vendor;
let vendorOfProduct = prod.vendor;
// let card = document.createElement("div");
let token ="<?php echo $_SESSION['token'] ?>";
let email ="<?php echo $_SESSION['email'] ?>";
let password ="<?php echo $_SESSION['password'] ?>";
let customer_data ='<?php echo json_encode($customer_data) ?>';
// Load product images dynamically
let imageContainer = document.createElement("div");
if (product.images && product.images.length > 0) {
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("class", "main-image");
img.setAttribute("src", firstImageUrl);
img.setAttribute("alt", "Product");
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("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");
imageContainer.appendChild(img);
}
// Create product card
let card = document.createElement("div");
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">
<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>
</div>
</div>
</div>
<div class="ec-pro-content">
<h5 class="ec-pro-title"><a href="product-left-sidebar.php?id=${product._id}" style="width: 90%; text-wrap: wrap;">${product.product_name}</a></h5>
<div class="ec-pro-list-desc">${product.product_description ??""}</div>
<span class="ec-price">
${(product.sale_price && product.sale_price > 0) ?
`<span class="old-price">&#8369;${product?.regular_price}</span>
<span class="new-price">&#8369;${product?.sale_price}</span>` : product.regular_price ?
`<span class="new-price">&#8369;${product?.regular_price}</span>`: 'inquire'
}
</span>
</div>
</div>`;
productContainer.appendChild(card);
updatePaginationUI(page, products?.length);
});
gridList()
}else{
document.getElementById("product-container2").innerHTML=`
<h6>No products available</h6>
`;
}
}
else{
document.getElementById("product-container2").innerHTML=`
<h6>No products available</h6>
`;
}
};
xhr.send();
}
function updatePaginationUI(page, totalProducts) {
let totalPages = Math.ceil(totalProducts / productsPerPage);
let paginationInner = document.getElementById("prod-search-pagination");
let paginationIndicator = document.querySelector(".page-indicator");
paginationInner.innerHTML = ""; // Clear previous pagination
let startPage = 1;
let endPage = totalPages;
const visiblePages = 5; // Number of visible page links excluding ellipses
if (totalPages > visiblePages) {
if (page <= Math.ceil(visiblePages / 2)) {
endPage = visiblePages;
} else if (page >= totalPages - Math.floor(visiblePages / 2)) {
startPage = totalPages - visiblePages + 1;
} else {
startPage = page - Math.floor(visiblePages / 2);
endPage = page + Math.ceil(visiblePages / 2) - 1;
}
}
// Display ellipsis at the beginning if necessary
if (startPage > 1) {
let li = document.createElement("li");
li.textContent = "...";
paginationInner.appendChild(li);
}
for (let i = startPage; i <= endPage; i++) {
let li = document.createElement("li");
let a = document.createElement("a");
a.setAttribute("href", "#");
a.setAttribute("data-page", i);
a.textContent = i;
if (i === page) {
a.classList.add("active");
}
li.appendChild(a);
paginationInner.appendChild(li);
}
// Display ellipsis at the end if necessary
if (endPage < totalPages) {
let li = document.createElement("li");
li.textContent = "...";
paginationInner.appendChild(li);
}
// Update pagination indicator
let startIndex = (page - 1) * productsPerPage + 1;
let endIndex = Math.min(startIndex + productsPerPage - 1, totalProducts);
paginationIndicator.textContent = " Showing " + startIndex + " to " + endIndex + " of " + totalProducts + " item(s)";
}
function getCheckedCheckboxes() {
var checkboxes = document.querySelectorAll('input[name="category[]"]:checked');
var values = [];
checkboxes.forEach(function(checkbox) {
values.push(checkbox.value.toLowerCase().trim());
});
return values;
}
// Function to get min and max prices
function getMinMaxPrices() {
var minPrice = document.getElementById('minPrice').value;
var maxPrice = document.getElementById('maxPrice').value;
return {
minPrice: minPrice,
maxPrice: maxPrice
};
}
// Function to handle form submission
function applyFilters() {
var checkedCategories = getCheckedCheckboxes();
var prices = getMinMaxPrices();
// Pass the values to your filter function
filterFunction(checkedCategories, prices.minPrice, prices.maxPrice);
}
var checkboxes = document.querySelectorAll('input[name="category[]"]');
checkboxes.forEach(function(checkbox) {
checkbox.addEventListener('change', function() {
loadProducts(1, true);
});
});
function gridList(e) {
console.log("hereeeee")
var $gridCont = $('.shop-pro-inner');
var $gridView = $('.pro-gl-content');
// e.preventDefault();
$gridCont.removeClass('list-view');
$gridView.removeClass('width-100');
}
// Listen for changes in min and max price inputs
var minPriceInput = document.getElementById('minPrice');
minPriceInput.addEventListener('input', function() {
loadProducts(1, true);
});
var maxPriceInput = document.getElementById('maxPrice');
maxPriceInput.addEventListener('input', function() {
loadProducts(1, true);
});
document.getElementById("prod-search-pagination").addEventListener("click", function(event) {
if (event.target.tagName.toLowerCase() === "a") {
event.preventDefault(); // Prevent default link behavior
let page = parseInt(event.target.getAttribute("data-page"));
currentPage = page;
loadProducts(page,false);
// Scroll to top
window.scrollTo({
top: 0,
behavior: "smooth" // Optional smooth scrolling behavior
});
}
});
// Load initial products on page load
loadProducts(currentPage);
// Attach click event listeners to pagination links
// document.getElementById("pagination-container").addEventListener("click", function(event) {
// if (event.target.tagName.toLowerCase() === "a") {
// event.preventDefault(); // Prevent default link behavior
// let page = event.target.getAttribute("data-page");
// loadProducts(page); // Load products for the clicked page
// }
// });
// // Attach event listener to search form or button
// document.getElementById("search-form").addEventListener("submit", function(event) {
// event.preventDefault(); // Prevent default form submission
// let searchQuery = document.getElementById("search-input").value;
// console.log(searchQuery + " search clicked");
// // Make AJAX request to fetch products based on search query
// // You need to implement this part in a similar way to loading products
// });
});
</script>
<!-- Sidebar Area Start -->
<div class="filter-sidebar-overlay"></div>
<div class="ec-shop-leftside filter-sidebar">
@ -354,68 +564,143 @@ if ($_SESSION["userId"] <> "") {
<h3 class="ec-sidebar-title">Category</h3>
</div>
<div class="ec-sb-block-content">
<ul>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" checked /> <a href="#">clothes</a><span
class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" /> <a href="#">Bags</a><span class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" /> <a href="#">Shoes</a><span class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" /> <a href="#">cosmetics</a><span
class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" /> <a href="#">electrics</a><span
class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" /> <a href="#">phone</a><span class="checked"></span>
</div>
</li>
<li id="ec-more-toggle-content" style="padding: 0; display: none;">
<form method="POST" action="shop-list-left-sidebar-action.php">
<ul>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" /> <a href="#">Watch</a><span
class="checked"></span>
<input type="checkbox" name="category[]" value="Electronics" <?php echo (isset($_POST['category']) && in_array('Electronics', $_POST['category'])) || (isset($_GET['category']) && in_array('Electronics', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Electronics</a><span class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" /> <a href="#">Cap</a><span
class="checked"></span>
<input type="checkbox" name="category[]" value="Solar" <?php echo (isset($_POST['category']) && in_array('Solar', $_POST['category'])) || (isset($_GET['category']) && in_array('Solar', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Solar</a><span class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" name="category[]" value="E-bike" <?php echo (isset($_POST['category']) && in_array('E-bike', $_POST['category'])) || (isset($_GET['category']) && in_array('E-bike', $_GET['category'])) ? 'checked' : ''; ?> /> <a>E-bike</a><span class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" name="category[]" value="E-vehicle" <?php echo (isset($_POST['category']) && in_array('E-vehicle', $_POST['category'])) || (isset($_GET['category']) && in_array('E-vehicle', $_GET['category'])) ? 'checked' : ''; ?> /> <a>E-vehicle</a><span class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" name="category[]" value="Appliance" <?php echo (isset($_POST['category']) && in_array('Appliance', $_POST['category'])) || (isset($_GET['category']) && in_array('Appliance', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Appliance</a><span class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" name="category[]" value="Smart Home" <?php echo (isset($_POST['category']) && in_array('Smart Home', $_POST['category'])) || (isset($_GET['category']) && in_array('Smart Home', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Smart Home</a><span class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" name="category[]" value="Home" <?php echo (isset($_POST['category']) && in_array('Home', $_POST['category'])) || (isset($_GET['category']) && in_array('Home', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Home</a><span class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" name="category[]" value="Apparel" <?php echo (isset($_POST['category']) && in_array('Apparel', $_POST['category'])) || (isset($_GET['category']) && in_array('Apparel', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Apparel</a><span class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" name="category[]" value="Heavy Equipment" <?php echo (isset($_POST['category']) && in_array('Heavy Equipment', $_POST['category'])) || (isset($_GET['category']) && in_array('Heavy Equipment', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Heavy Equipment</a><span class="checked"></span>
</div>
</li>
<li>
<div style="padding-top:10px;">
<label for="minPrice" style="margin-bottom:-5px;">Min Price:</label>
<input style="height:40px" type="number" name="minPrice" id="minPrice" />
<!-- <input style="height:40px" type="number" name="minPrice" id="minPrice" value="<?php echo isset($_POST['minPrice']) ? $_POST['minPrice'] : (isset($_GET['minPrice']) ? $_GET['minPrice'] : ''); ?>" /> -->
</div>
</li>
<li>
<div>
<label for="maxPrice" style="margin-bottom:-5px;">Max Price:</label>
<input style="height:40px" type="number" name="maxPrice" id="maxPrice" />
<!-- <input style="height:40px" type="number" name="maxPrice" id="maxPrice" value="<?php echo isset($_POST['maxPrice']) ? $_POST['maxPrice'] : (isset($_GET['maxPrice']) ? $_GET['maxPrice'] : ''); ?>" /> -->
</div>
</li>
<!-- <li>
<div style="padding-top:10px;">
<button style="font-size:12px; height:30px; width:60px;" class="btn-primary" type="submit">Apply</button>
</div>
</li> -->
</ul>
<!-- <button type="submit">Apply</button> -->
</form>
<!-- <form method="POST" action="<?php echo $_SERVER['PHP_SELF'] . '?' . http_build_query(array_merge($_GET, $_POST)); ?>">
<ul>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" name="category[]" value="Electronics" <?php echo (isset($_POST['category']) && in_array('Electronics', $_POST['category'])) ? 'checked' : ''; ?> /> <a>Electronics</a><span class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" name="category[]" value="Solar" <?php echo (isset($_POST['category']) && in_array('Solar', $_POST['category'])) ? 'checked' : ''; ?> /> <a>Solar</a><span class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" name="category[]" value="E-bike" <?php echo (isset($_POST['category']) && in_array('E-bike', $_POST['category'])) ? 'checked' : ''; ?> /> <a>E-bike</a><span class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" name="category[]" value="E-vehicle" <?php echo (isset($_POST['category']) && in_array('E-vehicle', $_POST['category'])) ? 'checked' : ''; ?> /> <a>E-vehicle</a><span class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" name="category[]" value="Appliance" <?php echo (isset($_POST['category']) && in_array('Appliance', $_POST['category'])) ? 'checked' : ''; ?> /> <a>Appliance</a><span class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" name="category[]" value="Smart Home" <?php echo (isset($_POST['category']) && in_array('Smart Home', $_POST['category'])) ? 'checked' : ''; ?> /> <a>Smart Home</a><span class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" name="category[]" value="Home" <?php echo (isset($_POST['category']) && in_array('Home', $_POST['category'])) ? 'checked' : ''; ?> /> <a>Home</a><span class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" name="category[]" value="Heavy Equipment" <?php echo (isset($_POST['category']) && in_array('Heavy Equipment', $_POST['category'])) ? 'checked' : ''; ?> /> <a>Heavy Equipment</a><span class="checked"></span>
</div>
</li>
<li>
<div>
<label for="minPrice">Min Price:</label>
<input type="number" name="minPrice" id="minPrice" value="<?php echo isset($_POST['minPrice']) ? $_POST['minPrice'] : (isset($_GET['minPrice']) ? $_GET['minPrice'] : ''); ?>" />
</div>
</li>
<li>
<div>
<label for="maxPrice">Max Price:</label>
<input type="number" name="maxPrice" id="maxPrice" value="<?php echo isset($_POST['maxPrice']) ? $_POST['maxPrice'] : (isset($_GET['maxPrice']) ? $_GET['maxPrice'] : ''); ?>" />
</div>
</li>
</ul>
</li>
<li>
<div class="ec-sidebar-block-item ec-more-toggle">
<span class="checked"></span><span id="ec-more-toggle">More
Categories</span>
</div>
</li>
<button type="submit">Apply</button>
</form> -->
</ul>
</div>
</div>
</div>
<!-- Sidebar Size Block -->
<div class="ec-sidebar-block">
<!-- <div class="ec-sidebar-block">
<div class="ec-sb-title">
<h3 class="ec-sidebar-title">Size</h3>
</div>
@ -453,9 +738,9 @@ if ($_SESSION["userId"] <> "") {
</li>
</ul>
</div>
</div>
</div> -->
<!-- Sidebar Color item -->
<div class="ec-sidebar-block ec-sidebar-block-clr">
<!-- <div class="ec-sidebar-block ec-sidebar-block-clr">
<div class="ec-sb-title">
<h3 class="ec-sidebar-title">Color</h3>
</div>
@ -503,9 +788,9 @@ if ($_SESSION["userId"] <> "") {
</li>
</ul>
</div>
</div>
</div> -->
<!-- Sidebar Price Block -->
<div class="ec-sidebar-block">
<!-- <div class="ec-sidebar-block">
<div class="ec-sb-title">
<h3 class="ec-sidebar-title">Price</h3>
</div>
@ -520,7 +805,7 @@ if ($_SESSION["userId"] <> "") {
</div>
</div>
</div>
</div>
</div> -->
</div>
</div>
@ -541,36 +826,36 @@ if ($_SESSION["userId"] <> "") {
<!-- Swiper -->
<div class="qty-product-cover">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
<div class="qty-nav-thumb">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
</div>
@ -668,7 +953,7 @@ if ($_SESSION["userId"] <> "") {
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -707,7 +992,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon"></span>
</div>
@ -731,7 +1016,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
@ -755,7 +1040,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
@ -779,7 +1064,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
@ -804,7 +1089,7 @@ if ($_SESSION["userId"] <> "") {
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -819,7 +1104,7 @@ if ($_SESSION["userId"] <> "") {
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -115,7 +115,7 @@ if ($_SESSION["userId"] <> "") {
<section class="labels section-space-p">
<div class="container">
<div class="row">
<img src="./assets/images/comingsoon.png" alt="">
<img loading="lazy" src="./assets/images/comingsoon.png" alt="">
</div>
</div>
</section>
@ -135,7 +135,7 @@ if ($_SESSION["userId"] <> "") {
<div class="col-lg-4 col-md-6 col-sm-12 col-12 margin-b-30">
<div class="ec-offer-coupon">
<div class="ec-cpn-brand">
<img class="ec-brand-img" src="assets/images/offer-image/2.jpg" alt="" />
<img loading="lazy" class="ec-brand-img" src="assets/images/offer-image/2.jpg" alt="" />
</div>
<div class="ec-cpn-title">
<h2 class="coupon-title">Get 15% off on branded Shoes</h2>
@ -152,7 +152,7 @@ if ($_SESSION["userId"] <> "") {
<div class="col-lg-4 col-md-6 col-sm-12 col-12 margin-b-30">
<div class="ec-offer-coupon">
<div class="ec-cpn-brand">
<img class="ec-brand-img" src="assets/images/offer-image/3.jpg" alt="" />
<img loading="lazy" class="ec-brand-img" src="assets/images/offer-image/3.jpg" alt="" />
</div>
<div class="ec-cpn-title">
<h2 class="coupon-title">Get 30% off on branded chair</h2>
@ -169,7 +169,7 @@ if ($_SESSION["userId"] <> "") {
<div class="col-lg-4 col-md-6 col-sm-12 col-12 m-auto">
<div class="ec-offer-coupon">
<div class="ec-cpn-brand">
<img class="ec-brand-img" src="assets/images/offer-image/4.jpg" alt="" />
<img loading="lazy" class="ec-brand-img" src="assets/images/offer-image/4.jpg" alt="" />
</div>
<div class="ec-cpn-title">
<h2 class="coupon-title">Get 50% off on branded Hand Bags</h2>
@ -251,7 +251,7 @@ if ($_SESSION["userId"] <> "") {
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -289,7 +289,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -311,7 +311,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -333,7 +333,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -355,7 +355,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -379,7 +379,7 @@ if ($_SESSION["userId"] <> "") {
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -394,7 +394,7 @@ if ($_SESSION["userId"] <> "") {
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -424,7 +424,7 @@
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -462,7 +462,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -484,7 +484,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -506,7 +506,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -528,7 +528,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -552,7 +552,7 @@
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -567,7 +567,7 @@
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -80,6 +80,7 @@ if (isset($_GET['id'])) {
<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 rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- Background css -->
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
@ -216,7 +217,24 @@ if (isset($_GET['id'])) {
bottom: 0;
border-radius: 0 0 10px 10px;
}
.vendor_img{
height: 45px;
width: 45px;
border-radius:50px;
border: 1px solid #ccc;
object-fit:cover
}
.vendor_wrap{
display:flex;
flex-direction: row;
align-items: center;
}
.vendor_details{
padding:10px
}
.seller-header{
font-weight:500;
}
/* 02-21-2024 Stacy added css for addtocart & wishlist */
</style>
</head>
@ -300,7 +318,7 @@ if (isset($_GET['id'])) {
?>
<div class="single-slide zoom-image-hover" style="width: 100%; height: 500px; border: 1px solid #ddd; text-align: center; overflow: hidden;">
<?php
$placeholderImage = 'https://upload.wikimedia.org/wikipedia/commons/6/65/No-Image-Placeholder.svg';
$placeholderImage = 'https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png';
if (!isset($product_details["images"]) or $product_details["images"] == "") {
$productImage = $placeholderImage;
} else {
@ -319,14 +337,14 @@ if (isset($_GET['id'])) {
?>
<div class="single-slides">
<?php
$placeholderImage = 'https://upload.wikimedia.org/wikipedia/commons/6/65/No-Image-Placeholder.svg';
$placeholderImage = 'https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png';
if (!isset($product_details["images"]) or $product_details["images"] == "") {
$productImage = $placeholderImage;
} else {
$productImage = $i;
}
?>
<!-- <img class="img-responsive" src="<?php #echo $productImage;
<!-- <img loading="lazy" class="img-responsive" src="<?php #echo $productImage;
?>" alt="" style="width: 100%; height: 100%; object-fit: cover; object-position: center center;"> -->
<!-- 02-26-2024 Stacy updated img width & height -->
<img class="img-responsive" src="<?php echo $productImage; ?>" alt="" style="max/width: 90px; height: 120px; object-fit: cover; object-position: center center;">
@ -395,6 +413,27 @@ if (isset($_GET['id'])) {
<div class="ec-single-stoke">
<span class="ec-single-ps-title">Stocks Available</span>
<span class="ec-single-sku" id="productStock"><?php echo $product_details['stock']; ?></span>
</div>
</div>
<div class="ec-single-price-stoke">
<div class="ec-single-price">
<span class="ec-single-ps-title seller-header">Seller information</span>
<div class="vendor_wrap">
<img loading="lazy" class="vendor_img img-responsive" src="<?php echo isset( $vendor_details['vendor_image']) ?$vendor_details['vendor_image'] :'https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png'; ?>" alt="">
<div class="vendor_details">
<h6>
<?php echo $vendor_details['user_login']; ?>
</h6>
</div>
</div>
</div>
<div class="ec-single-stoke">
<a href="catalog-single-vendor.php?id=<?php echo $vendor_details['_id'] ?>" >
<span class="ec-single-ps-title" style="color:#ffaa00; font-weight:500; font-size:13px">Visit Seller <i class="fa-solid fa-arrow-right" style="color:#ffaa00"></i></span>
</a>
<!-- <span class="ec-single-sku" id="productStock"><?php echo $product_details['stock']; ?></span> -->
</div>
</div>
@ -407,8 +446,19 @@ if (isset($_GET['id'])) {
<span>VARIATION</span>
<div class="ec-pro-variation-content">
<ul class="eccart-pro-items">
<!-- <?php
$main_product_image = isset($product_details["images"]) ? $product_details["images"] : 'https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png';
?>
<a href="javascript:void(0);" onclick="selectVariation(<?php // echo htmlspecialchars(json_encode($product_details), ENT_QUOTES, 'UTF-8'); ?>)">
<li style="width: 100px; height: 100px">
<img src="<?php // echo $main_product_image; ?>" alt="product">
<?php // foreach ($product_details['variables'] as $variable) { ?>
<p><?php // echo $variable['name'] . ': ' . $variable['value']; ?></p>
<?php // } ?>
</li>
</a> -->
<?php
$main_product_image = isset($product_details["product_image"]) ? $product_details["product_image"] : 'https://upload.wikimedia.org/wikipedia/commons/6/65/No-Image-Placeholder.svg';
$main_product_image = isset($product_details["images"]) ? strtok($product_details["images"], ',') : 'https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png';
?>
<a href="javascript:void(0);" onclick="selectVariation(<?php echo htmlspecialchars(json_encode($product_details), ENT_QUOTES, 'UTF-8'); ?>)">
<li style="width: 100px; height: 100px">
@ -421,7 +471,7 @@ if (isset($_GET['id'])) {
<?php
foreach ($variation_details as $index => $variation) {
$variationImage = isset($variation["product_image"]) ? $variation["product_image"] : 'https://upload.wikimedia.org/wikipedia/commons/6/65/No-Image-Placeholder.svg';
$variationImage = isset($variation["images"]) ? $variation["images"] : 'https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png';
?>
<a href="javascript:void(0);" onclick="selectVariation(<?php echo htmlspecialchars(json_encode($variation), ENT_QUOTES, 'UTF-8'); ?>)">
<li style="width: 100px; height: 100px">
@ -447,10 +497,10 @@ if (isset($_GET['id'])) {
document.getElementById("shortDescription").innerHTML = variation.product_description;
document.getElementById("productTitle").innerText = variation.product_name;
document.getElementById("product_Id").value = variation._id;
var productImage = variation.product_image || 'https://upload.wikimedia.org/wikipedia/commons/6/65/No-Image-Placeholder.svg';
var productImage = variation.images ? variation.images.split(',')[0] : 'https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png';
$('.zoom-image-hover').trigger('zoom.destroy');
document.getElementById('mainProductImage').src = productImage;
$('.zoom-image-hover').zoom();
document.getElementById("productTitlemodal").innerText = variation.product_name;
document.getElementById('mainProductImagemodal').src = productImage;
@ -494,7 +544,7 @@ if (isset($_GET['id'])) {
onmouseover="this.style.color=\'#a15d00\'" onmouseout="this.style.color=\'#ffaa00\'">-</div>';
echo '<input class="qty-inputs" style="width:110px; height:40px" type="number" name="ec_qtybtn" value="';
echo (!empty($product_details['minimum_order'])) ? $product_details['minimum_order'] : "1";
echo '" id="qty-input" />';
echo '" id="qty-input" oninput="handleInput()" />';
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;"
@ -509,7 +559,7 @@ if (isset($_GET['id'])) {
onmouseover="this.style.color=\'#a15d00\'" onmouseout="this.style.color=\'#ffaa00\'">-</div>';
echo '<input class="qty-inputs" style="width:100px; height:40px" type="number" name="ec_qtybtn" value="';
echo (!empty($product_details['minimum_order'])) ? $product_details['minimum_order'] : "1";
echo '" id="qty-input" />';
echo '" id="qty-input" oninput="handleInput()" />';
echo '<div class="qty-btn" style="color:#ffaa00; font-size:25px; margin-left:5px; cursor: pointer;" onclick="increment()"
onmouseover="this.style.color=\'#a15d00\'" onmouseout="this.style.color=\'#ffaa00\'">+</div>';
echo '<div> <div id="addToCartMessage" style="padding-left:45px;"></div> <button class="btn btn-primary" id="addToCartButton" style="text-wrap:nowrap;
@ -582,7 +632,7 @@ if (isset($_GET['id'])) {
$placeholderImage = 'https://upload.wikimedia.org/wikipedia/commons/6/65/No-Image-Placeholder.svg';
$productImage = isset($product_details["product_image"]) ? $product_details["product_image"] : $placeholderImage;
?>
<img id="mainProductImagemodal" class="img-responsive" src="<?php echo $productImage; ?>" alt="" style="width: 100%; height: 100%; object-fit: cover;">
<img loading="lazy" id="mainProductImagemodal" class="img-responsive" src="<?php echo $productImage; ?>" alt="" style="width: 100%; height: 100%; object-fit: cover;">
</div>
</div>
<div class="col-md-8 col-8">
@ -1095,7 +1145,7 @@ if (isset($_GET['id'])) {
console.log(response)
newOrder.innerHTML = `
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img">
<img src="${response.items[0].product.product_image}" alt="product">
<img loading="lazy" src="${response.items[0].product.product_image}" alt="product">
</a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">${response.items[0].product.name}</a>
@ -1178,7 +1228,7 @@ if (isset($_GET['id'])) {
// If the cart item already exists, update its content using innerHTML
cartItem.innerHTML = `
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img">
<img src="${response.items[0].product.product_image}" alt="product">
<img loading="lazy" src="${response.items[0].product.product_image}" alt="product">
</a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">${response.items[0].product.name}</a>
@ -1308,7 +1358,7 @@ if (isset($_GET['id'])) {
</div>
<div id="review" class="tab-content">
<img src="https://api.obanana.com/images/storage/web_images/1705042187464-viber_image_2023-12-12_16-04-25-151.png" alt="" />
<img loading="lazy" src="https://api.obanana.com/images/storage/web_images/1705042187464-viber_image_2023-12-12_16-04-25-151.png" alt="" />
</div>
</div>
@ -1376,7 +1426,7 @@ if (isset($_GET['id'])) {
<div class="ec-t-review-wrapper">
<div class="ec-t-review-item">
<div class="ec-t-review-avtar">
<img src="assets/images/review-image/1.jpg" alt="" />
<img loading="lazy" src="assets/images/review-image/1.jpg" alt="" />
</div>
<div class="ec-t-review-content">
<div class="ec-t-review-top">
@ -1401,7 +1451,7 @@ if (isset($_GET['id'])) {
</div>
<div class="ec-t-review-item">
<div class="ec-t-review-avtar">
<img src="assets/images/review-image/2.jpg" alt="" />
<img loading="lazy" src="assets/images/review-image/2.jpg" alt="" />
</div>
<div class="ec-t-review-content">
<div class="ec-t-review-top">
@ -1694,7 +1744,7 @@ if (isset($_GET['id'])) {
$pid = rand(0, count($bestSellers) - 1);
?>
<div class="ec-sb-pro-sl-item">
<a href="product-left-sidebar.php?id=<?php echo $bestSellers[$pid]["_id"]; ?>" class="sidekka_pro_img"><img src="<?php echo $bestSellers[$pid]["product_image"] ?>" alt="product" /></a>
<a href="product-left-sidebar.php?id=<?php echo $bestSellers[$pid]["_id"]; ?>" class="sidekka_pro_img"><img loading="lazy" src="<?php echo $bestSellers[$pid]["product_image"] ?>" alt="product" /></a>
<div class="ec-pro-content">
<h5 class="ec-pro-title"><a href="product-left-sidebar.php?id=<?php echo $bestSellers[$pid]["_id"]; ?>"><?php echo $bestSellers[$pid]["product_name"] ?></a></h5>
<!-- <div class="ec-pro-rating">
@ -1764,8 +1814,8 @@ if (isset($_GET['id'])) {
<!-- <a href="shop-left-sidebar-col-4.php" class="image"> -->
<!-- 02-21-2024 Stacy changed link for image -->
<a class="image" href="product-left-sidebar.php?id=<?php echo $similar_products[$pid]["_id"] ?>">
<img class="main-image" src="<?php echo $similar_products[$pid]["product_image"] ?>" />
<img class="hover-image" src="<?php echo $similar_products[$pid]["product_image"] ?>" />
<img loading="lazy" class="main-image" src="<?php echo $similar_products[$pid]["product_image"] ?>" />
<img loading="lazy" class="hover-image" src="<?php echo $similar_products[$pid]["product_image"] ?>" />
</a>
<!-- 02-21-2024 Stacy commented out -->
<!-- <span class="percentage">20%</span> -->
@ -1882,36 +1932,36 @@ if (isset($_GET['id'])) {
<!-- Swiper -->
<div class="qty-product-cover">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
<div class="qty-nav-thumb">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
</div>
@ -2004,7 +2054,7 @@ if (isset($_GET['id'])) {
<!-- Recent Purchase Popup -->
<!-- 02-20-2024 Stacy commented out -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -2043,7 +2093,7 @@ if (isset($_GET['id'])) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -2065,7 +2115,7 @@ if (isset($_GET['id'])) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -2087,7 +2137,7 @@ if (isset($_GET['id'])) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -2109,7 +2159,7 @@ if (isset($_GET['id'])) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -2133,7 +2183,7 @@ if (isset($_GET['id'])) {
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -2148,7 +2198,7 @@ if (isset($_GET['id'])) {
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -312,7 +312,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -334,7 +334,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -356,7 +356,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -378,7 +378,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -402,7 +402,7 @@
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -417,7 +417,7 @@
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -111,10 +111,7 @@ $_SESSION["isVendor"] = false;
<label>Password*</label>
<input type="password" name="password" placeholder="Enter your password" required />
</span>
<p><input type="checkbox"> I accept this Terms & Conditions and Privacy Policy</p>
<span class="ec-login-wrap ec-login-fp">
<label><a href="#">Forgot Password?</a></label>
</span>
<p><input type="checkbox" required> I accept this Terms & Conditions and Privacy Policy </p>
<span class="ec-login-wrap ec-login-btn">
<button class="btn btn-primary" type="submit">Register</button>
</span>
@ -158,7 +155,7 @@ $_SESSION["isVendor"] = false;
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -196,7 +193,7 @@ $_SESSION["isVendor"] = false;
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -218,7 +215,7 @@ $_SESSION["isVendor"] = false;
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -240,7 +237,7 @@ $_SESSION["isVendor"] = false;
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -262,7 +259,7 @@ $_SESSION["isVendor"] = false;
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -286,7 +283,7 @@ $_SESSION["isVendor"] = false;
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -301,7 +298,7 @@ $_SESSION["isVendor"] = false;
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -192,7 +192,7 @@ $customerData = json_decode($customers, true);
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -231,7 +231,7 @@ $customerData = json_decode($customers, true);
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon"></span>
</div>
@ -255,7 +255,7 @@ $customerData = json_decode($customers, true);
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
@ -279,7 +279,7 @@ $customerData = json_decode($customers, true);
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
@ -303,7 +303,7 @@ $customerData = json_decode($customers, true);
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
@ -328,7 +328,7 @@ $customerData = json_decode($customers, true);
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -343,7 +343,7 @@ $customerData = json_decode($customers, true);
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -161,7 +161,7 @@
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -199,7 +199,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -221,7 +221,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -243,7 +243,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -265,7 +265,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -289,7 +289,7 @@
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -304,7 +304,7 @@
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -259,7 +259,7 @@ $vendorData = json_decode($vendors, true);
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -297,7 +297,7 @@ $vendorData = json_decode($vendors, true);
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -319,7 +319,7 @@ $vendorData = json_decode($vendors, true);
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -341,7 +341,7 @@ $vendorData = json_decode($vendors, true);
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -363,7 +363,7 @@ $vendorData = json_decode($vendors, true);
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -387,7 +387,7 @@ $vendorData = json_decode($vendors, true);
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -402,7 +402,7 @@ $vendorData = json_decode($vendors, true);
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -112,7 +112,7 @@ if ($_SESSION["userId"] <> "") {
<section class="labels section-space-p">
<div class="container">
<div class="row">
<img src="./assets/images/comingsoon.png" alt="">
<img loading="lazy" src="./assets/images/comingsoon.png" alt="">
</div>
</div>
</section>
@ -132,7 +132,7 @@ if ($_SESSION["userId"] <> "") {
<div class="col-lg-4 col-md-6 col-sm-12 col-12 margin-b-30">
<div class="ec-offer-coupon">
<div class="ec-cpn-brand">
<img class="ec-brand-img" src="assets/images/offer-image/2.jpg" alt="" />
<img loading="lazy" class="ec-brand-img" src="assets/images/offer-image/2.jpg" alt="" />
</div>
<div class="ec-cpn-title">
<h2 class="coupon-title">Get 15% off on branded Shoes</h2>
@ -149,7 +149,7 @@ if ($_SESSION["userId"] <> "") {
<div class="col-lg-4 col-md-6 col-sm-12 col-12 margin-b-30">
<div class="ec-offer-coupon">
<div class="ec-cpn-brand">
<img class="ec-brand-img" src="assets/images/offer-image/3.jpg" alt="" />
<img loading="lazy" class="ec-brand-img" src="assets/images/offer-image/3.jpg" alt="" />
</div>
<div class="ec-cpn-title">
<h2 class="coupon-title">Get 30% off on branded chair</h2>
@ -166,7 +166,7 @@ if ($_SESSION["userId"] <> "") {
<div class="col-lg-4 col-md-6 col-sm-12 col-12 m-auto">
<div class="ec-offer-coupon">
<div class="ec-cpn-brand">
<img class="ec-brand-img" src="assets/images/offer-image/4.jpg" alt="" />
<img loading="lazy" class="ec-brand-img" src="assets/images/offer-image/4.jpg" alt="" />
</div>
<div class="ec-cpn-title">
<h2 class="coupon-title">Get 50% off on branded Hand Bags</h2>
@ -248,7 +248,7 @@ if ($_SESSION["userId"] <> "") {
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -286,7 +286,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -308,7 +308,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -330,7 +330,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -352,7 +352,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -376,7 +376,7 @@ if ($_SESSION["userId"] <> "") {
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -391,7 +391,7 @@ if ($_SESSION["userId"] <> "") {
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -9,23 +9,25 @@
// header("location: shop-list-left-sidebar.php");
if(isset($_GET["category"])) {
$category = $_GET["category"];
// You can use $category in your searchProducts function to filter results based on the category
$result = searchProducts( $category);
// $category = $_GET["category"];
// // You can use $category in your searchProducts function to filter results based on the category
// $result = searchProducts( $category);
$search = $_GET["category"];
} else {
$result = searchProducts($_GET["searchText"]);
$result2 = searchVendor($_GET["searchText"]);
// $result = searchProducts($_GET["searchText"]);
// $result2 = searchVendor($_GET["searchText"]);
$search = $_GET["searchText"];
}
$array = json_decode($result,true);
$array2 = json_decode($result2,true);
// $array = json_decode($result,true);
// $array2 = json_decode($result2,true);
$_SESSION["productSearchResult"] = $array;
$_SESSION["vendorSearchResult"] = $array2;
// $_SESSION["productSearchResult"] = $array;
// $_SESSION["vendorSearchResult"] = $array2;
header("location: shop-list-left-sidebar.php?search=".$search);
header("location: shop-list-left-sidebar.php");
// if (isset($_GET["category"])) {

View File

@ -67,7 +67,7 @@
</div>
<ul class="eccart-pro-items">
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/6_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">T-shirt For Women</a>
@ -79,7 +79,7 @@
</div>
</li>
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/12_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">Women Leather Shoes</a>
@ -91,7 +91,7 @@
</div>
</li>
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/3_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">Girls Nylon Purse</a>
@ -194,9 +194,9 @@
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image"
<img loading="lazy" class="main-image"
src="assets/images/product-image/6_1.jpg" alt="Product" />
<img class="hover-image"
<img loading="lazy" class="hover-image"
src="assets/images/product-image/6_2.jpg" alt="Product" />
</a>
<span class="percentage">20%</span>
@ -262,9 +262,9 @@
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image"
<img loading="lazy" class="main-image"
src="assets/images/product-image/7_1.jpg" alt="Product" />
<img class="hover-image"
<img loading="lazy" class="hover-image"
src="assets/images/product-image/7_2.jpg" alt="Product" />
</a>
<span class="flags">
@ -330,9 +330,9 @@
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image"
<img loading="lazy" class="main-image"
src="assets/images/product-image/1_1.jpg" alt="Product" />
<img class="hover-image"
<img loading="lazy" class="hover-image"
src="assets/images/product-image/1_2.jpg" alt="Product" />
</a>
<a href="#" class="quickview" data-link-action="quickview"
@ -398,9 +398,9 @@
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image"
<img loading="lazy" class="main-image"
src="assets/images/product-image/2_1.jpg" alt="Product" />
<img class="hover-image"
<img loading="lazy" class="hover-image"
src="assets/images/product-image/2_2.jpg" alt="Product" />
</a>
<span class="flags">
@ -452,9 +452,9 @@
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image"
<img loading="lazy" class="main-image"
src="assets/images/product-image/3_1.jpg" alt="Product" />
<img class="hover-image"
<img loading="lazy" class="hover-image"
src="assets/images/product-image/3_2.jpg" alt="Product" />
</a>
<span class="flags">
@ -516,9 +516,9 @@
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image"
<img loading="lazy" class="main-image"
src="assets/images/product-image/4_1.jpg" alt="Product" />
<img class="hover-image"
<img loading="lazy" class="hover-image"
src="assets/images/product-image/4_2.jpg" alt="Product" />
</a>
<a href="#" class="quickview" data-link-action="quickview"
@ -578,9 +578,9 @@
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image"
<img loading="lazy" class="main-image"
src="assets/images/product-image/5_1.jpg" alt="Product" />
<img class="hover-image"
<img loading="lazy" class="hover-image"
src="assets/images/product-image/5_2.jpg" alt="Product" />
</a>
<span class="flags">
@ -645,9 +645,9 @@
<div class="ec-pro-image-outer">
<div class="ec-pro-image">
<a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image"
<img loading="lazy" class="main-image"
src="assets/images/product-image/8_1.jpg" alt="Product" />
<img class="hover-image"
<img loading="lazy" class="hover-image"
src="assets/images/product-image/8_2.jpg" alt="Product" />
</a>
<span class="percentage">20%</span>
@ -933,36 +933,36 @@
<!-- Swiper -->
<div class="qty-product-cover">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
<div class="qty-nav-thumb">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
</div>
@ -1060,7 +1060,7 @@
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -1099,7 +1099,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon"></span>
</div>
@ -1123,7 +1123,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
@ -1147,7 +1147,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
@ -1171,7 +1171,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
@ -1196,7 +1196,7 @@
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -1212,7 +1212,7 @@
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -247,9 +247,9 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<div class="vendor-info" style="display: flex; align-items: center;">
<div class="ec-catalog-vendor" style="display: inline-block;">
<?php if (isset($vendor['vendor_image'])) : ?>
<img src="<?php echo $vendor['vendor_image']; ?>" alt="<?php echo $vendor['user_login']; ?>" class="vendor-image" style="max-width: 100px; max-height: 100px;">
<img loading="lazy" src="<?php echo $vendor['vendor_image']; ?>" alt="<?php echo $vendor['user_login']; ?>" class="vendor-image" style="max-width: 100px; max-height: 100px;">
<?php else : ?>
<img src="https://api.obanana.com/images/storage/web_images/1708588564876-viber_image_2024-02-22_15-54-42-498.png" class="vendor-image-placeholder" style="max-width: 100px; max-height: 100px;">
<img loading="lazy" src="https://api.obanana.com/images/storage/web_images/1708588564876-viber_image_2024-02-22_15-54-42-498.png" class="vendor-image-placeholder" style="max-width: 100px; max-height: 100px;">
<?php endif; ?>
</div>
<div class="vendor-details" style="display: inline-block;">
@ -322,19 +322,19 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img style="width: 290px; height: 200px; object-fit: cover;" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" />
<img loading="lazy" style="width: 290px; height: 200px; object-fit: cover;" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" />
<?php
}
} else {
?>
<img class="hover-image" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" alt="edit" />
<img loading="lazy" class="hover-image" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" alt="edit" />
<?php
}
?>
</a>
<!-- <a href="shop-left-sidebar-col-4.php" class="image">
<img class="main-image" src="<?php echo $product_image ?>" alt="Product" />
<img class="hover-image" src="<?php echo $product_image ?>" alt="Product" />
<img loading="lazy" class="main-image" src="<?php echo $product_image ?>" alt="Product" />
<img loading="lazy" class="hover-image" src="<?php echo $product_image ?>" alt="Product" />
</a> -->
<div class="ec-pro-actions">
<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>
@ -653,36 +653,36 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<!-- Swiper -->
<div class="qty-product-cover">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
<div class="qty-nav-thumb">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
</div>
@ -774,7 +774,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<!-- Recent Purchase Popup -->
<div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -812,7 +812,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -834,7 +834,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -856,7 +856,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -878,7 +878,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -902,7 +902,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -917,7 +917,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

File diff suppressed because it is too large Load Diff

View File

@ -210,17 +210,17 @@ if ($_SESSION["userId"] <> "") {
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 330px;" />
<img loading="lazy" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" style="border: 1px solid #eeeeee; height: 330px;" />
<?php
}
} else {
?>
<img class="hover-image" 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" class="hover-image" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/65/No-Image-Placeholder.svg/495px-No-Image-Placeholder.svg.png?20200912122019" alt="edit" />
<?php
}
?>
<!-- <img class="main-image" src="<?php echo $simpleProducts[$pid]["product_image"] ?>" alt="Product" /> -->
<!-- <img class="hover-image" src="<?php echo $simpleProducts[$pid]["product_image"] ?>" alt="Product" /> -->
<!-- <img loading="lazy" class="main-image" src="<?php echo $simpleProducts[$pid]["product_image"] ?>" alt="Product" /> -->
<!-- <img loading="lazy" class="hover-image" src="<?php echo $simpleProducts[$pid]["product_image"] ?>" alt="Product" /> -->
</a>
<div class="ec-pro-actions" style="bottom: -36px;">
@ -648,36 +648,36 @@ if ($_SESSION["userId"] <> "") {
<!-- Swiper -->
<div class="qty-product-cover">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
<div class="qty-nav-thumb">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
</div>
@ -769,7 +769,7 @@ if ($_SESSION["userId"] <> "") {
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -807,7 +807,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -829,7 +829,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -851,7 +851,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -873,7 +873,7 @@ if ($_SESSION["userId"] <> "") {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -897,7 +897,7 @@ if ($_SESSION["userId"] <> "") {
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -912,7 +912,7 @@ if ($_SESSION["userId"] <> "") {
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -468,7 +468,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -490,7 +490,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -512,7 +512,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -534,7 +534,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -558,7 +558,7 @@
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -573,7 +573,7 @@
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -227,7 +227,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="ec-vendor-block">
<!-- <div class="ec-vendor-block-bg"></div>
<div class="ec-vendor-block-detail">
<img class="v-img" src="assets/images/user/1.jpg" alt="vendor image">
<img loading="lazy" class="v-img" src="assets/images/user/1.jpg" alt="vendor image">
<h5>Mariana Johns</h5>
</div> -->
@ -238,7 +238,7 @@ if ($_SESSION["isVendor"] == true) {
<?php
$customer_image = isset($customer_data[0]['customer_image']) ? $customer_data[0]['customer_image'] : 'https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg';
?>
<img class="v-img" src=<?php echo $customer_image ?> alt="vendor image">
<img loading="lazy" class="v-img" src=<?php echo $customer_image ?> alt="vendor image">
</div>
<?php include 'user-profile-tabs.php' ?>
</div>
@ -361,7 +361,7 @@ if ($_SESSION["isVendor"] == true) {
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<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>
@ -436,7 +436,7 @@ if ($_SESSION["isVendor"] == true) {
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<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>
@ -507,7 +507,7 @@ if ($_SESSION["isVendor"] == true) {
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<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>
@ -578,7 +578,7 @@ if ($_SESSION["isVendor"] == true) {
?>
<tr class="tableView">
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<img class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product">
<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>
@ -656,7 +656,7 @@ if ($_SESSION["isVendor"] == true) {
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<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>
@ -983,8 +983,24 @@ if ($_SESSION["isVendor"] == true) {
}
function updateCompletedStatus(orderId, referenceNumber) {
login(email, password, function(token) {
login(email, password, async function(token) {
// const token = '<?php echo $_SESSION["token"] ?>';
const orderResponse = await fetch(`https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/${orderId}`);
const orderData = await orderResponse.json();
const updatedDetails = orderData.payment.details.map(detail => ({
...detail,
attributes: {
...detail.attributes,
data: {
...detail.attributes.data,
attributes: {
...detail.attributes.data.attributes,
status: 'paid'
}
}
},
status: 'paid'
}));
fetch(`https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/${orderId}`, {
method: 'PATCH',
headers: {
@ -995,7 +1011,8 @@ if ($_SESSION["isVendor"] == true) {
status: 'COMPLETED',
payment: {
status: 'PAID',
reference_number: referenceNumber
reference_number: orderData.payment.reference_number,
details: updatedDetails,
}
}),
})
@ -1005,7 +1022,7 @@ if ($_SESSION["isVendor"] == true) {
if (data && data !== "") {
// Update the status in the table without reloading the page
// document.querySelector(`[data-order-id="${orderId}"] .order-status`).innerText = 'COMPLETED';
location.reload();
// location.reload();
} else {
alert('Failed to update order status');
@ -1069,7 +1086,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="row pt-3">
<div class="col-md-6">
<a href="${jsonObject.items[0].product.product_image}" target="_blank">
<img class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}" alt="product" />
<img loading="lazy" class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}" alt="product" />
</a>
</div>
<div class="col-md-6" style="margin:auto;">
@ -1093,7 +1110,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="row pt-3">
<div class="col-md-6">
<a href="${jsonObject.items[0].product.product_image}" target="_blank">
<img class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}" alt="product" />
<img loading="lazy" class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}" alt="product" />
</a>
</div>
<div class="col-md-6" style="margin:auto;">
@ -1119,7 +1136,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="row pt-3">
<div class="col-md-6">
<a href="${jsonObject.items[0].product.product_image}" target="_blank">
<img class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}" alt="product" />
<img loading="lazy" class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}" alt="product" />
</a>
</div>
<div class="col-md-6" style="margin:auto;">
@ -1145,7 +1162,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="row pt-3">
<div class="col-md-6">
<a href="${jsonObject.items[0].product.product_image}" target="_blank">
<img class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}" alt="product" />
<img loading="lazy" class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}" alt="product" />
</a>
</div>
<div class="col-md-6" style="margin:auto;">
@ -1171,7 +1188,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="row pt-3">
<div class="col-md-6">
<a href="${jsonObject.items[0].product.product_image}" target="_blank">
<img class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}" alt="product" />
<img loading="lazy" class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}" alt="product" />
</a>
</div>
<div class="col-md-6" style="margin:auto;">
@ -1226,7 +1243,7 @@ if ($_SESSION["isVendor"] == true) {
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -1264,7 +1281,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1286,7 +1303,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1308,7 +1325,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1330,7 +1347,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1354,7 +1371,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -1369,7 +1386,7 @@ if ($_SESSION["isVendor"] == true) {
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -159,7 +159,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="ec-vendor-block">
<!-- <div class="ec-vendor-block-bg"></div>
<div class="ec-vendor-block-detail">
<img class="v-img" src="assets/images/user/1.jpg" alt="vendor image">
<img loading="lazy" class="v-img" src="assets/images/user/1.jpg" alt="vendor image">
<h5>Mariana Johns</h5>
</div> -->
<?php include 'user-profile-tabs.php' ?>
@ -183,7 +183,7 @@ if ($_SESSION["isVendor"] == true) {
<?php
$customer_image = isset($customer_data[0]['customer_image']) ? $customer_data[0]['customer_image'] : 'https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg';
?>
<img class="v-img" src=<?php echo $customer_image ?> alt="vendor image">
<img loading="lazy" class="v-img" src=<?php echo $customer_image ?> alt="vendor image">
<h5 class="name"><?php echo $customer_data[0]['first_name'] ?> <?php echo $customer_data[0]['last_name'] ?></h5>
</div>
</div>
@ -330,7 +330,7 @@ if ($_SESSION["isVendor"] == 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>
@ -360,7 +360,7 @@ if ($_SESSION["isVendor"] == 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>
@ -397,7 +397,7 @@ if ($_SESSION["isVendor"] == 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>
@ -455,6 +455,54 @@ if ($_SESSION["isVendor"] == true) {
</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>
// var myElement = document.getElementById('myElement');
// myElement.style.backgroundImage = 'red';
@ -484,11 +532,11 @@ if ($_SESSION["isVendor"] == true) {
})
.then(response => {
if (response.ok) {
console.log('Email update successful');
console.log('Profile updated Successful');
location.reload();
// Handle any other actions after the successful email update
} else {
console.error('Email update failed');
console.error('Profile Failed to Upload');
// Handle errors or display a message to the user
}
})
@ -1142,7 +1190,7 @@ if ($_SESSION["isVendor"] == true) {
</div> -->
<div class="thumb-preview ec-preview">
<div class="image-thumb-preview">
<!-- <img class="image-thumb-preview ec-image-preview v-img" src=<?php echo $customer_data[0]['customer_image'] ?> alt="edit" /> -->
<!-- <img loading="lazy" class="image-thumb-preview ec-image-preview v-img" src=<?php echo $customer_data[0]['customer_image'] ?> alt="edit" /> -->
</div>
</div>
</div>
@ -1158,7 +1206,7 @@ if ($_SESSION["isVendor"] == true) {
<?php
$customer_image = isset($customer_data[0]['customer_image']) ? $customer_data[0]['customer_image'] : 'https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg';
?>
<img class="image-thumb-preview ec-image-preview v-img" src=<?php echo $customer_image ?> alt="edit" />
<img loading="lazy" class="image-thumb-preview ec-image-preview v-img" src=<?php echo $customer_image ?> alt="edit" />
</div>
</div>
</div>
@ -1205,10 +1253,10 @@ if ($_SESSION["isVendor"] == true) {
})
.then(secondResponse => {
if (secondResponse.ok) {
console.log('Second request successful');
location.reload();
console.log('Image Uploaded Successful');
// location.reload();
} else {
console.error('Second request failed');
console.error('Image Failed to Upload');
}
})
.catch(error => {
@ -1237,7 +1285,7 @@ if ($_SESSION["isVendor"] == true) {
</div>
<div class="form-group">
<label for="phone-" class="text-dark font-weight-medium pt-3 mb-2">Contact Number</label>
<input type="text" class="form-control" id="phone-" value="<?php echo $customer_data[0]['phone_number'] ?>">
<input type="text" class="form-control" id="phone-" value="<?php echo $customer_data[0]['phone_number'] ?>" oninput="preventEraseInPrefix(this)">
</div>
<!-- <div class="col-md-12 space-t-15">
@ -1246,7 +1294,7 @@ if ($_SESSION["isVendor"] == true) {
aria-label="Close">Close</a>
</div> -->
</form>
<button type="button" class="btn btn-primary btn-pill my-3" onclick="editUser()">Upload</button>
<button type="button" class="btn btn-primary btn-pill mt-3" onclick="editUser()">Upload</button>
</div>
</div>
</div>
@ -1284,7 +1332,7 @@ if ($_SESSION["isVendor"] == true) {
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -1322,7 +1370,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1344,7 +1392,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1366,7 +1414,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1388,7 +1436,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1412,7 +1460,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -1427,7 +1475,7 @@ if ($_SESSION["isVendor"] == true) {
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -239,7 +239,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="ec-vendor-block">
<!-- <div class="ec-vendor-block-bg"></div>
<div class="ec-vendor-block-detail">
<img class="v-img" src="assets/images/user/1.jpg" alt="vendor image">
<img loading="lazy" class="v-img" src="assets/images/user/1.jpg" alt="vendor image">
<h5>Mariana Johns</h5>
</div> -->
@ -250,7 +250,7 @@ if ($_SESSION["isVendor"] == true) {
<?php
$customer_image = isset($customer_data[0]['customer_image']) ? $customer_data[0]['customer_image'] : 'https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg';
?>
<img class="v-img" src=<?php echo $customer_image ?> alt="vendor image">
<img loading="lazy" class="v-img" src=<?php echo $customer_image ?> alt="vendor image">
</div>
<?php include 'user-profile-tabs.php' ?>
</div>
@ -382,14 +382,14 @@ if ($_SESSION["isVendor"] == true) {
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<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><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td><span><?php echo date("F j, Y", strtotime($order['updatedAt'])); ?></span></td>
<!-- <td><span class="tbl-btn"><a class="btn btn-lg btn-primary" href="#">View</a></span></td> -->
@ -455,14 +455,14 @@ if ($_SESSION["isVendor"] == true) {
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<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><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td><span><?php echo date("F j, Y", strtotime($order['updatedAt'])); ?></span></td>
<!-- <td><span class="tbl-btn"><a class="btn btn-lg btn-primary" href="#">View</a></span></td> -->
@ -528,14 +528,14 @@ if ($_SESSION["isVendor"] == true) {
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<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><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td><span><?php echo date("F j, Y", strtotime($order['updatedAt'])); ?></span></td>
<!-- <td><span class="tbl-btn"><a class="btn btn-lg btn-primary" href="#">View</a></span></td> -->
@ -601,14 +601,14 @@ if ($_SESSION["isVendor"] == true) {
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<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><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td><span><?php echo date("F j, Y", strtotime($order['updatedAt'])); ?></span></td>
<!-- <td>
<span class="tbl-btn">
@ -677,14 +677,14 @@ if ($_SESSION["isVendor"] == true) {
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<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><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td><span><?php echo date("F j, Y", strtotime($order['updatedAt'])); ?></span></td>
<!-- <td>
<span class="tbl-btn">
@ -752,14 +752,14 @@ if ($_SESSION["isVendor"] == true) {
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<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><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td><span><?php echo date("F j, Y", strtotime($order['updatedAt'])); ?></span></td>
<!-- <td>
<span class="tbl-btn">
@ -1047,7 +1047,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="row pt-3">
<div class="col-md-6">
<a href="${jsonObject.items[0].product.product_image}" target="_blank">
<img class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}" alt="product" />
<img loading="lazy" class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}" alt="product" />
</a>
</div>
<div class="col-md-6" style="margin:auto;">
@ -1060,7 +1060,7 @@ if ($_SESSION["isVendor"] == true) {
<li class="fs-6"><b>Refund Proof:</b></li>
<li class="fs-6 pl-3">
<a href="${jsonObject.return_order.image}" target="_blank">
<img class="prod-img" style="width:50%; height:auto;" src="${jsonObject.return_order.image}" alt="product">
<img loading="lazy" class="prod-img" style="width:50%; height:auto;" src="${jsonObject.return_order.image}" alt="product">
</a>
</li>
<li class="fs-6"><b>Date:</b> ${formattedDate}</li>
@ -1078,7 +1078,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="row pt-3">
<div class="col-md-6">
<a href="${jsonObject.items[0].product.product_image}" target="_blank">
<img class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}" alt="product" />
<img loading="lazy" class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}" alt="product" />
</a>
</div>
<div class="col-md-6" style="margin:auto;">
@ -1091,7 +1091,7 @@ if ($_SESSION["isVendor"] == true) {
<li class="fs-6"><b>Refund Proof:</b></li>
<li class="fs-6 pl-3">
<a href="${jsonObject.return_order.image}" target="_blank">
<img class="prod-img" style="width:50%; height:50%;" src="${jsonObject.return_order.image}" alt="product">
<img loading="lazy" class="prod-img" style="width:50%; height:50%;" src="${jsonObject.return_order.image}" alt="product">
</a>
</li>
<li class="fs-6"><b>Date:</b> ${formattedDate}</li>
@ -1109,7 +1109,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="row pt-3">
<div class="col-md-6">
<a href="${jsonObject.items[0].product.product_image}" target="_blank">
<img class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}" alt="product" />
<img loading="lazy" class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}" alt="product" />
</a>
</div>
<div class="col-md-6" style="margin:auto;">
@ -1122,7 +1122,7 @@ if ($_SESSION["isVendor"] == true) {
<li class="fs-6"><b>Refund Proof:</b></li>
<li class="fs-6 pl-3">
<a href="${jsonObject.return_order.image}" target="_blank">
<img class="prod-img" style="width:50%; height:50%;" src="${jsonObject.return_order.image}" alt="product">
<img loading="lazy" class="prod-img" style="width:50%; height:50%;" src="${jsonObject.return_order.image}" alt="product">
</a>
</li>
<li class="fs-6"><b>Date:</b> ${formattedDate}</li>
@ -1140,7 +1140,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="row pt-3">
<div class="col-md-6">
<a href="${jsonObject.items[0].product.product_image}" target="_blank">
<img class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}" alt="product" />
<img loading="lazy" class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}" alt="product" />
</a>
</div>
<div class="col-md-6" style="margin:auto;">
@ -1153,7 +1153,7 @@ if ($_SESSION["isVendor"] == true) {
<li class="fs-6"><b>Refund Proof:</b></li>
<li class="fs-6 pl-3">
<a href="${jsonObject.return_order.image}" target="_blank">
<img class="prod-img" style="width:50%; height:50%;" src="${jsonObject.return_order.image}" alt="product">
<img loading="lazy" class="prod-img" style="width:50%; height:50%;" src="${jsonObject.return_order.image}" alt="product">
</a>
</li>
<li class="fs-6"><b>Date:</b> ${formattedDate}</li>
@ -1171,7 +1171,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="row pt-3">
<div class="col-md-6">
<a href="${jsonObject.items[0].product.product_image}" target="_blank">
<img class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}" alt="product" />
<img loading="lazy" class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}" alt="product" />
</a>
</div>
<div class="col-md-6" style="margin:auto;">
@ -1184,7 +1184,7 @@ if ($_SESSION["isVendor"] == true) {
<li class="fs-6"><b>Refund Proof:</b></li>
<li class="fs-6 pl-3">
<a href="${jsonObject.return_order.image}" target="_blank">
<img class="prod-img" style="width:50%; height:50%;" src="${jsonObject.return_order.image}" alt="product">
<img loading="lazy" class="prod-img" style="width:50%; height:50%;" src="${jsonObject.return_order.image}" alt="product">
</a>
</li>
<li class="fs-6"><b>Date:</b> ${formattedDate}</li>
@ -1230,7 +1230,7 @@ if ($_SESSION["isVendor"] == true) {
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -1268,7 +1268,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1290,7 +1290,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1312,7 +1312,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1334,7 +1334,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1358,7 +1358,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -1373,7 +1373,7 @@ if ($_SESSION["isVendor"] == true) {
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -19,6 +19,11 @@ if ($_SESSION["userId"] <> "") {
$_SESSION["isLoggedIn"] = false;
header("location: login.php");
}
if ($_SESSION["isCustomer"] == true) {
header("location: user-profile.php");
}
$products = productList();
?>
<!--=========================================================
@ -150,11 +155,11 @@ $products = productList();
<!-- 03-12-2024 Stacy added placeholder for vendor profile -->
<?php
if (!empty($vendorData['vendor_image'])) { ?>
<img class="v-img" src=<?php echo $vendorData['vendor_image'] ?> alt="vendor image">
<img loading="lazy" class="v-img" src=<?php echo $vendorData['vendor_image'] ?> alt="vendor image">
<?php } else { ?>
<img class="v-img" src="https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg" alt="vendor image">
<img loading="lazy" class="v-img" src="https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg" alt="vendor image">
<?php } ?>
<!-- <img class="v-img" src=<?php #echo $vendorData['vendor_image'] ?> alt="vendor image"> -->
<!-- <img loading="lazy" class="v-img" src=<?php #echo $vendorData['vendor_image'] ?> alt="vendor image"> -->
<h5 class="name"><?php echo $vendorData['user_login'] ?></h5>
</div>
<!-- <div class="ec-vendor-block-items">
@ -226,20 +231,20 @@ $products = productList();
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img style="margin-top:8px;" class="prod-img" src="<?php echo $first_image_url; ?>" alt="edit" />
<img loading="lazy" style="margin-top:8px;" class="prod-img" src="<?php echo $first_image_url; ?>" alt="edit" />
<?php
}
} else {
?>
<img style="margin-top:8px;" 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="margin-top:8px;" 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($product['product_image']) && !empty($product['product_image'])) {
echo '<img src="' . $product['product_image'] . '" alt="Product Image" class="prod-img" >';
echo '<img loading="lazy" src="' . $product['product_image'] . '" alt="Product Image" class="prod-img" >';
} else {
echo '<img src="admin/assets/img/vendor/u1.jpg" class="prod-img rounded-circle" alt="Placeholder Image" >';
echo '<img loading="lazy" src="admin/assets/img/vendor/u1.jpg" class="prod-img rounded-circle" alt="Placeholder Image" >';
}
?> -->
</td>
@ -444,7 +449,7 @@ $products = productList();
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -482,7 +487,7 @@ $products = productList();
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -504,7 +509,7 @@ $products = productList();
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -526,7 +531,7 @@ $products = productList();
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -548,7 +553,7 @@ $products = productList();
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -572,7 +577,7 @@ $products = productList();
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -587,7 +592,7 @@ $products = productList();
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -15,6 +15,11 @@ if ($_SESSION["userId"] <> "") {
$_SESSION["isLoggedIn"] = false;
header("location: login.php");
}
if ($_SESSION["isCustomer"] == true) {
header("location: user-profile.php");
}
if (isset($_GET['id'])) {
$_SESSION['vendorOrderId'] = $_GET['id'];
}
@ -142,11 +147,11 @@ $array = json_decode($result, true);
<?php
if (isset($array['items'][0]['product']['product_image'])) {
?>
<img class="ec-image-preview" src="<?php echo $array['items'][0]['product']['product_image']; ?>" alt="edit" />
<img loading="lazy" class="ec-image-preview" src="<?php echo $array['items'][0]['product']['product_image']; ?>" alt="edit" />
<?php
} else {
?>
<img class="ec-image-preview" src="assets/images/product-image/vender-upload-preview.jpg" alt="edit" />
<img loading="lazy" class="ec-image-preview" src="assets/images/product-image/vender-upload-preview.jpg" alt="edit" />
<?php
}
?>
@ -252,11 +257,19 @@ $array = json_decode($result, true);
<?php
if ($array['status'] === 'TO PAY' || $array['status'] === 'To Pay') {
echo '<button type="submit" class="btn btn-primary">To Ship</button>';
echo '<button type="button" value="Back" onclick="window.history.back();" class="btn btn-primary mt-3">Back</button>';
} elseif ($array['status'] === 'TO SHIP' || $array['status'] === 'To Ship') {
echo '<button type="submit" class="btn btn-primary">To Receive</button>';
echo '<button type="button" value="Back" onclick="window.history.back();" class="btn btn-primary mt-3">Back</button>';
} elseif ($array['status'] === 'TO RECEIVE' || $array['status'] === 'To Receive') {
echo '<button type="submit" class="btn btn-primary">Completed</button>';
echo '<button type="button" value="Back" onclick="window.history.back();" class="btn btn-primary mt-3">Back</button>';
} elseif ($array['status'] === 'COMPLETED' || $array['status'] === 'Completed') {
echo '<button type="button" value="Back" onclick="window.history.back();" class="btn btn-primary">Back</button>';
} elseif ($array['status'] === 'RETURNED' || $array['status'] === 'Returned') {
echo '<button type="button" value="Back" onclick="window.history.back();" class="btn btn-primary">Back</button>';
}
?>
</div>
</form>
@ -303,7 +316,7 @@ $array = json_decode($result, true);
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -341,7 +354,7 @@ $array = json_decode($result, true);
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -363,7 +376,7 @@ $array = json_decode($result, true);
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -385,7 +398,7 @@ $array = json_decode($result, true);
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -407,7 +420,7 @@ $array = json_decode($result, true);
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -431,7 +444,7 @@ $array = json_decode($result, true);
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -446,7 +459,7 @@ $array = json_decode($result, true);
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -157,13 +157,13 @@ if ($_SESSION["isCustomer"] == true) {
<?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 class="v-img" src=<?php #echo $vendorData['vendor_image'] ?> alt="vendor image"> -->
<!-- <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 class="v-img" src=<?php echo $vendorData['vendor_image'] ?> alt="vendor image">
<img loading="lazy" class="v-img" src=<?php echo $vendorData['vendor_image'] ?> alt="vendor image">
<?php } else { ?>
<img class="v-img" src="https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg" alt="vendor image">
<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>
@ -253,20 +253,20 @@ if ($_SESSION["isCustomer"] == true) {
# 03-11-2024 Stacy modified
if (isset($orderItems['items'][0]['product']['product_image'])) {
?>
<img class="prod-img" src="<?php echo $orderItems['items'][0]['product']['product_image']; ?>" alt="edit" />
<img loading="lazy" class="prod-img" src="<?php echo $orderItems['items'][0]['product']['product_image']; ?>" alt="edit" />
<?php
} else {
?>
<img 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" 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 src="' . $item['product']['product_image'] . '" alt="Product Image" class="prod-img">';
echo '<img loading="lazy" src="' . $item['product']['product_image'] . '" alt="Product Image" class="prod-img">';
} else {
echo '<img src="assets/img/vendor/u1.jpg" class="prod-img rounded-circle" alt="Placeholder Image">';
echo '<img loading="lazy" src="assets/img/vendor/u1.jpg" class="prod-img rounded-circle" alt="Placeholder Image">';
}
?> -->
</td>
@ -450,21 +450,21 @@ if ($_SESSION["isCustomer"] == true) {
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img class="prod-img" src="<?php echo $first_image_url; ?>" alt="edit" />
<img loading="lazy" class="prod-img" src="<?php echo $first_image_url; ?>" alt="edit" />
<?php
}
} else {
?>
<img 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" 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($product['product_image']) && !empty($product['product_image'])) {
echo '<img src="' . $product['product_image'] . '" alt="Product Image" class="prod-img" >';
echo '<img loading="lazy" src="' . $product['product_image'] . '" alt="Product Image" class="prod-img" >';
} else {
echo '<img src="assets/img/vendor/u1.jpg" class="prod-img rounded-circle" alt="Placeholder Image" >';
echo '<img loading="lazy" src="assets/img/vendor/u1.jpg" class="prod-img rounded-circle" alt="Placeholder Image" >';
}
?> -->
</td>
@ -516,36 +516,36 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Swiper -->
<div class="qty-product-cover">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
<div class="qty-nav-thumb">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
</div>
@ -638,7 +638,7 @@ if ($_SESSION["isCustomer"] == true) {
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -676,7 +676,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -698,7 +698,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -720,7 +720,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -742,7 +742,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -766,7 +766,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -781,7 +781,7 @@ if ($_SESSION["isCustomer"] == true) {
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -107,7 +107,7 @@ $products = productList();
</div>
<ul class="eccart-pro-items">
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img src="assets/images/product-image/6_1.jpg" alt="product"></a>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy" src="assets/images/product-image/6_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">T-shirt For Women</a>
<span class="cart-price"><span>$76.00</span> x 1</span>
@ -118,7 +118,7 @@ $products = productList();
</div>
</li>
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img src="assets/images/product-image/12_1.jpg" alt="product"></a>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy" src="assets/images/product-image/12_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">Women Leather Shoes</a>
<span class="cart-price"><span>$64.00</span> x 1</span>
@ -129,7 +129,7 @@ $products = productList();
</div>
</li>
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img src="assets/images/product-image/3_1.jpg" alt="product"></a>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy" src="assets/images/product-image/3_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">Girls Nylon Purse</a>
<span class="cart-price"><span>$59.00</span> x 1</span>
@ -218,9 +218,9 @@ $products = productList();
<a href="catalog-single-vendor.php?id=<?php echo $vendor['_id'] ?>"></a>
<?php
if(!isset($vendor['vendor_image'])){
?><img src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="vendor img"><?php
?><img loading="lazy" src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="vendor img"><?php
}else{
?><img src="<?php echo $vendor['vendor_image'] ?>" alt="vendor img"><?php
?><img loading="lazy" src="<?php echo $vendor['vendor_image'] ?>" alt="vendor img"><?php
}
?>
</div>
@ -322,36 +322,36 @@ $products = productList();
<!-- Swiper -->
<div class="qty-product-cover">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
<div class="qty-nav-thumb">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
</div>
@ -444,7 +444,7 @@ $products = productList();
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -482,7 +482,7 @@ $products = productList();
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -504,7 +504,7 @@ $products = productList();
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -526,7 +526,7 @@ $products = productList();
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -548,7 +548,7 @@ $products = productList();
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -572,7 +572,7 @@ $products = productList();
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -587,7 +587,7 @@ $products = productList();
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -171,11 +171,11 @@ if ($_SESSION["isCustomer"] == true) {
<div class="ec-vendor-block-detail">
<?php
if (!empty($vendorData['vendor_image'])) { ?>
<img class="v-img" src=<?php echo $vendorData['vendor_image'] ?> alt="vendor image">
<img loading="lazy" class="v-img" src=<?php echo $vendorData['vendor_image'] ?> alt="vendor image">
<?php } else { ?>
<img class="v-img" src="https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg" alt="vendor image">
<img loading="lazy" class="v-img" src="https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg" alt="vendor image">
<?php } ?>
<!-- <img class="v-img" src=<?php #echo $vendorData['vendor_image'] ?> alt="vendor image"> -->
<!-- <img loading="lazy" class="v-img" src=<?php #echo $vendorData['vendor_image'] ?> alt="vendor image"> -->
<h5 class="name"><?php echo $vendorData['user_login'] ?></h5>
</div>
<!-- <div class="ec-vendor-block-items">
@ -488,10 +488,10 @@ if ($_SESSION["isCustomer"] == true) {
console.log(response);
var paymentId = response.payment.reference_number;
$('#paymentIdSpan').text(paymentId);
var gross_price = response.payment.details[0]?.attributes.data.attributes.amount;
var gross_price = (response.payment.details[0]?.attributes.data.attributes.amount / 100).toFixed(2);
var payment_status = response.payment.status;
var fee = response.payment.details[0]?.attributes.data.attributes.fee;
var net_amount = response.payment.details[0]?.attributes.data.attributes.payments[0].attributes.net_amount;
var net_amount = (response.payment.details[0]?.attributes.data.attributes.payments[0].attributes.net_amount / 100).toFixed(2);
var desc = response.items[0].product.name;
var method = response.payment_method;
var name = response.billing_address.billing_first_name + " " + response.billing_address.billing_last_name;
@ -522,7 +522,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="d-flex justify-content-between p-2">
<div class="fw-bold">Gross Amount</div>
<div> ${net_amount}</div>
<div> ${gross_price}</div>
</div>
<div class="d-flex justify-content-between p-2" style="border-bottom: 1px solid #000;">
<div class="fw-bold"> Fees <span data-bs-toggle="tooltip" data-bs-placement="top"
@ -532,7 +532,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<div class="d-flex justify-content-between p-2">
<div class="fw-bold"> Net Amount</div>
<div> ${gross_price} </div>
<div> ${net_amount} </div>
</div>
<div class="d-flex p-2">
<div class="fw-bold"> Payment Description </div>
@ -598,7 +598,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<div class="d-flex justify-content-between p-2">
<div class="fw-bold"> Net Amount</div>
<div> ${gross_price} </div>
<div> ${net_amount} </div>
</div>
<div class="d-flex p-2">
<div class="fw-bold"> Payment Description </div>
@ -701,7 +701,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -723,7 +723,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -745,7 +745,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -767,7 +767,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -791,7 +791,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -806,7 +806,7 @@ if ($_SESSION["isCustomer"] == true) {
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -84,6 +84,24 @@ $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();
xhr.open("GET", "vendor-payoutsTokenRN.php", true);
xhr.send();
}
setInterval(function() {
var currentTime = <?php echo time(); ?>;
var renewalTime = <?php echo $renewal_time; ?>;
var expirationTime = <?php echo $expiration_time; ?>;
if (currentTime >= renewalTime || currentTime >= expirationTime) {
renewToken();
}
}, 60000);
</script>
</head>
<body class="shop_page">
@ -151,7 +169,7 @@ $vendorPayoutData = json_decode($response, true);
<div class="ec-vendor-card-body">
<div class="row">
<div class="col-md-4 mb-5">
<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>
@ -167,9 +185,9 @@ $vendorPayoutData = json_decode($response, true);
foreach ($upcomingPayout as $x => $val) {
$paymentStatus = strtolower($val['payment']['status']);
$orderStatus = $val['status'];
$orderStatus = strtolower($val['status']);
$payoutStatus = empty($val['payout_status']);
if(( $paymentStatus == "paid") && ( $orderStatus == "COMPLETED") && ($payoutStatus == true)){
if(( $paymentStatus == "paid") && ( $orderStatus == "completed") && ($payoutStatus == true)){
$orderAmount = $val['total_amount'];
$payoutSum += $orderAmount;
}
@ -193,15 +211,23 @@ $vendorPayoutData = json_decode($response, true);
$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: Philippine National Bank (PNB) Account ending in <?php echo $bankNumEnding?>
Receipient: <?php echo $bankName; ?> Account ending in <?php echo $bankNumEnding?>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4 mb-5">
<!-- 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>
@ -242,19 +268,19 @@ $vendorPayoutData = json_decode($response, true);
</strong>
</div>
</h4>
<!-- <div class="text-sm mt-3">
<- <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> -
<div class="text-sm">
Receipient: Philippine National Bank (PNB) Account ending in <?php echo $bankNumEnding?>
Receipient: Philippine National Bank (PNB) Account ending in <php echo $bankNumEnding?>
</div>
</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">
@ -320,7 +346,7 @@ $vendorPayoutData = json_decode($response, true);
<div class="modal-dialog modal-xl" style="min-width: 90%;">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title fs-5" id="payoutsModalLabel">Payment ID: <span id="payoutIdSpan"></span></h5>
<h5 class="modal-title fs-5" id="payoutsModalLabel">Payout ID: <span id="payoutIdSpan"></span></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
@ -348,7 +374,7 @@ $vendorPayoutData = json_decode($response, true);
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class=" recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -386,7 +412,7 @@ $vendorPayoutData = json_decode($response, true);
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -408,7 +434,7 @@ $vendorPayoutData = json_decode($response, true);
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -430,7 +456,7 @@ $vendorPayoutData = json_decode($response, true);
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -452,7 +478,7 @@ $vendorPayoutData = json_decode($response, true);
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -476,7 +502,7 @@ $vendorPayoutData = json_decode($response, true);
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -491,7 +517,7 @@ $vendorPayoutData = json_decode($response, true);
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">
@ -598,6 +624,7 @@ $vendorPayoutData = json_decode($response, true);
console.log(response);
var grossAmount = response.gross_amount;
var totalFees = response.fees_deduction_adjustment;
var feeBreakdown = response.breakdown[0].transfer_fee;
var netAmount = response.net_amount;
var payoutStatus = response.status;
payoutStatus = payoutStatus.charAt(0).toUpperCase() + payoutStatus.slice(1).toLowerCase();
@ -611,12 +638,19 @@ $vendorPayoutData = json_decode($response, true);
{
var paymentType = log.Type;
var transDate = log?.Transaction_date;
var transDate = new Date(log?.Transaction_date).toLocaleString('en-US', {
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: 'numeric',
minute: '2-digit',
hour12: true
});
var transGrossAmount = log?.Gross_Amount;
var transFee = log.Fee;
var transNetAmount = log?.Net_Amount;
var transDesc = log.Description;
// Append HTML for current transaction log to the transactionLogsHtml string
transactionLogsHtml += `
<tr>
@ -650,7 +684,7 @@ $vendorPayoutData = json_decode($response, true);
<div class="fw-bold"> Fees, Deductions, Adjustments
</div>
<div> - ${totalFees}</div>
<div> - ${totalFees} (${feeBreakdown})</div>
</div>
<div class="d-flex justify-content-between p-2">
<div class="fw-bold"> Net Amount</div>

View File

@ -66,7 +66,7 @@
</div>
<ul class="eccart-pro-items">
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/6_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">T-shirt For Women</a>
@ -78,7 +78,7 @@
</div>
</li>
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/12_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">Women Leather Shoes</a>
@ -90,7 +90,7 @@
</div>
</li>
<li>
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img"><img loading="lazy"
src="assets/images/product-image/3_1.jpg" alt="product"></a>
<div class="ec-pro-content">
<a href="shop-left-sidebar-col-4.php" class="cart_pro_title">Girls Nylon Purse</a>
@ -187,7 +187,7 @@
<div class="ec-vendor-block-img space-bottom-30">
<div class="ec-vendor-block-bg"></div>
<div class="ec-vendor-block-detail">
<img class="v-img" src="assets/images/vendor/5.jpg" alt="vendor image">
<img loading="lazy" class="v-img" src="assets/images/vendor/5.jpg" alt="vendor image">
<h5 class="name">Neon Fashion</h5>
<p>( Retail Business )</p>
</div>
@ -270,36 +270,36 @@
<!-- Swiper -->
<div class="qty-product-cover">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
<div class="qty-nav-thumb">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
</div>
@ -397,7 +397,7 @@
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -436,7 +436,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon"></span>
</div>
@ -460,7 +460,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
@ -484,7 +484,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
@ -508,7 +508,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img"
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img"
alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
@ -533,7 +533,7 @@
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -548,7 +548,7 @@
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -252,11 +252,11 @@ if ($_SESSION["isCustomer"] == true) {
<div class="ec-vendor-block-detail">
<?php
if (!empty($vendorData['vendor_image'])) { ?>
<img class="v-img" src=<?php echo $vendorData['vendor_image'] ?> alt="vendor image">
<img loading="lazy" class="v-img" src=<?php echo $vendorData['vendor_image'] ?> alt="vendor image">
<?php } else { ?>
<img class="v-img" src="https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg" alt="vendor image">
<img loading="lazy" class="v-img" src="https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg" alt="vendor image">
<?php } ?>
<!-- <img class="v-img" src=<?php #echo $vendorData['vendor_image'] ?> alt="vendor image"> -->
<!-- <img loading="lazy" class="v-img" src=<?php #echo $vendorData['vendor_image'] ?> alt="vendor image"> -->
<h5 class="name"><?php echo $vendorData['user_login'] ?></h5>
</div>
<!-- <div class="ec-vendor-block-items">
@ -354,14 +354,14 @@ if ($_SESSION["isCustomer"] == true) {
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<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><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td><span><?php echo date("F j, Y", strtotime($order['updatedAt'])); ?></span></td>
<!-- <td><span class="tbl-btn"><a class="btn btn-lg btn-primary" href="#">View</a></span></td> -->
@ -421,14 +421,14 @@ if ($_SESSION["isCustomer"] == true) {
$jsonorder = json_encode($order);
?>
<tr class="tableView">
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><img 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"><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><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo date("F j, Y", strtotime($order['updatedAt'])); ?></span></td>
<td>
<span class="tbl-btn">
@ -492,14 +492,14 @@ if ($_SESSION["isCustomer"] == true) {
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<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><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td><span><?php echo date("F j, Y", strtotime($order['updatedAt'])); ?></span></td>
<!-- <td><span class="tbl-btn"><a class="btn btn-lg btn-primary" href="#">View</a></span></td> -->
@ -558,14 +558,14 @@ if ($_SESSION["isCustomer"] == true) {
$jsonorder = json_encode($order);
?>
<tr class="tableView">
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><img 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"><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><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo date("F j, Y", strtotime($order['updatedAt'])); ?></span></td>
<td>
<span class="tbl-btn">
@ -627,14 +627,14 @@ if ($_SESSION["isCustomer"] == true) {
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<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><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td><span><?php echo date("F j, Y", strtotime($order['updatedAt'])); ?></span></td>
<!-- <td>
<span class="tbl-btn">
@ -696,14 +696,14 @@ if ($_SESSION["isCustomer"] == true) {
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<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><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
<td><span><?php echo date("F j, Y", strtotime($order['updatedAt'])); ?></span></td>
<!-- <td>
<span class="tbl-btn">
@ -1083,7 +1083,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="row pt-3">
<div class="col-md-6">
<a href="${jsonObject.items[0].product.product_image}" target="_blank">
<img class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}"
<img loading="lazy" class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}"
alt="product" />
</a>
</div>
@ -1097,7 +1097,7 @@ if ($_SESSION["isCustomer"] == true) {
<li class="fs-6"><b>Refund Proof:</b></li>
<li class="fs-6 pl-3">
<a href="${jsonObject.return_order.image}" target="_blank">
<img class="prod-img" style="width:50%; height:50%;" src="${jsonObject.return_order.image}" alt="product">
<img loading="lazy" class="prod-img" style="width:50%; height:50%;" src="${jsonObject.return_order.image}" alt="product">
</a>
</li>
<li class="fs-6"><b>Date:</b> ${formattedDate}</li>
@ -1115,7 +1115,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="row pt-3">
<div class="col-md-6">
<a href="${jsonObject.items[0].product.product_image}" target="_blank">
<img class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}"
<img loading="lazy" class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}"
alt="product" />
</a>
</div>
@ -1129,7 +1129,7 @@ if ($_SESSION["isCustomer"] == true) {
<li class="fs-6"><b>Refund Proof:</b></li>
<li class="fs-6 pl-3">
<a href="${jsonObject.return_order.image}" target="_blank">
<img class="prod-img" style="width:50%; height:50%;" src="${jsonObject.return_order.image}" alt="product">
<img loading="lazy" class="prod-img" style="width:50%; height:50%;" src="${jsonObject.return_order.image}" alt="product">
</a>
</li>
<li class="fs-6"><b>Date:</b> ${formattedDate}</li>
@ -1147,7 +1147,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="row pt-3">
<div class="col-md-6">
<a href="${jsonObject.items[0].product.product_image}" target="_blank">
<img class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}"
<img loading="lazy" class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}"
alt="product" />
</a>
</div>
@ -1161,7 +1161,7 @@ if ($_SESSION["isCustomer"] == true) {
<li class="fs-6"><b>Refund Proof:</b></li>
<li class="fs-6 pl-3">
<a href="${jsonObject.return_order.image}" target="_blank">
<img class="prod-img" style="width:50%; height:50%;" src="${jsonObject.return_order.image}" alt="product">
<img loading="lazy" class="prod-img" style="width:50%; height:50%;" src="${jsonObject.return_order.image}" alt="product">
</a>
</li>
<li class="fs-6"><b>Date:</b> ${formattedDate}</li>
@ -1179,7 +1179,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="row pt-3">
<div class="col-md-6">
<a href="${jsonObject.items[0].product.product_image}" target="_blank">
<img class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}"
<img loading="lazy" class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}"
alt="product" />
</a>
</div>
@ -1193,7 +1193,7 @@ if ($_SESSION["isCustomer"] == true) {
<li class="fs-6"><b>Refund Proof:</b></li>
<li class="fs-6 pl-3">
<a href="${jsonObject.return_order.image}" target="_blank">
<img class="prod-img" style="width:50%; height:50%;" src="${jsonObject.return_order.image}" alt="product">
<img loading="lazy" class="prod-img" style="width:50%; height:50%;" src="${jsonObject.return_order.image}" alt="product">
</a>
</li>
<li class="fs-6"><b>Date:</b> ${formattedDate}</li>
@ -1211,7 +1211,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="row pt-3">
<div class="col-md-6">
<a href="${jsonObject.items[0].product.product_image}" target="_blank">
<img class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}"
<img loading="lazy" class="image-thumb-preview pt-3 pb-3" style="width:100%; height:100%;" src="${jsonObject.items[0].product.product_image}"
alt="product" />
</a>
</div>
@ -1225,7 +1225,7 @@ if ($_SESSION["isCustomer"] == true) {
<li class="fs-6"><b>Refund Proof:</b></li>
<li class="fs-6 pl-3">
<a href="${jsonObject.return_order.image}" target="_blank">
<img class="prod-img" style="width:50%; height:50%;" src="${jsonObject.return_order.image}" alt="product">
<img loading="lazy" class="prod-img" style="width:50%; height:50%;" src="${jsonObject.return_order.image}" alt="product">
</a>
</li>
<li class="fs-6"><b>Date:</b> ${formattedDate}</li>
@ -1273,7 +1273,7 @@ if ($_SESSION["isCustomer"] == true) {
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -1311,7 +1311,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1333,7 +1333,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1355,7 +1355,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1377,7 +1377,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1401,7 +1401,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -1416,7 +1416,7 @@ if ($_SESSION["isCustomer"] == true) {
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -241,7 +241,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -263,7 +263,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -285,7 +285,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -307,7 +307,7 @@
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -331,7 +331,7 @@
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -346,7 +346,7 @@
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -192,13 +192,13 @@ if ($_SESSION["isCustomer"] == true) {
<!-- 02-26-2024 Stacy added placeholder-->
<?php
if (!empty($vendorData['vendor_image'])) { ?>
<img class="v-img" src=<?php echo $vendorData['vendor_image'] ?> alt="vendor image">
<img loading="lazy" class="v-img" src=<?php echo $vendorData['vendor_image'] ?> alt="vendor image">
<?php } else { ?>
<img class="v-img" src="https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg" alt="vendor image">
<img loading="lazy" class="v-img" src="https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg" alt="vendor image">
<?php } ?>
<!-- $vendor_image = isset($vendorData[0]['vendor_image']) ? $vendorData[0]['vendor_image'] : 'https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg'; -->
<!-- <img class="v-img" src=<?php #echo $vendorData['vendor_image'] ?> alt="vendor image"> -->
<!-- <img loading="lazy" class="v-img" src=<?php #echo $vendorData['vendor_image'] ?> alt="vendor image"> -->
<h5 class="name"><?php echo $vendorData['user_login'] ?></h5>
</div>
</div>
@ -239,6 +239,9 @@ if ($_SESSION["isCustomer"] == true) {
<div class="shipping">
<?php foreach ($vendorData['address'] as $address) : ?>
<?php if ($address['shipping']) : ?>
<div>
<span style="font-size:16px;font-weight:800;">Shipping Address:</span>
</div>
<div class="sName">
<span>Name:
<span id="selectedFName"><?php echo $address['first_name']; ?></span>
@ -261,6 +264,34 @@ if ($_SESSION["isCustomer"] == true) {
<?php endif; ?>
<?php endforeach; ?>
</div>
<div class="billing">
<?php foreach ($vendorData['address'] as $address) : ?>
<?php if ($address['billing']) : ?>
<div>
<span style="font-size:16px;font-weight:800;">Billing Address:</span>
</div>
<div class="sName">
<span>Name:
<span id="selectedBillingFName"><?php echo $address['first_name']; ?></span>
<span id="selectedBillingLName"> <?php echo $address['last_name']; ?></span>
</span>
</div>
<div class="sContact">
<span id="selectedBillingContact">Contact #: <?php echo $address['phone']; ?></span>
</div>
<div class="sAddress">
<span>Address:
<span id="sBillingBuilding"><?php echo $address['address_1']; ?></span>
<span id="sBillingStreet"><?php echo $address['address_2']; ?></span>
<span id="sBillingBarangay"><?php echo $address['barangay']; ?></span>
<span id="sBillingCity"><?php echo $address['city']; ?></span>
<span id="sBillingProvince"><?php echo $address['province']; ?></span>
<span id="sBillingCountry"><?php echo $address['country']; ?></span>
</span>
</div>
<?php endif; ?>
<?php endforeach; ?>
</div>
</div>
</div>
</div>
@ -530,17 +561,19 @@ if ($_SESSION["isCustomer"] == true) {
<div class="card-body">
<div class="container">
<div class="row">
<div class="col-md-12 mx-auto">
<label class="form-check-label" for="address_<?php echo $vendor_index; ?>_<?php echo $bank_index; ?>">
<strong style="font-weight: bold;">Bank Name: </strong><?php echo $bank['bank_name']; ?> <br>
<strong style="font-weight: bold;">Bank Account Number: </strong><?php echo $bank['bank_account_number']; ?> <br>
<strong style="font-weight: bold;">Bank Account Name: </strong><?php echo $bank['bank_account_name']; ?>
<div class="selectWrap" style="display: flex; justify-content: center; align-items: center; width: 50%;">
<input type="radio" name="payout_bank" id="payout_bank_<?php echo $vendor_index; ?>_<?php echo $bank_index; ?>" value="<?php echo $vendor_index; ?>_<?php echo $bank_index; ?>" onchange="setPayoutBank('<?php echo $vendor['_id']; ?>', <?php echo $bank_index; ?>, true)" <?php echo $bank['bank_payout'] ? 'checked' : ''; ?>>
<label for="payout_bank_<?php echo $vendor_index; ?>_<?php echo $bank_index; ?>">Set as Payout Bank</label>
</div>
</label>
</div>
<div class="col-md-12 mx-auto">
<div class="form-check" style="display: flex; align-items: center;">
<label class="form-check-label" for="address_<?php echo $vendor_index; ?>_<?php echo $bank_index; ?>">
<strong style="font-weight: bold;">Bank Name: </strong><?php echo $bank['bank_name']; ?> <br>
<strong style="font-weight: bold;">Bank Account Number: </strong><?php echo $bank['bank_account_number']; ?> <br>
<strong style="font-weight: bold;">Bank Account Name: </strong><?php echo $bank['bank_account_name']; ?>
</label>
<div class="selectWrap" style="margin-left: auto; display: flex; align-items: center;">
<input type="radio" style="height:15px !important; width: 15px !important;" name="payout_bank" id="payout_bank_<?php echo $vendor_index; ?>_<?php echo $bank_index; ?>" value="<?php echo $vendor_index; ?>_<?php echo $bank_index; ?>" onchange="setPayoutBank('<?php echo $vendor['_id']; ?>', <?php echo $bank_index; ?>, true)" <?php echo $bank['bank_payout'] ? 'checked' : ''; ?>>
<label for="payout_bank_<?php echo $vendor_index; ?>_<?php echo $bank_index; ?>" style="margin-bottom: 0; margin-left: 5px;">Set as Payout Bank</label>
</div>
</div>
</div>
</div>
</div>
@ -607,11 +640,11 @@ if ($_SESSION["isCustomer"] == true) {
})
.then(response => {
if (response.ok) {
console.log('Email update successful');
console.log('Profile updated successful');
location.reload();
// Handle any other actions after the successful email update
} else {
console.error('Email update failed');
console.error('Profile failed to update');
// Handle errors or display a message to the user
}
})
@ -654,7 +687,7 @@ if ($_SESSION["isCustomer"] == true) {
})
.then(response => {
if (response.ok) {
// location.reload();
location.reload();
// filter the delete action
document.getElementById('form-check-' + addressIndex).remove();
} else {
@ -942,62 +975,66 @@ if ($_SESSION["isCustomer"] == true) {
});
$('#submitBtn').on('click', function() {
console.log('clickkkkkkkk')
fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/' + vendorid)
.then(response => response.json())
.then(data => {
const existingAddresses = data.address || [];
console.log('clickkkkkkkk')
fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/' + vendorid)
.then(response => response.json())
.then(data => {
const existingAddresses = data.address || [];
const firstName = $('#addressFirstName').val();
const lastName = $('#addressLastName').val();
const contact = $('#addressContact').val();
const buildingNumber = $('#addressBuilding').val();
const street = $('#addressStreet').val();
const province = $('#provinceSelect :selected').text();
const city = $('#citySelect :selected').text();
const barangay = $('#barangaySelect :selected').text();
const country = $('#addressCountry').val();
const firstName = $('#addressFirstName').val();
const lastName = $('#addressLastName').val();
const contact = $('#addressContact').val();
const buildingNumber = $('#addressBuilding').val();
const street = $('#addressStreet').val();
const province = $('#provinceSelect :selected').text();
const city = $('#citySelect :selected').text();
const barangay = $('#barangaySelect :selected').text();
const country = $('#addressCountry').val();
const newAddress = {
first_name: firstName,
last_name: lastName,
phone: contact,
address_1: buildingNumber,
address_2: street,
city: city,
province: province,
barangay: barangay,
country: country,
};
const newAddress = {
first_name: firstName,
last_name: lastName,
phone: contact,
address_1: buildingNumber,
address_2: street,
city: city,
province: province,
barangay: barangay,
country: country,
};
// Check if it's the first address
if (existingAddresses.length === 0) {
newAddress.shipping = true; // Set shipping to true
}
existingAddresses.push(newAddress);
existingAddresses.push(newAddress);
return fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/' + vendorid, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
address: existingAddresses
}),
});
})
.then(response => {
if (response.ok) {
location.reload();
} else {
console.error('Failed to submit data');
alert('Failed to submit data');
}
})
.catch(error => {
console.error('Error:', error);
alert('Error submitting data');
});
});
return fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/' + vendorid, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
address: existingAddresses
}),
});
})
.then(response => {
if (response.ok) {
location.reload();
} else {
console.error('Failed to submit data');
alert('Failed to submit data');
}
})
.catch(error => {
console.error('Error:', error);
alert('Error submitting data');
});
});
});
@ -1180,6 +1217,27 @@ if ($_SESSION["isCustomer"] == true) {
if (!updateResponse.ok) {
throw new Error(`Failed to update address: ${updateResponse.status}`);
}
// console.log(`Address updated successfully for vendor ${vendorid}`);
const selectedBillingElement = document.getElementById('selectedBillingFName');
const selectedBillingLNameElement = document.getElementById('selectedBillingLName');
const selectedBillingContactElement = document.getElementById('selectedBillingContact');
const sBillingBuildingElement = document.getElementById('sBillingBuilding');
const sBillingStreetElement = document.getElementById('sBillingStreet');
const sBillingBarangayElement = document.getElementById('sBillingBarangay');
const sBillingCityElement = document.getElementById('sBillingCity');
const sBillingProvinceElement = document.getElementById('sBillingProvince');
const sBillingCountryElement = document.getElementById('sBillingCountry');
if (selectedBillingElement) {
selectedBillingElement.textContent = vendorsData.address[addressIndex].first_name;
selectedBillingLNameElement.textContent = vendorsData.address[addressIndex].last_name;
selectedBillingContactElement.textContent = 'Contact #: ' + vendorsData.address[addressIndex].phone;
sBillingBuildingElement.textContent = vendorsData.address[addressIndex].address_1;
sBillingStreetElement.textContent = vendorsData.address[addressIndex].address_2;
sBillingBarangayElement.textContent = vendorsData.address[addressIndex].barangay;
sBillingCityElement.textContent = vendorsData.address[addressIndex].city;
sBillingProvinceElement.textContent = vendorsData.address[addressIndex].province;
sBillingCountryElement.textContent = vendorsData.address[addressIndex].country;
}
console.log(`Address updated successfully for vendor ${vendorid}`);
} catch (error) {
console.error('Error updating address:', error.message);
@ -1337,7 +1395,7 @@ if ($_SESSION["isCustomer"] == true) {
$banner_style2 = 'background-color: orange !important; background-image: none !important; width: 100% !important; height: 200px !important; background-size: cover !important; background-position: center !important; border-radius: 5px !important;';
echo '<div class="image-thumb-preview ec-image-preview v-img" style="' . $banner_style2 . '"></div>';
} else {
echo '<img class="image-thumb-preview ec-image-preview v-img" src="' . $vendorData['vendor_banner'] . '" alt="edit" />';
echo '<img loading="lazy" class="image-thumb-preview ec-image-preview v-img" src="' . $vendorData['vendor_banner'] . '" alt="edit" />';
}
?>
</div>
@ -1353,9 +1411,9 @@ if ($_SESSION["isCustomer"] == true) {
<div class="thumb-preview ec-preview">
<div class="image-thumb-preview">
<?php if (!empty($vendorData['vendor_image'])): ?>
<img class="image-thumb-preview ec-image-preview v-img" src="<?php echo $vendorData['vendor_image']; ?>" alt="edit" />
<img loading="lazy" class="image-thumb-preview ec-image-preview v-img" src="<?php echo $vendorData['vendor_image']; ?>" alt="edit" />
<?php else: ?>
<img class="image-thumb-preview ec-image-preview v-img" src="https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg" alt="edit" />
<img loading="lazy" class="image-thumb-preview ec-image-preview v-img" src="https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg" alt="edit" />
<?php endif; ?>
</div>
</div>
@ -1434,10 +1492,10 @@ if ($_SESSION["isCustomer"] == true) {
})
.then(secondResponse => {
if (secondResponse.ok) {
console.log('Second request successful');
location.reload();
console.log('Profile Image Uploaded Successful');
// location.reload();
} else {
console.error('Second request failed');
console.error('Profile Image Failed to Upload');
}
})
.catch(error => {
@ -1527,10 +1585,10 @@ if ($_SESSION["isCustomer"] == true) {
})
.then(secondResponse => {
if (secondResponse.ok) {
console.log('Second request successful');
location.reload();
console.log('Profile Banner Uploaded Successful');
// location.reload();
} else {
console.error('Second request failed');
console.error('Profile Banner Failed to Upload');
}
})
.catch(error => {
@ -1620,7 +1678,7 @@ if ($_SESSION["isCustomer"] == true) {
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -1658,7 +1716,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1680,7 +1738,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1702,7 +1760,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1724,7 +1782,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1748,7 +1806,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -1763,7 +1821,7 @@ if ($_SESSION["isCustomer"] == true) {
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -131,14 +131,14 @@ if ($_SESSION["isCustomer"] == true) {
<!-- <div class="ec-vendor-block-bg" style="background-image: url(<?php #echo $vendorData['vendor_banner']
?>) !important;"></div> -->
<div class="ec-vendor-block-detail">
<!-- <img class="v-img" src=<?php #echo $vendorData['vendor_image']
<!-- <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 class="v-img" src=<?php echo $vendorData['vendor_image'] ?> alt="vendor image">
<img loading="lazy" class="v-img" src=<?php echo $vendorData['vendor_image'] ?> alt="vendor image">
<?php } else { ?>
<img class="v-img" src="https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg" alt="vendor image">
<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>
@ -177,12 +177,12 @@ if ($_SESSION["isCustomer"] == true) {
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img class="ec-image-preview" src="<?php echo $first_image_url; ?>" alt="edit" />
<img loading="lazy" class="ec-image-preview" src="<?php echo $first_image_url; ?>" alt="edit" />
<?php
}
} else {
?>
<img class="ec-image-preview" src="assets/images/product-image/vender-upload-preview.jpg" alt="edit" />
<img loading="lazy" class="ec-image-preview" src="assets/images/product-image/vender-upload-preview.jpg" alt="edit" />
<?php
}
?>
@ -205,7 +205,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<div class="thumb-preview ec-preview">
<div class="image-thumb-preview">
<img class="image-thumb-preview ec-image-preview" src="<?php echo $image_url; ?>" alt="edit" />
<img loading="lazy" class="image-thumb-preview ec-image-preview" src="<?php echo $image_url; ?>" alt="edit" />
<button class="delete-image-button" onclick="deleteImage('<?php echo $array['_id']; ?>', <?php echo $index; ?>)">Delete</button>
</div>
</div>
@ -221,7 +221,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<div class="thumb-preview ec-preview">
<div class="image-thumb-preview">
<img class="image-thumb-preview ec-image-preview" src="assets/images/product-image/vender-upload-thumb-preview.jpg" alt="edit" />
<img loading="lazy" class="image-thumb-preview ec-image-preview" src="assets/images/product-image/vender-upload-thumb-preview.jpg" alt="edit" />
</div>
</div>
</div>
@ -790,36 +790,36 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Swiper -->
<div class="qty-product-cover">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
<div class="qty-nav-thumb">
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
</div>
<div class="qty-slide">
<img class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
</div>
</div>
</div>
@ -912,7 +912,7 @@ if ($_SESSION["isCustomer"] == true) {
<!-- raymart remove popup feb 20 2024 -->
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -950,7 +950,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -972,7 +972,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -994,7 +994,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1016,7 +1016,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -1040,7 +1040,7 @@ if ($_SESSION["isCustomer"] == true) {
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -1055,7 +1055,7 @@ if ($_SESSION["isCustomer"] == true) {
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">

View File

@ -151,7 +151,7 @@ if ($_SESSION["isVendor"] == true) {
<!-- <section class="labels section-space-p">
<div class="container">
<div class="row">
<img src="./assets/images/comingsoon.png" alt="">
<img loading="lazy" src="./assets/images/comingsoon.png" alt="">
</div>
</div>
</section> -->
@ -182,20 +182,31 @@ if ($_SESSION["isVendor"] == true) {
<div class="ec-product-inner">
<!-- raymart added style for checkboxes feb 19 2024 -->
<input type="checkbox" class="product-checkbox" style="width: 20px; height: 20px; "value="<?php echo $product["_id"]; ?>">
<div class="ec-pro-image-outer">
<div class="ec-pro-image-outer" style="max-width: 290px; height: 350px;">
<div class="ec-pro-image">
<a href="product-left-sidebar.php?id=<?php echo $product["_id"]; ?>" class="image">
<!-- <a href="shop-left-sidebar-col-4.php" class="image"> -->
<img class="main-image" src="<?php echo $product["product_image"]; ?>" alt="Product" />
<!-- <img class="hover-image" src="<?php echo $product["product_image"]; ?>" alt="Product" /> -->
<img loading="lazy" class="main-image" src="<?php echo $product["images"]; ?>" alt="Product" style="border: 1px solid #eeeeee; height: 330px; object-fit: cover;"/>
<!-- <img loading="lazy" class="hover-image" src="<?php echo $product["images"]; ?>" alt="Product" /> -->
</a>
<span class="ec-com-remove ec-remove-wishlist">
<a href="javascript:void(0)" class="remove-product" data-product-id="<?php echo $product["_id"]; ?>" id="removeItem<?php echo $product["_id"]; ?>">×</a>
</span>
<!-- raymart edit action feb 14 2024 -->
<div class="ec-pro-actions">
<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>
<div class="ec-pro-actions" style="bottom: -70px;">
<!-- <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 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>
<?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>
<?php else : ($product["regular_price"] == "" || $product["regular_price"] == null) ?>
<?php endif; ?>
</div>
</div>
</div>
@ -227,7 +238,7 @@ if ($_SESSION["isVendor"] == true) {
echo '<span class="ec-price">';
echo '<span class="old-price">' . $product['regular_price'] . '</span>';
echo '<span class="new-price">' . $product['sale_price'] . '</span>';
echo '</span>';
echo '</span>';
} else {
echo '<span class="new-price">' . $product['regular_price'] . '</span>';
}
@ -335,7 +346,7 @@ if ($_SESSION["isVendor"] == true) {
if (xhr.status === 200) {
// Product removed successfully, you can handle the UI update here if needed
console.log('Product removed successfully');
// location.reload(); // Refresh the page after removing the product
location.reload(); // Refresh the page after removing the product
} else {
// Handle error response
console.error('Error removing product:', xhr.responseText);
@ -368,9 +379,9 @@ if ($_SESSION["isVendor"] == true) {
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.DONE) {
if (xhr.status === 200) {
if (xhr.status === 0) {
console.log('Products removed successfully');
// location.reload();
location.reload();
} else {
console.error('Error removing products:', xhr.responseText);
}
@ -424,7 +435,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="col-lg-4 col-md-6 col-sm-12 col-12 margin-b-30">
<div class="ec-offer-coupon">
<div class="ec-cpn-brand">
<img class="ec-brand-img" src="assets/images/offer-image/2.jpg" alt="" />
<img loading="lazy" class="ec-brand-img" src="assets/images/offer-image/2.jpg" alt="" />
</div>
<div class="ec-cpn-title">
<h2 class="coupon-title">Get 15% off on branded Shoes</h2>
@ -441,7 +452,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="col-lg-4 col-md-6 col-sm-12 col-12 margin-b-30">
<div class="ec-offer-coupon">
<div class="ec-cpn-brand">
<img class="ec-brand-img" src="assets/images/offer-image/3.jpg" alt="" />
<img loading="lazy" class="ec-brand-img" src="assets/images/offer-image/3.jpg" alt="" />
</div>
<div class="ec-cpn-title">
<h2 class="coupon-title">Get 30% off on branded chair</h2>
@ -458,7 +469,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="col-lg-4 col-md-6 col-sm-12 col-12 m-auto">
<div class="ec-offer-coupon">
<div class="ec-cpn-brand">
<img class="ec-brand-img" src="assets/images/offer-image/4.jpg" alt="" />
<img loading="lazy" class="ec-brand-img" src="assets/images/offer-image/4.jpg" alt="" />
</div>
<div class="ec-cpn-title">
<h2 class="coupon-title">Get 50% off on branded Hand Bags</h2>
@ -544,7 +555,7 @@ if ($_SESSION["isVendor"] == true) {
<!-- Recent Purchase Popup -->
<!-- <div class="recent-purchase">
<img src="assets/images/product-image/1.jpg" alt="payment image">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
@ -584,7 +595,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_01.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon"></span>
</div>
<!-- Display Name & Last Seen -->
@ -606,7 +617,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_02.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-online"></span>
</div>
<!-- Display Name & Last Seen -->
@ -628,7 +639,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_03.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -650,7 +661,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<img src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<img loading="lazy" src="assets/images/whatsapp/profile_04.jpg" class="ec-user-img" alt="Profile image">
<span class="ec-status-icon ec-offline"></span>
</div>
<!-- Display Name & Last Seen -->
@ -674,7 +685,7 @@ if ($_SESSION["isVendor"] == true) {
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
@ -690,7 +701,7 @@ if ($_SESSION["isVendor"] == true) {
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img alt="icon" src="assets/images/common/settings.png" />
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">
@ -777,7 +788,7 @@ if ($_SESSION["isVendor"] == true) {
<!-- <script src="assets/js/tester10.js"></script> -->
<?php
if ($_SESSION["is_test"]==true) {
echo '<script src="assets/js/tester10.js"></script>';
echo '<script src="assets/js/tester11.js"></script>';
} else {
echo '<script src="assets/js/produc3.js"></script>';
}