Compare commits

...

70 Commits

Author SHA1 Message Date
MarkHipe c1c7611bb3 Merge pull request 'louie_branch' (#92) from louie_branch into main
Reviewed-on: #92
2024-06-05 15:53:37 +08:00
jouls bdc6f313e6 Merge branch 'main' of https://code.obanana.io/Obanana.Corporation/obanana_b2b_test into louie_branch 2024-06-05 15:44:12 +08:00
jouls c0f77b9415 added required fields for vendor first name 2024-06-05 15:43:47 +08:00
MarkHipe 58281130a5 Merge pull request 'new changes' (#91) from mark_4 into main
Reviewed-on: #91
2024-06-05 15:41:22 +08:00
mark H 86bd2d6f47 new changes 2024-06-05 15:40:23 +08:00
jouls cfe9c96697 Merge branch 'main' of https://code.obanana.io/Obanana.Corporation/obanana_b2b_test into louie_branch 2024-06-03 10:59:53 +08:00
jouls c382fa82bf added total payouts per vendor card in admin side 2024-05-31 18:39:17 +08:00
MarkHipe b5fd8dae3c Merge pull request 'search prod fix error' (#90) from mark_4 into main
Reviewed-on: #90
2024-05-30 13:38:33 +08:00
mark H bcfae881a6 search prod fix error 2024-05-30 13:37:52 +08:00
MarkHipe f24b1e303d Merge pull request 'minor fixes in label in user-profile/vendor-settings and minor ui changes in header.php' (#89) from gelo_branch into main
Reviewed-on: #89
2024-05-30 10:34:17 +08:00
gelonspr cb52a82b40 minor fixes in label in user-profile/vendor-settings and minor ui changes in header.php 2024-05-30 10:33:40 +08:00
MarkHipe 35928618e9 Merge pull request 'mark_4' (#88) from mark_4 into main
Reviewed-on: #88
2024-05-30 10:30:28 +08:00
mark H 306edd1db5 Merge branch 'main' of https://code.obanana.io/Obanana.Corporation/obanana_b2b_test into mark_4 2024-05-30 10:29:44 +08:00
mark H 3e8caa1e28 obanana rating 2024-05-30 10:03:49 +08:00
MarkHipe ba91559ff3 Merge pull request 'louie_branch' (#87) from louie_branch into main
Reviewed-on: #87
2024-05-30 10:03:35 +08:00
jouls 4a8603ee48 fixed address section of vendor-settings and user-profile 2024-05-28 18:23:48 +08:00
jouls 58ac2155cb Added required prop on product name, slug, width, height, length, and weight. 2024-05-28 15:53:17 +08:00
jouls 25e991dc37 renamed displayed property on vendor profile under admin page 2024-05-28 14:34:12 +08:00
jouls b2deee4405 added logical handling for seller since with empty date_registered fields 2024-05-23 10:49:46 +08:00
jouls fbb4cd8082 removed duplicated contact us number and email 2024-05-23 10:49:26 +08:00
jouls f616306a45 added pagination admin vendor payments and payouts table 2024-05-22 18:46:36 +08:00
jouls 4620fde33d fixed vendor name and customer name on index 2024-05-22 15:46:35 +08:00
jouls cffda7e9e5 edited vendor payouts breadcrumbs 2024-05-22 15:46:15 +08:00
MarkHipe 69a94fdfb0 Merge pull request 'mark_4' (#86) from mark_4 into main
Reviewed-on: #86
2024-05-21 09:56:39 +08:00
mark H ac3209663e Merge branch 'main' of https://code.obanana.io/Obanana.Corporation/obanana_b2b_test into mark_4 2024-05-21 09:43:55 +08:00
mark H 4b996b873c obanana chat 2024-05-21 09:18:10 +08:00
MarkHipe 82815035da Merge pull request 'added address label on vendor and buyer profile settings, initialized map on admin, fixed missing header on vendor-payments' (#85) from gelo_branch into main
Reviewed-on: #85
2024-05-21 09:17:37 +08:00
gelonspr bc7c212b91 added address label on vendor and buyer profile settings, initialized map on admin, fixed missing header on vendor-payments 2024-05-21 09:15:21 +08:00
MarkHipe 0f48dfc231 Merge pull request 'louie_branch' (#84) from louie_branch into main
Reviewed-on: #84
2024-05-21 09:12:13 +08:00
jouls af34ad5738 improved styling of badge for order status on vendor dashboard 2024-05-15 18:16:59 +08:00
jouls 53698a00b0 changed button size on admin order-history to medium 2024-05-15 18:14:52 +08:00
jouls 813f7eb8b9 added javascript for line chart of monthly users 2024-05-15 18:14:32 +08:00
jouls a5b1d41094 added badge and improved styling on order status, fixed profile size on new customers and new vendors 2024-05-15 18:14:16 +08:00
jouls e1d31a0a47 imporvements on stylings and renaming of line chart for monthly users 2024-05-15 18:13:34 +08:00
jouls 092afe0fa1 fixed bug on edit and delete bank function 2024-05-15 18:10:19 +08:00
jouls 68959b61ce added array_reverse on payout data table to show latest payouts first on the table 2024-05-15 18:09:39 +08:00
jouls 40549f484e added required field for tracking number and courier name in to ship status on orders edit 2024-05-15 18:08:53 +08:00
jouls 3b6e0b843d fixed display of vendor or customer name on index 2024-05-15 18:08:02 +08:00
jouls 67ef426e36 removed to upper on first name and last name 2024-05-15 18:07:04 +08:00
MarkHipe 0b12c0bae7 Merge pull request 'mark_4' (#83) from mark_4 into main
Reviewed-on: #83
2024-05-08 18:07:24 +08:00
mark H 2c47485103 Merge branch 'main' of https://code.obanana.io/Obanana.Corporation/obanana_b2b_test into mark_4 2024-05-08 18:05:13 +08:00
mark H 94012e7ccb update exempt To checkout status 2024-05-08 18:04:59 +08:00
MarkHipe 3a513218c5 Merge pull request 'gelo_branch' (#82) from gelo_branch into main
Reviewed-on: #82
2024-05-08 18:03:59 +08:00
gelonspr f2adac3fbc minor changes 2024-05-08 18:02:41 +08:00
gelonspr d0f51e2a03 minor changes in user-profile.php 2024-05-08 18:01:19 +08:00
gelonspr 6efdc5f4dd added message if wishlist is empty 2024-05-08 18:00:36 +08:00
gelonspr 9e5694145a Remove checkout option on Account icon and removed category button in login.php 2024-05-08 18:00:10 +08:00
gelonspr 2ef5f188d7 Add function to checkbox by clicking the category text on sidebar under shop-list-left-sidebar.php and Adjust Naming on shop-list-left-sidebar.php 2024-05-08 17:57:53 +08:00
MarkHipe bf27328ec3 Merge pull request 'louie_branch' (#81) from louie_branch into main
Reviewed-on: #81
2024-05-08 17:54:16 +08:00
jouls 4fe563d212 added dynamic information of vendor in admin vendor profile 2024-05-08 17:49:41 +08:00
jouls ac7fcc6942 added required prop on certain input fields 2024-05-08 17:49:16 +08:00
jouls b254e6241d added reload on delete selected products 2024-05-08 15:39:59 +08:00
jouls eed7c3d7b1 added edit and delete functionality on vendors bank information 2024-05-08 14:20:48 +08:00
jouls d0e49d0ea4 added strtoupper to control possible errors on payment status 2024-05-08 14:20:14 +08:00
MarkHipe fd8016afd0 Merge pull request 'mark_4' (#80) from mark_4 into main
Reviewed-on: #80
2024-05-03 18:46:44 +08:00
mark H 7c5c0cab4f Merge branch 'main' of https://code.obanana.io/Obanana.Corporation/obanana_b2b_test into mark_4 2024-05-03 18:24:24 +08:00
mark H 6160b494c9 new update 2024-05-03 18:21:20 +08:00
MarkHipe 478b74c465 Merge pull request 'stacy_branch' (#79) from stacy_branch into main
Reviewed-on: #79
2024-05-03 18:15:57 +08:00
Stacy 62c2d9ae1b pagination & search filter 2024-05-03 18:13:39 +08:00
Stacy 7d44fae6bd cart & wishlist countdown in mobile view 2024-05-03 18:12:24 +08:00
Stacy 02b2f799db removed products for Sale/Inquiry in Vendor's Page 2024-05-03 18:09:25 +08:00
Stacy 1d6b14208d Vendor: Remove Buttons - Wishlist and Cart 2024-05-03 18:07:31 +08:00
Stacy 8439191bbc selection button for address 2024-05-03 18:05:45 +08:00
MarkHipe 3d686c607f Merge pull request 'fixed dynamic data for admin sales report chart' (#78) from gelo_branch into main
Reviewed-on: #78
2024-05-03 17:05:16 +08:00
gelonspr 22a3a404aa fixed dynamic data for admin sales report chart 2024-05-03 17:00:39 +08:00
MarkHipe eec3c04121 Merge pull request 'louie_branch' (#77) from louie_branch into main
Reviewed-on: #77
2024-05-03 16:58:01 +08:00
jouls 0728acbcc6 Merge branch 'main' of https://code.obanana.io/Obanana.Corporation/obanana_b2b_test into louie_branch 2024-05-03 16:55:32 +08:00
MarkHipe d4f61153d2 Merge pull request 'minor bugs' (#76) from raymart_branch into main
Reviewed-on: #76
2024-05-03 16:34:13 +08:00
jouls 4200c4e155 minor fixes on stylings inside modal box 2024-05-02 17:22:39 +08:00
jouls 2da9f77349 Improved data table and layout of vendouy payouts page 2024-05-02 15:59:16 +08:00
61 changed files with 11193 additions and 10817 deletions

View File

@ -18,7 +18,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -458,129 +461,7 @@
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -7,12 +7,17 @@ $(document).ready(function() {
fetchData()
.then(function (response) {
responseData = response.data;
console.log(responseData);
const completedOrdersCount = countCompletedOrders(responseData);
const toPayOrdersCount = countToPayOrders(responseData);
const toShipOrdersCount = countToShipOrders(responseData);
const returnedOrdersCount = countReturnedOrders(responseData);
const { cod_monthly_totals, obpay_monthly_totals, months } = countMonthlySales(responseData);
const { cod_daily_totals, obpay_daily_totals } = countDailySales(responseData);
const { cod_yearly_totals, obpay_yearly_totals, years } = countYearlySales(responseData);
initializeChart(completedOrdersCount, toPayOrdersCount, toShipOrdersCount, returnedOrdersCount);
initializeSalesChart(cod_daily_totals, obpay_daily_totals, cod_monthly_totals,
obpay_monthly_totals, months, cod_yearly_totals, obpay_yearly_totals, years
);
})
.catch(function (error) {
console.error('Error fetching data:', error);
@ -47,6 +52,207 @@ $(document).ready(function() {
return completedOrdersCount;
}
function countYearlySales(data) {
const now = new Date();
const years = [];
const cod_yearly_totals = Array(5).fill(0);
const obpay_yearly_totals = Array(5).fill(0);
// Initialize years array with the current year and the previous four years
for (let i = 4; i >= 0; i--) {
const year = new Date(now.getFullYear() - i, 0, 1); // January 1st of each year
years.push(year);
}
data.forEach(order => {
const orderDate = new Date(order.order_date);
orderDate.setHours(0, 0, 0, 0);
// Check if payment status exists and is not null
if (order.payment && order.payment.status) {
const payment_status = order.payment.status.toLowerCase();
years.forEach((year, index) => {
if (orderDate.getFullYear() === year.getFullYear()) {
if (payment_status === "paid") {
const total_amount = parseInt(order.total_amount);
if (order.payment_method === "Cash On Delivery") {
cod_yearly_totals[4 - index] += total_amount; // Adjust index since we are going from current to past
} else if (order.payment_method === "Obananapay") {
obpay_yearly_totals[4 - index] += total_amount;
}
}
}
});
}
});
cod_yearly_totals.reverse();
obpay_yearly_totals.reverse();
return {
cod_yearly_totals,
obpay_yearly_totals,
years: years.map(year => year.getFullYear().toString()) // Return year labels for use in charts or displays
};
}
function countMonthlySales(data) {
const now = new Date();
const months = [];
const cod_monthly_totals = Array(12).fill(0);
const obpay_monthly_totals = Array(12).fill(0);
for (let i = 11; i >= 0; i--) {
const month = new Date(now.getFullYear(), now.getMonth() - i, 1);
months.push(month);
}
data.forEach(order => {
if (order.payment && order.payment.status){
const orderDate = new Date(order.order_date);
orderDate.setHours(0, 0, 0, 0);
const payment_status = order.payment.status.toLowerCase();
months.forEach((month, index) => {
if (orderDate.getFullYear() === month.getFullYear() && orderDate.getMonth() === month.getMonth()) {
if (payment_status === "paid") {
const total_amount = parseInt(order.total_amount);
if (order.payment_method === "Cash On Delivery") {
cod_monthly_totals[11 - index] += total_amount;
} else if (order.payment_method === "Obananapay") {
obpay_monthly_totals[11 - index] += total_amount;
}
}
}
});
}
});
console.log(cod_monthly_totals)
cod_monthly_totals.reverse();
obpay_monthly_totals.reverse();
return {
cod_monthly_totals,
obpay_monthly_totals,
months: months.map(month => `${month.toLocaleString('default', { month: 'short' })} ${month.getFullYear()}`) // Return month labels for use in charts or displays
};
}
function countDailySales(data) {
const today = new Date();
today.setHours(0, 0, 0, 0);
const sevenDaysAgo = new Date();
sevenDaysAgo.setDate(today.getDate() - 6);
sevenDaysAgo.setHours(0, 0, 0, 0);
const sixDaysAgo = new Date();
sixDaysAgo.setDate(today.getDate() - 5);
sixDaysAgo.setHours(0, 0, 0, 0);
const fiveDaysAgo = new Date();
fiveDaysAgo.setDate(today.getDate() - 4);
fiveDaysAgo.setHours(0, 0, 0, 0);
const fourDaysAgo = new Date();
fourDaysAgo.setDate(today.getDate() - 3);
fourDaysAgo.setHours(0, 0, 0, 0);
const threeDaysAgo = new Date();
threeDaysAgo.setDate(today.getDate() - 2);
threeDaysAgo.setHours(0, 0, 0, 0);
const twoDaysAgo = new Date();
twoDaysAgo.setDate(today.getDate() - 1);
twoDaysAgo.setHours(0, 0, 0, 0);
//variables for total daily sales on COD
let cod_total_7 = 0;
let cod_total_6 = 0;
let cod_total_5 = 0;
let cod_total_4 = 0;
let cod_total_3 = 0;
let cod_total_2 = 0;
let cod_total_1 = 0;
//variables for total daily sales on ObananaPay
let obpay_total_7 = 0;
let obpay_total_6 = 0;
let obpay_total_5 = 0;
let obpay_total_4 = 0;
let obpay_total_3 = 0;
let obpay_total_2 = 0;
let obpay_total_1 = 0;
data.forEach(order => {
const orderDate = new Date(order.order_date);
orderDate.setHours(0, 0, 0, 0);
const payment_status = order.payment.status;
if (orderDate.getTime() === sevenDaysAgo.getTime() ) {
if(payment_status.toLowerCase() === "paid" && order.payment_method === "Cash On Delivery" ){
cod_total_7 += parseInt(order.total_amount);
console.log(order)
// console.log("compare:" + sevenDaysAgo)
}else if (payment_status.toLowerCase() === "paid" && order.payment_method === "Obananapay") {
obpay_total_7 += parseInt(order.total_amount);
}
}else if (orderDate.getTime() === sixDaysAgo.getTime() ) {
if(payment_status.toLowerCase() === "paid" && order.payment_method === "Cash On Delivery" ){
cod_total_6 += parseInt(order.total_amount);
console.log(order)
// console.log("compare:" + sevenDaysAgo)
}else if (payment_status.toLowerCase() === "paid" && order.payment_method === "Obananapay") {
obpay_total_6 += parseInt(order.total_amount);
}
}else if (orderDate.getTime() === fiveDaysAgo.getTime() ) {
if(payment_status.toLowerCase() === "paid" && order.payment_method === "Cash On Delivery" ){
cod_total_5 += parseInt(order.total_amount);
console.log(order)
// console.log("compare:" + sevenDaysAgo)
}else if (payment_status.toLowerCase() === "paid" && order.payment_method === "Obananapay") {
obpay_total_5 += parseInt(order.total_amount);
}
}else if (orderDate.getTime() === fourDaysAgo.getTime() ) {
if(payment_status.toLowerCase() === "paid" && order.payment_method === "Cash on Delivery" ){
cod_total_4 += parseInt(order.total_amount);
console.log(order)
// console.log("compare:" + sevenDaysAgo)
}else if (payment_status.toLowerCase() === "paid" && order.payment_method === "Obananapay") {
obpay_total_4 += parseInt(order.total_amount);
}
}else if (orderDate.getTime() === threeDaysAgo.getTime() ) {
if(payment_status.toLowerCase() === "paid" && order.payment_method === "Cash On Delivery" ){
cod_total_3 += parseInt(order.total_amount);
console.log(order)
// console.log("compare:" + sevenDaysAgo)
}else if (payment_status.toLowerCase() === "paid" && order.payment_method === "Obananapay") {
obpay_total_3 += parseInt(order.total_amount);
}
}else if (orderDate.getTime() === twoDaysAgo.getTime() ) {
if(payment_status.toLowerCase() === "paid" && order.payment_method === "Cash On Delivery" ){
cod_total_2 += parseInt(order.total_amount);
console.log(order)
// console.log("compare:" + sevenDaysAgo)
}else if (payment_status.toLowerCase() === "paid" && order.payment_method === "Obananapay") {
obpay_total_2 += parseInt(order.total_amount);
}
}else if (orderDate.getTime() === today.getTime() ) {
if(payment_status.toLowerCase() === "paid" && order.payment_method === "Cash On Delivery" ){
cod_total_1 += parseInt(order.total_amount);
console.log(order)
// console.log("compare:" + sevenDaysAgo)
}else if (payment_status.toLowerCase() === "paid" && order.payment_method === "Obananapay") {
obpay_total_1 += parseInt(order.total_amount);
}
}
});
const cod_daily_totals = [cod_total_7, cod_total_6, cod_total_5, cod_total_4, cod_total_3, cod_total_2, cod_total_1,];
const obpay_daily_totals = [obpay_total_7, obpay_total_6, obpay_total_5, obpay_total_4, obpay_total_3, obpay_total_2, obpay_total_1,];
// console.log(total_7);
return { cod_daily_totals, obpay_daily_totals };
}
function countToPayOrders(data) {
const filteredData = getCurrentMonthData(data);
let toPayOrdersCount = 0;
@ -127,11 +333,12 @@ $(document).ready(function() {
}
}
});
} else {
}
}
function initializeSalesChart(cod_daily_totals, obpay_daily_totals, cod_monthly_totals, obpay_monthly_totals, months, cod_yearly_totals, obpay_yearly_totals, years) {
var acquisition = document.getElementById("salesChart");
if (acquisition !== null) {
function updateDailyLabels() {
@ -151,23 +358,23 @@ $(document).ready(function() {
// Updating labelsDaily dynamically
var labelsDaily = updateDailyLabels();
var labelsMonthly = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
var labelsYearly = ["2021", "2022", "2023", "2024", "2025"];
var labelsMonthly = months;
var labelsYearly = years;
var acqData = [
{ //daily data
first: [91, 180, 44, 75, 150, 66, 70], //COD
second: [300, 44, 177, 76, 23, 189, 12], //ObPay
first: cod_daily_totals, //COD
second: obpay_daily_totals, //ObPay
third: [44, 167, 102, 123, 183, 88, 134] //Paymongo
},
{ //monthly data
first: [144, 44, 110, 5, 123, 89, 12], //COD
second: [22, 123, 45, 130, 112, 54, 181], //ObPay
first: cod_monthly_totals, //COD
second: obpay_monthly_totals, //ObPay
third: [55, 44, 144, 75, 155, 166, 70] //Paymongo
},
{ //yearly data
first: [134, 80, 123, 65, 171, 33, 22], //COD
second: [44, 144, 77, 76, 123, 89, 112], //ObPay
third: [156, 23, 165, 88, 112, 54, 181] //Paymongo
first: cod_yearly_totals, //COD
second: obpay_yearly_totals, //ObPay
third: [156, 23, 165, 88, 112 ] //Paymongo
}
];
@ -253,8 +460,8 @@ $(document).ready(function() {
},
ticks: {
beginAtZero: true,
stepSize: 100,
max: 1000
stepSize: 20000,
max: 200000
}
}
]
@ -277,6 +484,7 @@ $(document).ready(function() {
}
};
var ctx = document.getElementById("salesChart").getContext("2d");
var lineAcq = new Chart(ctx, configAcq);
document.getElementById("acqLegend").innerHTML = lineAcq.generateLegend();
@ -284,8 +492,8 @@ $(document).ready(function() {
var items = document.querySelectorAll(
"#user-acquisition .nav-tabs .nav-item"
);
items.forEach(function (item, index) {
item.addEventListener("click", function() {
items.forEach(function (item, index) {
item.addEventListener("click", function() {
// Determine which tab was clicked
var selectedTab = this.textContent.trim();
@ -313,9 +521,10 @@ $(document).ready(function() {
lineAcq.update();
});
});
});
items[0].click();
}
}
function convertToCSV(data) {
const now = new Date();
@ -377,4 +586,196 @@ $(document).ready(function() {
event.preventDefault();
downloadCSV('orders_data.csv');
});
let customer_data;
let vendor_data;
function getDataAndInitializeChart () {
userData()
.then(function (users){
vendorData()
.then(function (venues){
customer_data = users.data;
vendor_data = venues.data;
const {customer_monthly_total, months} = countCustomerReg(customer_data)
const { vendor_monthly_total} = countVendorReg(vendor_data);
initializeActivityChart(customer_monthly_total, vendor_monthly_total, months);
})
})
}
getDataAndInitializeChart();
function userData(){
return axios.get('https://api.obanana.shop/api/v1/customers');
}
function vendorData(){
return axios.get('https://api.obanana.shop/api/v1/vendors');
}
function countCustomerReg(customers) {
const currentDate = new Date();
const monthLabels = [];
const customer_monthly_total = Array(12).fill(0);
for (let i = 11; i >= 0; i--) {
const month = new Date(currentDate.getFullYear(), currentDate.getMonth() - i, 1);
monthLabels.push(month);
}
console.log(monthLabels);
customers.forEach(customer => {
const regDate = new Date(customer.createdAt);
regDate.setHours(0, 0, 0, 0);
monthLabels.forEach((month, index) => {
let total_count = 0;
if (regDate.getFullYear() === month.getFullYear() && regDate.getMonth() === month.getMonth()) {
total_count ++;
customer_monthly_total[11 - index] += total_count;
}
});
});
console.log(customer_monthly_total)
customer_monthly_total.reverse();
return {
customer_monthly_total,
months: monthLabels.map(month => `${month.toLocaleString('default', { month: 'short' })} ${month.getFullYear()}`) // Return month labels for use in charts or displays
};
}
function countVendorReg(vendors) {
const currentDate = new Date();
const monthLabels = [];
const vendor_monthly_total = Array(12).fill(0);
for (let i = 11; i >= 0; i--) {
const month = new Date(currentDate.getFullYear(), currentDate.getMonth() - i, 1);
monthLabels.push(month);
}
console.log(monthLabels);
vendors.forEach(vendor => {
const regDate = new Date(vendor.createdAt);
regDate.setHours(0, 0, 0, 0);
monthLabels.forEach((month, index) => {
let total_count = 0;
if (regDate.getFullYear() === month.getFullYear() && regDate.getMonth() === month.getMonth()) {
total_count ++;
vendor_monthly_total[11 - index] += total_count;
}
});
});
console.log(vendor_monthly_total)
vendor_monthly_total.reverse();
return {
vendor_monthly_total,
};
}
function initializeActivityChart (customer_monthly_total, vendor_monthly_total, months){
var activity = document.getElementById("registry");
if (activity !== null) {
var activityData = [
{
first: customer_monthly_total,
second: vendor_monthly_total
}
];
var config = {
// The type of chart we want to create
type: "line",
// The data for our dataset
data: {
labels: months,
datasets: [
{
label: "Customer",
backgroundColor: "rgba(255, 165, 0, .3)",
borderColor: "rgba(255, 165, 0, .7)",
data: activityData[0].first,
lineTension: 0.3,
pointBackgroundColor: "rgba(255, 165, 0, 0)",
pointHoverBackgroundColor: "rgba(255, 165, 0, 1)",
pointHoverRadius: 3,
pointHitRadius: 30,
pointBorderWidth: 2,
pointStyle: "rectRounded"
},
{
label: "Vendors",
backgroundColor: "rgba(135, 206, 235, .3)",
borderColor: "rgba(135, 206, 235, .7)",
data: activityData[0].second,
lineTension: 0.3,
pointBackgroundColor: "rgba(135, 206, 235, 0)",
pointHoverBackgroundColor: "rgba(135, 206, 235, 1)",
pointHoverRadius: 3,
pointHitRadius: 30,
pointBorderWidth: 2,
pointStyle: "rectRounded"
}
]
},
// Configuration options go here
options: {
responsive: true,
maintainAspectRatio: false,
legend: {
display: false
},
scales: {
xAxes: [
{
gridLines: {
display: false
}
}
],
yAxes: [
{
gridLines: {
display: true,
color: "#eee",
zeroLineColor: "#eee"
},
ticks: {
beginAtZero: true,
stepSize: 10,
max: 30
}
}
]
},
tooltips: {
mode: "index",
titleFontColor: "#888",
bodyFontColor: "#555",
titleFontSize: 12,
bodyFontSize: 15,
backgroundColor: "rgba(256,256,256,0.95)",
displayColors: true,
xPadding: 20,
yPadding: 10,
borderColor: "rgba(220, 220, 220, 0.9)",
borderWidth: 2,
caretSize: 10,
caretPadding: 15
}
}
};
var ctx = document.getElementById("registry").getContext("2d");
var actLine = new Chart(ctx, config);
document.getElementById("actLegend").innerHTML = actLine.generateLegend();
}
}
});

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

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

View File

@ -1,6 +1,6 @@
<?php
$_SESSION["is_test"]=true;
$_SESSION["test_email_rcpt"]="junjihadbarroga@gmail.com";
$_SESSION["test_email_rcpt"]="kramblooda@gmail.com";
$_SESSION["sales_email"]="sales@obanana.com";
$_SESSION["data_endpoint"]="api.obanana.shop";
$_SESSION["transfer_fee"]=0.02;

View File

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

View File

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

View File

@ -17,6 +17,11 @@ if ($_SESSION["user_type"] != "admin") {
$products = productList();
$vendorSearchResult = $_SESSION["vendorSearchResult"];
$payoutResponse = getAllPayout($_SESSION["token"]);
$payoutData = json_decode($payoutResponse, true);
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
@ -103,16 +108,16 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
</button>
</div>
</div>
<div class="card card-default p-4 ec-card-space">
<div class="col-lg-6 col-md-12">
<form style="display:flex; margin-bottom:50px;" method="POST" action="vendor-card-action.php">
<input type="text" name="search" class="form-control" id="searchProduct" placeholder="search with vendor name..">
<button class="submit" type="submit" id="search-btn" class="btn btn-flat">
<i class="mdi mdi-magnify" style="font-size:20px; color:gray; margin-left:-40px;"></i>
</button>
</form>
</div>
<div class="col-lg-6 col-md-12">
<form style="display:flex; margin-bottom:50px;" method="POST" action="vendor-card-action.php">
<input type="text" name="search" class="form-control" id="searchProduct" placeholder="search with vendor name..">
<button class="submit" type="submit" id="search-btn" class="btn btn-flat">
<i class="mdi mdi-magnify" style="font-size:20px; color:gray; margin-left:-40px;"></i>
</button>
</form>
</div>
<div class="ec-vendor-card mt-m-24px row">
<?php
@ -126,16 +131,16 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
$end = $start + $vendorsPerPage - 1;
$vendorsCopy = $vendors;
if (!empty($_GET['search']) ) {
$filteredProducts=[];
if (!empty($_GET['search'])) {
$filteredProducts = [];
foreach ($vendorsCopy as $result) {
$vendorName = strtolower($result['user_login']);
$vendorName = strtolower($result['user_login']);
if (
strpos($vendorName,strtolower($_GET['search']))!==false
strpos($vendorName, strtolower($_GET['search'])) !== false
) {
$filteredProducts[] = $result;
} else{
} else {
}
}
@ -149,6 +154,19 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
// $vendors = vendorList();
for ($x = $start; $x <= $end && $x < $totalVendors; $x++) {
$vendor = $vendors[$x];
$vendorId = $vendor['_id'];
$totalPayoutAmount = 0; // Initialize the total net amount for the current vendor
// Loop through the payout data and sum up the net amounts
foreach ($payoutData as $payout) {
if ($payout['vendor_details'][0]['vendor_id'] == $vendorId) {
$totalPayoutAmount += $payout['net_amount'];
}
}
$totalPayoutAmount = number_format($totalPayoutAmount, 2, '.', ',');
?>
<div class="col-lg-6 col-xl-4 col-xxl-3">
<div class="card card-default mt-24px">
@ -177,7 +195,7 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<i class="mdi mdi-cellphone-basic mr-1"></i>
<span style="font-size:13px;">
<?php
echo isset($vendor['phone']) && !empty($vendor['phone']) ? $vendor['phone']: 'No Number yet';
echo isset($vendor['phone']) && !empty($vendor['phone']) ? $vendor['phone'] : 'No Number yet';
?>
</span>
</li>
@ -192,7 +210,7 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
</ul>
</a>
<div class="row justify-content-center ec-vendor-detail">
<div class="col-4">
<div class="col-3">
<h6 class="text-uppercase">Items</h6>
<?php
$vendorId = $vendor['_id'];
@ -202,13 +220,13 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
?>
<h5><?php echo count($product); ?></h5>
</div>
<div class="col-4">
<div class="col-3">
<h6 class="text-uppercase">Sell</h6>
<h5>1908</h5>
</div>
<div class="col-4">
<div class="col-6">
<h6 class="text-uppercase">Payout</h6>
<h5>$2691</h5>
<h5 style="font-size: 15px;"> <?php echo $totalPayoutAmount; ?></h5>
</div>
</div>
</div>
@ -231,11 +249,12 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<!-- 02-28-2024 Stacy modified this block of code -->
<div class="modal-body pt-0">
<div style="text-align: center; display: column; justify-content: center; align-items: center;" class="col-md-6">
<!-- <input type="file" id="fileInput<?php #echo $vendor['_id']; ?>" accept=".png, .jpg, .jpeg" /> -->
<!-- <input type="file" id="fileInput<?php #echo $vendor['_id'];
?>" accept=".png, .jpg, .jpeg" /> -->
<div class="thumb-edit" style="padding-left:120px; margin-bottom:-40px;">
<input style="display:none;" type='file' id="fileInput<?php echo $vendor['_id']; ?>" class="ec-image-upload" accept=".png, .jpg, .jpeg" onchange="previewImage('<?php echo $vendor['_id']; ?>')"/>
<input style="display:none;" type='file' id="fileInput<?php echo $vendor['_id']; ?>" class="ec-image-upload" accept=".png, .jpg, .jpeg" onchange="previewImage('<?php echo $vendor['_id']; ?>')" />
<label><i class="fa-solid fa-file-import" style="cursor:pointer;" onclick="document.getElementById('fileInput<?php echo $vendor['_id']; ?>').click()"></i></label>
</div>
<div class="vendor-image" style="padding-top:20px; ">
<?php
@ -248,30 +267,29 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
</div>
<script>
function updateButtonText(input){
function updateButtonText(input) {
var label = document.getElementById('fileInputLabel');
if (input.files.length > 0) {
label.innerHTML = '<i class="fa-solid fa-file-arrow-up"></i> ' + input.files[0].name;
}else{
} else {
label.innerHTML = '<i class="fa-solid fa-file-arrow-up"></i> Upload file';
}
}
// 03-14-2024 Jun Jihad modified this block of code to show preview of the image to be uploaded
function previewImage(vendorId) {
var fileInput = document.getElementById('fileInput' + vendorId);
var file = fileInput.files[0];
console.log('clicked hereee');
const reader = new FileReader();
var fileInput = document.getElementById('fileInput' + vendorId);
var file = fileInput.files[0];
console.log('clicked hereee');
const reader = new FileReader();
reader.onload = function (e) {
const dataUri = e.target.result;
document.getElementById('imgPrev' + vendorId).src = dataUri; // Fixed concatenation here
};
reader.onload = function(e) {
const dataUri = e.target.result;
document.getElementById('imgPrev' + vendorId).src = dataUri; // Fixed concatenation here
};
reader.readAsDataURL(file);
}
reader.readAsDataURL(file);
}
// 03-14-2024 Jun Jihad modified this block of code to show preview of the image to be uploaded
</script>
</div>
<form>
@ -378,296 +396,293 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
</div>
</div>
<script>
function deleteVendor(vendorId){
function deleteVendor(vendorId) {
let text = "Please confirm delete action!\nClick OK or Cancel button.";
if (confirm(text) == true) {
window.open("vendor-delete-action.php?id=" + vendorId, "_self");
}
}
function uploadFile(vendorId) {
const originalEmail = document.getElementById('email-' + vendorId).defaultValue;
const updatedEmail = document.getElementById('email-' + vendorId).value;
const isEmailModified = originalEmail !== updatedEmail;
const originalEmail = document.getElementById('email-' + vendorId).defaultValue;
const updatedEmail = document.getElementById('email-' + vendorId).value;
const isEmailModified = originalEmail !== updatedEmail;
if (isEmailModified) {
validateEmail(vendorId).then(isEmailAvailable => {
if (!isEmailAvailable) {
$('#email-error-message-' + vendorId).text('Email is already in use').show();
} else {
$('#email-error-message-' + vendorId).text('').hide();
if (isEmailModified) {
validateEmail(vendorId).then(isEmailAvailable => {
if (!isEmailAvailable) {
$('#email-error-message-' + vendorId).text('Email is already in use').show();
} else {
$('#email-error-message-' + vendorId).text('').hide();
var fileInput = document.getElementById('fileInput' + vendorId);
var file = fileInput.files[0];
const updatedUser = document.getElementById('user_login-' + vendorId).value;
const firstName = document.getElementById('firstName-' + vendorId).value;
const lastName = document.getElementById('lastName-' + vendorId).value;
const phone = document.getElementById('phone-' + vendorId).value;
const description = document.getElementById('description-' + vendorId).value;
const status = document.getElementById('status-' + vendorId).value;
const updatedAddress1 = document.getElementById('address_1-' + vendorId).value;
const updatedAddress2 = document.getElementById('address_2-' + vendorId).value;
const barangay = document.getElementById('barangay-' + vendorId).value;
const city = document.getElementById('city-' + vendorId).value;
const province = document.getElementById('province-' + vendorId).value;
const country = document.getElementById('country-' + vendorId).value;
var formData = new FormData();
formData.append('image_id', vendorId);
formData.append('category', 'vendor');
formData.append('image', file); // Include the file data in the form data
if(file){
fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/upload_image', {
method: 'POST',
body: formData
})
.then(response => {
if (response.ok) {
return response.json();
} else {
console.error('File upload failed');
throw new Error('File upload failed');
}
})
.then(result => {
const filename = result.filename;
const payload = {
vendor_image: `https://<?php echo $_SESSION["data_endpoint"]; ?>/images/storage/vendor_uploads/${filename}`,
user_login: updatedUser,
first_name: firstName,
last_name: lastName,
user_email: updatedEmail,
phone: phone,
vendor_description: description,
status: status,
address: [{
address_1: updatedAddress1,
address_2: updatedAddress2,
barangay: barangay,
city: city,
province: province,
country: country,
}]
};
return fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/' + vendorId, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(payload)
});
})
.then(secondResponse => {
if (secondResponse.ok) {
console.log('Second request successful');
location.reload();
} else {
console.error('Second request failed');
}
})
.catch(error => {
console.error('Error during fetch:', error);
});
}else{
const payload = {
vendor_image: `https://<?php echo $_SESSION["data_endpoint"]; ?>/images/storage/vendor_uploads/${filename}`,
user_login: updatedUser,
first_name: firstName,
last_name: lastName,
user_email: updatedEmail,
phone: phone,
vendor_description: description,
status: status,
address: [{
address_1: updatedAddress1,
address_2: updatedAddress2,
barangay: barangay,
city: city,
province: province,
country: country,
}]
};
fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/' + vendorId, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(payload)
})
.then(response => {
if (response.ok) {
location.reload();
return response.json();
} else {
console.error('vendor Update failed');
throw new Error('vendor Update failed');
}
})
;
}
}
});
}else {
$('#email-error-message-' + vendorId).text('').hide();
const updatedUser = document.getElementById('user_login-' + vendorId).value;
const firstName = document.getElementById('firstName-' + vendorId).value;
const lastName = document.getElementById('lastName-' + vendorId).value;
const updatedEmail = document.getElementById('email-' + vendorId).value;
const phone = document.getElementById('phone-' + vendorId).value;
const description = document.getElementById('description-' + vendorId).value;
const status = document.getElementById('status-' + vendorId).value;
const updatedAddress1 = document.getElementById('address_1-' + vendorId).value;
const updatedAddress2 = document.getElementById('address_2-' + vendorId).value;
const barangay = document.getElementById('barangay-' + vendorId).value;
const city = document.getElementById('city-' + vendorId).value;
const province = document.getElementById('province-' + vendorId).value;
const country = document.getElementById('country-' + vendorId).value;
var fileInput = document.getElementById('fileInput' + vendorId);
var file = fileInput.files[0];
var formData = new FormData();
formData.append('image_id', vendorId);
formData.append('category', 'vendor');
formData.append('image', file);
if (file){
fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/upload_image', {
method: 'POST',
body: formData
})
.then(response => {
if (response.ok) {
return response.json();
} else {
console.error('File upload failed');
throw new Error('File upload failed');
}
})
.then(result => {
const filename = result.filename;
const payload = {
vendor_image: `https://<?php echo $_SESSION["data_endpoint"]; ?>/images/storage/vendor_uploads/${filename}`,
user_login: updatedUser,
first_name: firstName,
last_name: lastName,
user_email: updatedEmail,
phone: phone,
vendor_description: description,
status: status,
address: [{
address_1: updatedAddress1,
address_2: updatedAddress2,
barangay: barangay,
city: city,
province: province,
country: country,
}]
};
// Make API request using the extracted filename
return fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/' + vendorId, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(payload)
});
})
.then(secondResponse => {
if (secondResponse.ok) {
console.log('Second request successful');
location.reload();
} else {
console.error('Second request failed');
}
})
.catch(error => {
console.error('Error during fetch:', error);
});
}else{
const payload = {
user_login: updatedUser,
first_name: firstName,
last_name: lastName,
user_email: updatedEmail,
phone: phone,
vendor_description: description,
status: status,
address: [{
address_1: updatedAddress1,
address_2: updatedAddress2,
barangay: barangay,
city: city,
province: province,
country: country,
}]
};
fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/' + vendorId, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(payload)
})
.then(response => {
if (response.ok) {
location.reload();
return response.json();
} else {
console.error('vendor Update failed');
throw new Error('vendor Update failed');
}
})
;
}
}
}
function validateEmail(vendorId) {
var emailInput = document.getElementById('email-' + vendorId);
var email = emailInput.value;
if (email.trim() !== '') {
return fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/search?q=' + email)
.then(response => {
if (response.ok) {
return response.json();
} else {
throw new Error('Failed to check email availability');
}
})
.then(data => {
const isEmailAvailable = parseInt(data.results.length) === 0;
$('#email-error-message-' + vendorId).text(isEmailAvailable ? '' : 'Email is already in use').show();
return isEmailAvailable;
})
.catch(error => {
console.error('Error during email validation:', error);
return false;
});
} else {
$('#email-error-message-' + vendorId).text('').hide();
return Promise.resolve(true);
}
}
var fileInput = document.getElementById('fileInput' + vendorId);
var file = fileInput.files[0];
const updatedUser = document.getElementById('user_login-' + vendorId).value;
const firstName = document.getElementById('firstName-' + vendorId).value;
const lastName = document.getElementById('lastName-' + vendorId).value;
const phone = document.getElementById('phone-' + vendorId).value;
const description = document.getElementById('description-' + vendorId).value;
const status = document.getElementById('status-' + vendorId).value;
const updatedAddress1 = document.getElementById('address_1-' + vendorId).value;
const updatedAddress2 = document.getElementById('address_2-' + vendorId).value;
const barangay = document.getElementById('barangay-' + vendorId).value;
const city = document.getElementById('city-' + vendorId).value;
const province = document.getElementById('province-' + vendorId).value;
const country = document.getElementById('country-' + vendorId).value;
var formData = new FormData();
formData.append('image_id', vendorId);
formData.append('category', 'vendor');
formData.append('image', file); // Include the file data in the form data
if (file) {
fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/upload_image', {
method: 'POST',
body: formData
})
.then(response => {
if (response.ok) {
return response.json();
} else {
console.error('File upload failed');
throw new Error('File upload failed');
}
})
.then(result => {
const filename = result.filename;
const payload = {
vendor_image: `https://<?php echo $_SESSION["data_endpoint"]; ?>/images/storage/vendor_uploads/${filename}`,
user_login: updatedUser,
first_name: firstName,
last_name: lastName,
user_email: updatedEmail,
phone: phone,
vendor_description: description,
status: status,
address: [{
address_1: updatedAddress1,
address_2: updatedAddress2,
barangay: barangay,
city: city,
province: province,
country: country,
}]
};
return fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/' + vendorId, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(payload)
});
})
.then(secondResponse => {
if (secondResponse.ok) {
console.log('Second request successful');
location.reload();
} else {
console.error('Second request failed');
}
})
.catch(error => {
console.error('Error during fetch:', error);
});
} else {
const payload = {
vendor_image: `https://<?php echo $_SESSION["data_endpoint"]; ?>/images/storage/vendor_uploads/${filename}`,
user_login: updatedUser,
first_name: firstName,
last_name: lastName,
user_email: updatedEmail,
phone: phone,
vendor_description: description,
status: status,
address: [{
address_1: updatedAddress1,
address_2: updatedAddress2,
barangay: barangay,
city: city,
province: province,
country: country,
}]
};
fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/' + vendorId, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(payload)
})
.then(response => {
if (response.ok) {
location.reload();
return response.json();
} else {
console.error('vendor Update failed');
throw new Error('vendor Update failed');
}
});
}
}
});
} else {
$('#email-error-message-' + vendorId).text('').hide();
const updatedUser = document.getElementById('user_login-' + vendorId).value;
const firstName = document.getElementById('firstName-' + vendorId).value;
const lastName = document.getElementById('lastName-' + vendorId).value;
const updatedEmail = document.getElementById('email-' + vendorId).value;
const phone = document.getElementById('phone-' + vendorId).value;
const description = document.getElementById('description-' + vendorId).value;
const status = document.getElementById('status-' + vendorId).value;
const updatedAddress1 = document.getElementById('address_1-' + vendorId).value;
const updatedAddress2 = document.getElementById('address_2-' + vendorId).value;
const barangay = document.getElementById('barangay-' + vendorId).value;
const city = document.getElementById('city-' + vendorId).value;
const province = document.getElementById('province-' + vendorId).value;
const country = document.getElementById('country-' + vendorId).value;
var fileInput = document.getElementById('fileInput' + vendorId);
var file = fileInput.files[0];
var formData = new FormData();
formData.append('image_id', vendorId);
formData.append('category', 'vendor');
formData.append('image', file);
if (file) {
fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/upload_image', {
method: 'POST',
body: formData
})
.then(response => {
if (response.ok) {
return response.json();
} else {
console.error('File upload failed');
throw new Error('File upload failed');
}
})
.then(result => {
const filename = result.filename;
const payload = {
vendor_image: `https://<?php echo $_SESSION["data_endpoint"]; ?>/images/storage/vendor_uploads/${filename}`,
user_login: updatedUser,
first_name: firstName,
last_name: lastName,
user_email: updatedEmail,
phone: phone,
vendor_description: description,
status: status,
address: [{
address_1: updatedAddress1,
address_2: updatedAddress2,
barangay: barangay,
city: city,
province: province,
country: country,
}]
};
// Make API request using the extracted filename
return fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/' + vendorId, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(payload)
});
})
.then(secondResponse => {
if (secondResponse.ok) {
console.log('Second request successful');
location.reload();
} else {
console.error('Second request failed');
}
})
.catch(error => {
console.error('Error during fetch:', error);
});
} else {
const payload = {
user_login: updatedUser,
first_name: firstName,
last_name: lastName,
user_email: updatedEmail,
phone: phone,
vendor_description: description,
status: status,
address: [{
address_1: updatedAddress1,
address_2: updatedAddress2,
barangay: barangay,
city: city,
province: province,
country: country,
}]
};
fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/' + vendorId, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(payload)
})
.then(response => {
if (response.ok) {
location.reload();
return response.json();
} else {
console.error('vendor Update failed');
throw new Error('vendor Update failed');
}
});
}
}
}
function validateEmail(vendorId) {
var emailInput = document.getElementById('email-' + vendorId);
var email = emailInput.value;
if (email.trim() !== '') {
return fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/search?q=' + email)
.then(response => {
if (response.ok) {
return response.json();
} else {
throw new Error('Failed to check email availability');
}
})
.then(data => {
const isEmailAvailable = parseInt(data.results.length) === 0;
$('#email-error-message-' + vendorId).text(isEmailAvailable ? '' : 'Email is already in use').show();
return isEmailAvailable;
})
.catch(error => {
console.error('Error during email validation:', error);
return false;
});
} else {
$('#email-error-message-' + vendorId).text('').hide();
return Promise.resolve(true);
}
}
</script>
<!-- <script>
@ -821,27 +836,27 @@ function validateEmail(vendorId) {
} */
$start = max(1, $currentpage - 2);
$end = min($totalPages, $start + 4);
$end = min($totalPages, $start + 4);
if ($start > 1) {
echo "<a href='?page=1'>1</a>";
if ($start > 2) {
echo "<span>&nbsp;...&nbsp;</span>";
}
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;";
}
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>";
if ($end < $totalPages) {
if ($end < $totalPages - 1) {
echo "<span>&nbsp;...&nbsp;</span>";
}
echo "<a href='?page=$totalPages'>$totalPages</a>";
}
?>
</div>
<!-- Ec Pagination End -->
@ -858,35 +873,35 @@ function validateEmail(vendorId) {
<form action="add_vendor_action.php" method="post">
<div class="ec-vendor-block-img space-bottom-30">
<!-- <div class="ec-vendor-block-bg cover-upload">
<div class="thumb-upload">
<div class="thumb-edit">
<input type='file' id="thumbUpload01" class="ec-image-upload"
accept=".png, .jpg, .jpeg" />
<label><i class="fi-rr-edit"></i></label>
</div>
<div class="thumb-preview ec-preview">
<div class="image-thumb-preview">
<img loading="lazy" class="image-thumb-preview ec-image-preview v-img"
src="assets/images/banner/7.jpg" alt="edit" />
</div>
</div>
</div>
</div> -->
<!-- <div class="ec-vendor-block-detail">
<div class="thumb-upload">
<div class="thumb-edit">
<input type='file' id="thumbUpload02" class="ec-image-upload"
accept=".png, .jpg, .jpeg" />
<label><i class="fi-rr-edit"></i></label>
</div>
<div class="thumb-preview ec-preview">
<div class="image-thumb-preview">
<img loading="lazy" class="image-thumb-preview ec-image-preview v-img"
src="assets/images/vendor/5.jpg" alt="edit" />
</div>
</div>
</div>
</div> -->
<div class="thumb-upload">
<div class="thumb-edit">
<input type='file' id="thumbUpload01" class="ec-image-upload"
accept=".png, .jpg, .jpeg" />
<label><i class="fi-rr-edit"></i></label>
</div>
<div class="thumb-preview ec-preview">
<div class="image-thumb-preview">
<img loading="lazy" class="image-thumb-preview ec-image-preview v-img"
src="assets/images/banner/7.jpg" alt="edit" />
</div>
</div>
</div>
</div> -->
<!-- <div class="ec-vendor-block-detail">
<div class="thumb-upload">
<div class="thumb-edit">
<input type='file' id="thumbUpload02" class="ec-image-upload"
accept=".png, .jpg, .jpeg" />
<label><i class="fi-rr-edit"></i></label>
</div>
<div class="thumb-preview ec-preview">
<div class="image-thumb-preview">
<img loading="lazy" class="image-thumb-preview ec-image-preview v-img"
src="assets/images/vendor/5.jpg" alt="edit" />
</div>
</div>
</div>
</div> -->
<div class="ec-vendor-upload-detail">
<form class="row g-3">
<div class="col-md-12 space-t-15">

View File

@ -93,7 +93,7 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<!-- Sidebar toggle button -->
<button id="sidebar-toggler" class="sidebar-toggle"></button>
<!-- search form -->
<!-- 03-07-2024 Stacy & Raymart modified this block of code -->
<div class="search-form d-lg-inline-block">
<form action="vendor-product-search-action.php">
@ -648,22 +648,22 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
</header>
<!-- 3-19-24 raymart added vendor search -->
<?php if (!empty($vendorSearchResult['results'])) : ?>
<div class="shop-pro-content" style="margin-bottom:40px; margin-right: 2%; margin-left: 2%;">
<div class="ec-product-inner">
<h5 class="ec-pro-title" style="margin-top: 25px; margin-left: 5%; font-size: 25px;">Vendor Search Results</h5>
<div class="row mt-4">
<?php
$count = 0;
foreach ($vendorSearchResult['results'] as $vendor) {
if ($count < 2) {
?>
<div class="col-md-12">
<div class="card" style="margin:5px">
<div class="card-body">
<div class="vendor-info" style="display: flex; align-items: center;">
<div class="ec-catalog-vendor" style="display: inline-block;">
<!-- 3-19-24 raymart added vendor search -->
<?php if (!empty($vendorSearchResult['results'])) : ?>
<div class="shop-pro-content" style="margin-bottom:40px; margin-right: 2%; margin-left: 2%;">
<div class="ec-product-inner">
<h5 class="ec-pro-title" style="margin-top: 25px; margin-left: 5%; font-size: 25px;">Vendor Search Results</h5>
<div class="row mt-4">
<?php
$count = 0;
foreach ($vendorSearchResult['results'] as $vendor) {
if ($count < 2) {
?>
<div class="col-md-12">
<div class="card" style="margin:5px">
<div class="card-body">
<div class="vendor-info" style="display: flex; align-items: center;">
<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 loading="lazy" src="<?php echo $vendor['vendor_image']; ?>" alt="<?php echo $vendor['user_login']; ?>" class="vendor-image" style="max-width: 100px; max-height: 100px;">
@ -671,117 +671,124 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<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>
<div class="vendor-details" style="display:inline-block;">
<h6 class="ec-pro-title" style="padding:0 30px;font-family: Poppins, sans-serif; text-decoration: none; color: #777;white-space: nowrap;text-overflow: ellipsis;display: block;font-size: 16px;font-weight: 400;">
<a href="vendor-profile.php?id=<?php echo $vendor["_id"] ?>">
<?php echo $vendor['user_login']; ?>
</a>
</h6>
</div>
<div class="card text-center" style="margin-left: auto; margin-right: 5px;">
<div class="card-body">
<h6>Seller Products</h6>
<?php
$products = productList();
$vendorId = $vendor['_id'];
$product = array_filter($products, function ($var) use ($vendorId) {
return ($var['vendor_api_id'] == $vendorId);
});
?>
<p><?php echo count($product); ?></p>
</div>
<div class="vendor-details" style="display:inline-block;">
<h6 class="ec-pro-title" style="padding:0 30px;font-family: Poppins, sans-serif; text-decoration: none; color: #777;white-space: nowrap;text-overflow: ellipsis;display: block;font-size: 16px;font-weight: 400;">
<a href="vendor-profile.php?id=<?php echo $vendor["_id"] ?>">
<?php echo $vendor['user_login']; ?>
</a>
</h6>
</div>
<div class="card text-center" style="margin-left: auto; margin-right: 5px;">
<div class="card-body">
<h6>Seller Products</h6>
</div>
<div class="card text-center" style="margin-left: 5px; margin-right: 5px;">
<div class="card-body">
<h6>Seller since</h6>
<p>
<?php
$products = productList();
$vendorId = $vendor['_id'];
$product = array_filter($products, function ($var) use ($vendorId) {
return ($var['vendor_api_id'] == $vendorId);
});
if (!empty($vendor['date_registered'])) {
echo $vendor['date_registered'];
} else {
echo "Not yet registered";
}
?>
<p><?php echo count($product); ?></p>
</div>
</div>
<div class="card text-center" style="margin-left: 5px; margin-right: 5px;">
<div class="card-body">
<h6>Seller since</h6>
<p><?php echo $vendor['date_registered']; ?></p>
</div>
</p>
</div>
</div>
</div>
</div>
</div>
<?php
}
$count++;
}
?>
</div>
</div>
</div>
<?php endif; ?>
<!-- vendor search end -->
<!-- 3-19-24 raymart added Shop content Start -->
<div class="shop-pro-content" style="margin-right: 2%; margin-left: 2%;">
<div class="shop-pro-inner list-view">
<div class="row">
<?php
// $productSearchResult = [];
// foreach ($productSearchResult['results'] as $product => $productListVendor) {
// echo "$product .":" . $productListVendor";
// $vendorOfProduct = getVendorbyId($product['vendor_api_id']);
$products = productListVendor($vendorId);
$totalProducts = count($products);
for ($i = 0; $i <= $totalProducts - 1; $i++) {
$product = $products[$i];
?>
<div class="col-lg-3 col-md-4 col-sm-6">
<div class="card-wrapper">
<div class="card-container">
<div class="card-top">
<div class="image-container" style="height: 300px;"> <!-- Adjust the height as needed -->
<?php
if (isset($product['images'])) {
$image_urls = explode(',', $product['images']);
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img loading="lazy" class="img-fluid" src="<?php echo $first_image_url; ?>" alt="edit" style="object-fit: cover; width: 100%; height: 100%;"/>
<?php
}
} else {
?>
<img loading="lazy" class="img-fluid rounded-circle" src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="edit" />
<?php
}
?>
</div>
</div>
<div class="card-bottom">
<h3><?php echo $product['product_name']; ?></h3>
<p><?php echo $product['regular_price']; ?></p>
</div>
<div class="card-action">
<div class="card-edit" onclick="editProduct('<?php echo $product['_id'] ?>');"><i class="mdi mdi-circle-edit-outline"></i></div>
<div class="card-preview"><i class="mdi mdi-eye-outline"></i></div>
<div class="card-remove" onclick="deleteProd('<?php echo $product['_id'] ?>');"><i class="mdi mdi mdi-delete-outline"></i></div>
</div>
</div>
</div>
</div>
<?php
<?php
}
?>
</div>
$count++;
}
?>
</div>
</div>
</div>
<!--Shop content End -->
<!-- 3-19-24 raymart added function for delete & edit -->
<script>
<?php endif; ?>
<!-- vendor search end -->
var sessionToken = '<?php echo isset($_SESSION["token"]) ? $_SESSION["token"] : ""; ?>';
var email = '<?php echo isset($_SESSION["email"]) ? $_SESSION["email"] : ""; ?>';
var password = '<?php echo isset($_SESSION["password"]) ? $_SESSION["password"] : ""; ?>';
<!-- 3-19-24 raymart added Shop content Start -->
<div class="shop-pro-content" style="margin-right: 2%; margin-left: 2%;">
<div class="shop-pro-inner list-view">
<div class="row">
<?php
// $productSearchResult = [];
// foreach ($productSearchResult['results'] as $product => $productListVendor) {
// echo "$product .":" . $productListVendor";
// $vendorOfProduct = getVendorbyId($product['vendor_api_id']);
function editProduct(productId) {
$products = productListVendor($vendorId);
$totalProducts = count($products);
for ($i = 0; $i <= $totalProducts - 1; $i++) {
$product = $products[$i];
?>
<div class="col-lg-3 col-md-4 col-sm-6">
<div class="card-wrapper">
<div class="card-container">
<div class="card-top">
<div class="image-container" style="height: 300px;"> <!-- Adjust the height as needed -->
<?php
if (isset($product['images'])) {
$image_urls = explode(',', $product['images']);
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img loading="lazy" class="img-fluid" src="<?php echo $first_image_url; ?>" alt="edit" style="object-fit: cover; width: 100%; height: 100%;" />
<?php
}
} else {
?>
<img loading="lazy" class="img-fluid rounded-circle" src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="edit" />
<?php
}
?>
</div>
</div>
<div class="card-bottom">
<h3><?php echo $product['product_name']; ?></h3>
<p><?php echo $product['regular_price']; ?></p>
</div>
<div class="card-action">
<div class="card-edit" onclick="editProduct('<?php echo $product['_id'] ?>');"><i class="mdi mdi-circle-edit-outline"></i></div>
<div class="card-preview"><i class="mdi mdi-eye-outline"></i></div>
<div class="card-remove" onclick="deleteProd('<?php echo $product['_id'] ?>');"><i class="mdi mdi mdi-delete-outline"></i></div>
</div>
</div>
</div>
</div>
<?php
}
?>
</div>
</div>
</div>
</div>
<!--Shop content End -->
<!-- 3-19-24 raymart added function for delete & edit -->
<script>
var sessionToken = '<?php echo isset($_SESSION["token"]) ? $_SESSION["token"] : ""; ?>';
var email = '<?php echo isset($_SESSION["email"]) ? $_SESSION["email"] : ""; ?>';
var password = '<?php echo isset($_SESSION["password"]) ? $_SESSION["password"] : ""; ?>';
function editProduct(productId) {
console.log("Session Token:", sessionToken);
login(email, password, function() {
// Removed the call to updateSessionToken
@ -818,36 +825,35 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
.then(data => {
// Update the session token on the server side
fetch("update-token-session.php", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
token: data.token
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
token: data.token
})
})
})
.then(response => response.json())
.then(result => {
if (result.status === 'success') {
// Update the session token in the client-side variable
sessionToken = data.token;
console.log("New Token:", sessionToken);
callback();
} else {
throw new Error("Unable to update session token");
}
});
.then(response => response.json())
.then(result => {
if (result.status === 'success') {
// Update the session token in the client-side variable
sessionToken = data.token;
console.log("New Token:", sessionToken);
callback();
} else {
throw new Error("Unable to update session token");
}
});
})
.catch(error => {
console.error("Error:", error.message);
});
}
}
</script>
<!-- 3-19-24 raymart added function for delete & edit -->
</script>
<!-- 3-19-24 raymart added function for delete & edit -->
<!-- Common Javascript -->
<!-- Common Javascript -->
<script src="assets/plugins/jquery/jquery-3.5.1.min.js"></script>
<script src="assets/js/bootstrap.bundle.min.js"></script>
<script src="assets/plugins/simplebar/simplebar.min.js"></script>
@ -860,6 +866,6 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<!-- Ekka Custom -->
<script src="assets/js/ekka.js"></script>
</body>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -506,9 +506,34 @@ function popupAddToCart(
} catch (error) {
console.error("Error parsing customer JSON: ", error);
}
let vendorData = decodeURIComponent(productVendor);
var vendorObj = JSON.parse(vendorData);
let vendorData = null;
console.log(productVendor);
if (
productVendor === undefined ||
productVendor === null ||
productVendor === "undefined"
) {
console.log("here i am");
var vendorCheckXhr = new XMLHttpRequest();
vendorCheckXhr.open(
"GET",
"https://api.obanana.shop/api/v1/vendors/" + productData.vendor_api_id,
true
);
vendorCheckXhr.onreadystatechange = function () {
if (vendorCheckXhr.readyState === 4) {
if (vendorCheckXhr.status === 200) {
var vendorObj = JSON.parse(vendorCheckXhr.responseText);
console.log(vendorObj);
}
}
};
vendorCheckXhr.send();
} else {
vendorData = decodeURIComponent(productVendor);
console.log("vendorData");
var vendorObj = JSON.parse(vendorData);
}
var sessionToken = token;
var productImage = productObj.images;
@ -541,52 +566,57 @@ function popupAddToCart(
console.log("Customer Names: " + customerName);
login(email, password, function (token) {
var priceMatrix = productObj.price_matrix !=="" ? productObj.price_matrix : "[]";
// var quantityValue = productData.quantity;
var minimumOrder = productObj.minimum_order;
var priceMatrix =
productObj.price_matrix !== "" ? productObj.price_matrix : "[]";
// var quantityValue = productData.quantity;
var minimumOrder = productObj.minimum_order;
var quantityValue = productObj.minimum_order =="" ? productQuantity : '1';
var quantityValue = productObj.minimum_order == "" ? productQuantity : "1";
// var minimumOrder = productObj.minimum_order !=="" ? productObj.minimum_order : '1';
// var quantityValue = minimumOrder ;
// var minimumOrder = productObj.minimum_order !=="" ? productObj.minimum_order : '1';
// var quantityValue = minimumOrder ;
if (parseInt(quantityValue) < minimumOrder) {
quantityValue = minimumOrder;
alert("The minimum order quantity is " + minimumOrder);
}
if (parseInt(quantityValue) < minimumOrder) {
quantityValue = minimumOrder;
alert("The minimum order quantity is " + minimumOrder);
}
//Apply Matrix
var productPrice;
var foundPrice = false;
//Apply Matrix
var productPrice;
var foundPrice = false;
if (priceMatrix.length > 0) {
for (var i = 0; i < priceMatrix.length; i++) {
for (var j = 0; j < priceMatrix[i].length; j++) {
var currentQuantity = parseFloat(priceMatrix[i][j].quantity);
var nextQuantity = (j < priceMatrix[i].length - 1) ? parseFloat(priceMatrix[i][j + 1].quantity) : Infinity;
if (quantityValue >= currentQuantity && quantityValue < nextQuantity) {
productPrice = parseFloat(priceMatrix[i][j].price);
foundPrice = true;
break;
}
}
if (foundPrice) {
break;
}
if (priceMatrix.length > 0) {
for (var i = 0; i < priceMatrix.length; i++) {
for (var j = 0; j < priceMatrix[i].length; j++) {
var currentQuantity = parseFloat(priceMatrix[i][j].quantity);
var nextQuantity =
j < priceMatrix[i].length - 1
? parseFloat(priceMatrix[i][j + 1].quantity)
: Infinity;
if (
quantityValue >= currentQuantity &&
quantityValue < nextQuantity
) {
productPrice = parseFloat(priceMatrix[i][j].price);
foundPrice = true;
break;
}
}
if (foundPrice) {
break;
}
}
}
if (!foundPrice) {
productPrice = productObj.sale_price ? productObj.sale_price : productObj.regular_price;
// productPrice = parseFloat(document.getElementById("productNewPrice") ? document.getElementById("productNewPrice").innerText : document.getElementById("productPrice"));
// productPrice = parseFloat(document.getElementById("productNewPrice") ? document.getElementById("productNewPrice").innerText : document.getElementById("productPrice"));
// productPrice;
}
if (!foundPrice) {
productPrice = productObj.sale_price
? productObj.sale_price
: productObj.regular_price;
// productPrice = parseFloat(document.getElementById("productNewPrice") ? document.getElementById("productNewPrice").innerText : document.getElementById("productPrice"));
// productPrice = parseFloat(document.getElementById("productNewPrice") ? document.getElementById("productNewPrice").innerText : document.getElementById("productPrice"));
// productPrice;
}
var productData = {
product: {
@ -696,7 +726,7 @@ function popupAddToCart(
: "https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png";
console.log(response);
newOrder.innerHTML = `
newOrder.innerHTML = `
<input type="checkbox" class="rowcartCheckbox" name="cart-item[]" value="${response._id}"/>
<a href="product-left-sidebar.php?id=${response.items[0]._id}" class="sidekka_pro_img">
<img src="${imageUrl}" alt="product" />
@ -736,7 +766,7 @@ function popupAddToCart(
}
function getLatestOrders() {
var customerId = '<?php echo $customer_data[0][\'_id\'] ?>'
var customerId = "<?php echo $customer_data[0]['_id'] ?>";
// Fetch the order data
fetch(`https://api.obanana.shop/api/v1/orders/customer/${customerId}`)
.then((response) => response.json())
@ -831,32 +861,38 @@ function popupAddToCart(
var updatedQuantity = existingQuantity + newQuantity;
// Check if the updated quantity exceeds the previous price matrix
var newProductPrice = productPrice;
var foundNewPrice = false;
if (priceMatrix.length > 0) {
for (var i = 0; i < priceMatrix.length; i++) {
for (var j = 0; j < priceMatrix[i].length; j++) {
var currentQuantity = parseFloat(priceMatrix[i][j].quantity);
var nextQuantity = (j < priceMatrix[i].length - 1) ? parseFloat(priceMatrix[i][j + 1].quantity) : Infinity;
if (updatedQuantity >= currentQuantity && updatedQuantity < nextQuantity) {
newProductPrice = parseFloat(priceMatrix[i][j].price);
foundNewPrice = true;
break;
}
}
if (foundNewPrice) {
break;
}
}
var newProductPrice = productPrice;
var foundNewPrice = false;
if (priceMatrix.length > 0) {
for (var i = 0; i < priceMatrix.length; i++) {
for (var j = 0; j < priceMatrix[i].length; j++) {
var currentQuantity = parseFloat(priceMatrix[i][j].quantity);
var nextQuantity =
j < priceMatrix[i].length - 1
? parseFloat(priceMatrix[i][j + 1].quantity)
: Infinity;
if (
updatedQuantity >= currentQuantity &&
updatedQuantity < nextQuantity
) {
newProductPrice = parseFloat(priceMatrix[i][j].price);
foundNewPrice = true;
break;
}
}
if (foundNewPrice) {
productPrice = newProductPrice;
break;
}
}
}
if (foundNewPrice) {
productPrice = newProductPrice;
}
var updateData = {
quantity: updatedQuantity,
price: productPrice
price: productPrice,
};
updateOrderXhr.send(JSON.stringify(updateData));

177
assets/js/user-history.js Normal file
View File

@ -0,0 +1,177 @@
async function postProductRating(product_id, formData,endpointData,sessionToken) {
const endpoint = `https://${endpointData}/api/v1/products/${product_id}/ratings`;
// const sessionToken = 'your-session-token-here'; // Replace with your actual session token logic
try {
const response = await fetch(endpoint, {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + sessionToken,
},
body: formData
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
return await response.json();
} catch (error) {
console.error('Error:', error);
throw error;
}
}
async function updateOrderRating(product_id,endpointData,sessionToken) {
const endpoint = `https://${endpointData}/api/v1/orders/${product_id}`;
// const sessionToken = 'your-session-token-here'; // Replace with your actual session token logic
try {
const response = await fetch(endpoint, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + sessionToken,
},
body: JSON.stringify({
"isRate": true
})
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
return await response.json();
} catch (error) {
console.error('Error:', error);
throw error;
}
}
async function uploadImageRating(formData,endpointData,sessionToken) {
const endpoint = `https://${endpointData}/api/v1/upload_image`;
// const sessionToken = 'your-session-token-here'; // Replace with your actual session token logic
try {
const response = await fetch(endpoint, {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + sessionToken,
},
body: formData
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
return await response.json();
} catch (error) {
console.error('Error:', error);
throw error;
}
}
async function sendFeedback(variation, rating,
comments, images, videos, customer_id,
order_id,
vendor_id, files, productId,
endpoint, sessionToken
) {
const formData = new FormData();
const currentDate = new Date();
const formattedDate = currentDate
.toISOString().replace(/[-T:]/g, "")
.slice(0, -5);
formData.append('variation', variation);
formData.append('rating', rating);
formData.append('comments', comments);
formData.append('customer_id',
customer_id);
formData.append('order_id', order_id);
formData.append('vendor_id', vendor_id);
images?.forEach((image, index) => {
formData.append(
`images`,
image);
});
// Append videos to FormData
videos?.forEach((video, index) => {
formData.append(
`videos`,
video);
});
postProductRating(
productId,
formData,
endpoint, sessionToken
)
.then(response => {
console.log('Success:',
response);
if (!response) {
throw new Error(
'Failed to send text message'
);
} else {
updateOrderRating(
order_id,
endpoint,
sessionToken
)
.then(
response1 => {
console.log(
'Success:',
response1
);
if (
!
response1
) {
throw new Error(
`
update order failed `
);
} else {
sendButton1
[
order_id
]
.textContent =
"Submitted";
sendButton1
[
order_id
]
.disabled =
true
}
})
.catch(error => {
console
.error(
'Error:',
error
);
});
}
})
.catch(error => {
console.error('Error:',
error);
});
}

193
cart.php
View File

@ -32,7 +32,10 @@ if ($_SESSION["userId"] <> "") {
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -191,11 +194,26 @@ if ($_SESSION["userId"] <> "") {
<div class="ec-cart-content">
<div class="ec-cart-inner">
<div class="row">
<style>
.rowcart{
display:flex;
justify-content:center;
align-self: center;
flex-direction:row;
}
.rowcartCheckbox{
height:15px;
width:15px;
margin-right:5px;
}
</style>
<form action="#">
<div class="table-content cart-table-content">
<table>
<thead>
<tr>
<th></th>
<th>Product</th>
<th>Price</th>
<th style="text-align: center;">Quantity</th>
@ -229,6 +247,10 @@ if ($_SESSION["userId"] <> "") {
?>
<tr id="cart_order_<?php echo $order['_id'] ?>">
<td>
<input type="checkbox" class="rowcartCheckbox" name="cart-item1[]" value="<?php echo $order['_id']?>"/>
</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>
@ -270,6 +292,34 @@ if ($_SESSION["userId"] <> "") {
?>
<script>
// let myLatestOrders = [];
var checkboxes = document.querySelectorAll('input[name="cart-item1[]"]');
checkboxes.forEach(function(checkbox) {
checkbox.addEventListener('change', function() {
getCheckedCheckboxes();
getLatestOrdersCart();
// update_Total()
});
});
function getCheckedCheckboxes() {
var checkboxes = document.querySelectorAll('input[name="cart-item1[]"]');
var checkedValues = [];
var uncheckedValues = [];
checkboxes.forEach(function(checkbox) {
if (checkbox.checked) {
checkedValues.push(checkbox.value.toLowerCase().trim());
} else {
uncheckedValues.push(checkbox.value.toLowerCase().trim());
}
});
if (checkedValues.length === 0) {
return uncheckedValues;
} else {
console.log(checkedValues);
return checkedValues;
}
}
function handleQtyInputCart(input, orderId, itemId, prodId) {
var newQuantity = parseInt(input.value);
@ -564,7 +614,18 @@ if ($_SESSION["userId"] <> "") {
if (orderData && orderData !== "") {
console.log(orderData)
const filteredOrders = orderData.filter(order => order.status.toUpperCase() === 'CART');
const totalAmountSum = filteredOrders.reduce((sum, order) => {
var checkedCategories = getCheckedCheckboxes();
let orderInitial= null;
if (filteredOrders && filteredOrders !== "") {
// Calculate the new total amount based on the updated quantities
if(checkedCategories?.length>0){
orderInitial = filteredOrders?.filter(order => checkedCategories?.includes(order._id));
}else{
orderInitial = filteredOrders
}
}
const totalAmountSum = orderInitial.reduce((sum, order) => {
const totalAmount = parseFloat(order.total_amount);
return sum + totalAmount;
}, 0);
@ -602,6 +663,16 @@ if ($_SESSION["userId"] <> "") {
})
.catch(error => console.error('Error:', error));
}
function handleCheckoutButton(event) {
event.preventDefault();
var checkedCategories = getCheckedCheckboxes();
const selectedIdString = checkedCategories.join('-');
login(email, password, function(token) {
window.location.href = `checkouttest.php?selected=${selectedIdString}`;
});
}
</script>
<!-- <tr>
<td data-label="Product" class="ec-cart-pro-name"><a
@ -670,7 +741,7 @@ if ($_SESSION["userId"] <> "") {
<div class="col-lg-12">
<div class="ec-cart-update-bottom">
<a href="index.php">Continue Shopping</a>
<a style="text-decoration:none; color:white" href="checkout.php" class="btn btn-primary">Check Out</a>
<a style="text-decoration:none; color:white"onclick="handleCheckoutButton(event)" class="btn btn-primary">Check Out</a>
</div>
</div>
</div>
@ -1221,121 +1292,7 @@ if ($_SESSION["userId"] <> "") {
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

129
cart1.php
View File

@ -18,7 +18,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -1630,129 +1633,7 @@
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -115,7 +115,10 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -134,33 +137,35 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
<script>
function updateCartItemCount() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "cartitems.php?id=<?php echo $_SESSION['customerId']; ?>", true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
var data = xhr.responseText;
if (data !== "") {
console.log("Data: " + data);
document.getElementById("cartItemCount").innerHTML = data;
var xhr = new XMLHttpRequest();
xhr.open("GET", "cartitems.php?id=<?php echo $_SESSION['customerId']; ?>", true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
var data = xhr.responseText;
if (data !== "") {
console.log("Data: " + data);
document.getElementById("cartItemCount").innerHTML = data;
document.getElementById("cartNewItemCount").innerHTML = data;
}
}
};
xhr.send();
}
}
};
xhr.send();
}
function updateWishItemCount() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "wishlistitems.php?id=<?php echo $_SESSION['customerId']; ?>", true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
var data = xhr.responseText;
if (data !== "") {
document.getElementById("wishItemCount").innerHTML = data;
function updateWishItemCount() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "wishlistitems.php?id=<?php echo $_SESSION['customerId']; ?>", true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
var data = xhr.responseText;
if (data !== "") {
document.getElementById("wishItemCount").innerHTML = data;
document.getElementById("wishNewItemCount").innerHTML = data;
}
}
};
xhr.send();
}
}
};
xhr.send();
}
</script>
<!-- raymart added css feb 14 2024 -->
@ -340,7 +345,6 @@ function updateWishItemCount() {
<p>Level : 9 out of 10</p>
</div> -->
<div class="col-lg-3 col-md-6 ec-catalog-pro-count pad-15">
<h6>Seller Products</h6>
<?php
?>
@ -348,12 +352,16 @@ function updateWishItemCount() {
<p><?php echo count($products) ?> Products</p>
</div>
<div class="col-lg-3 col-md-6 ec-catalog-since pad-15">
<h6>Seller since</h6>
<!-- <p><?php echo $vendor["date_registered"] ?></p> -->
<p><?php echo date('F j, Y', strtotime($vendor['date_registered'])); ?></p>
<p>
<?php
if (!empty($vendor['date_registered'])){
echo date('F j, Y', strtotime($vendor['date_registered']));
} else {
echo "Not Yet Registered";
}
?>
</p>
</div>
</div>
</div>
@ -1221,121 +1229,7 @@ maxPriceInput.addEventListener('input', function() {
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

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

View File

@ -68,7 +68,10 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -1450,121 +1453,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -28,7 +28,7 @@ if ($_SESSION["userId"] <> "") {
$cartencode = json_encode($filteredCartItems);
}else{
$cartItems = $filteredCartItems;
// $cartItems = $filteredCartItems;
$cartencode = json_encode($cartItems);
}
@ -82,7 +82,10 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -240,13 +243,9 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
<div class="sName">
<h5>Name:
<span id="selectedFName"><?php echo strtoupper($customer['address'][0]['first_name']); ?></span>
<span id="selectedLName"><?php echo strtoupper($customer['address'][0]['last_name']); ?></span>
</h5>
<!-- <h5>Name:
<span id="selectedFName"><?php echo $customer['address'][0]['first_name']; ?></span>
<span id="selectedLName"> <?php echo $customer['address'][0]['last_name']; ?></span>
</h5> -->
<span id="selectedLName"><?php echo $customer['address'][0]['last_name']; ?></span>
</h5>
</div>
<div class="sContact">
<h5>Contact #:
@ -2108,121 +2107,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -24,7 +24,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -315,129 +318,7 @@
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

129
faq.php
View File

@ -18,7 +18,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -471,129 +474,7 @@
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -20,13 +20,18 @@
<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 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>
<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/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">
<li class="ec-footer-link">16F PMI Tower,Makati, Makati, Philippines</li>
<li class="ec-footer-link"><span>Call Us:</span><a href="Mobile:+63 917 722 6002">+63 (2) 8807-6379</a></li>
<li class="ec-footer-link"><span>Email:</span><a href="mailto:sales@obanana.com">sales@obanana.com</a></li>
<li class="ec-footer-link"><span>Call Us:</span><a
href="Mobile:+63 (2) 8807-6379">+63 (2) 8807-6379</a></li>
<li class="ec-footer-link"><span>Email:</span><a
href="mailto:sales@obanana.com">sales@obanana.com</a></li>
</ul>
</div>
</div>
@ -40,9 +45,9 @@
<li class="ec-footer-link"><a href="faq.php">FAQ</a></li>
<!-- <li class="ec-footer-link"><a href="track-order.html">Delivery Information</a></li> -->
<!-- <li class="ec-footer-link"><a href="contact-us.html">Contact us</a></li> -->
<!-- 02-16-2024 Stacy changed contact us link-->
<li class="ec-footer-link"><a href="contact-us.php">Contact us</a></li>
<!-- 02-16-2024 Stacy changed contact us link-->
<!-- 02-16-2024 Stacy changed contact us link-->
<li class="ec-footer-link"><a href="contact-us.php">Contact us</a></li>
<!-- 02-16-2024 Stacy changed contact us link-->
</ul>
</div>
</div>
@ -59,35 +64,37 @@
if ($_SESSION["isVendor"]) {
?>
<li class="ec-footer-link"><a href="vendor-settings.php">My Account</a></li>
<?php
<?php
} else {
?>
<li class="ec-footer-link"><a href="user-profile.php">My Account</a></li>
<?php
<?php
}
?>
<?php
<?php
}
?>
<!-- <li class="ec-footer-link"><a href="track-order.html">Order History</a></li> -->
<?php
<!-- <li class="ec-footer-link"><a href="track-order.html">Order History</a></li> -->
<?php
if ($_SESSION["isLoggedIn"]) {
?><?php
if ($_SESSION["isVendor"]) {
?>
<li class="ec-footer-link"><a href="vendor-dashboard.php">Order History</a></li>
<?php
<?php
} else {
?>
<li class="ec-footer-link"><a href="user-profile.php">Order History</a></li>
<?php
<?php
}
?>
<?php
<?php
}
?>
<li class="ec-footer-link"><a href="wishlist.php">Wish List</a></li>
<li class="ec-footer-link"><a href="vendor-registration-steps.php">Vendor Registration</a></li>
<li class="ec-footer-link"><a href="wishlist.php">Wish List</a></li>
<li class="ec-footer-link"><a href="vendor-registration-steps.php">Vendor
Registration</a></li>
</ul>
</div>
</div>
@ -121,8 +128,11 @@
<div class="ec-subscribe-form">
<form id="ec-newsletter-form" name="ec-newsletter-form" method="post" action="#">
<div id="ec_news_signup" class="ec-form">
<input class="ec-email" type="email" required="" placeholder="Enter your email here..." name="ec-email" value="" />
<button id="ec-news-btn" class="button btn-primary" type="submit" name="subscribe" value=""><i class="ecicon eci-paper-plane-o" aria-hidden="true"></i></button>
<input class="ec-email" type="email" required=""
placeholder="Enter your email here..." name="ec-email" value="" />
<button id="ec-news-btn" class="button btn-primary" type="submit"
name="subscribe" value=""><i class="ecicon eci-paper-plane-o"
aria-hidden="true"></i></button>
</div>
</form>
</div>
@ -140,10 +150,18 @@
<div class="footer-bottom-social">
<span class="social-text text-upper">Follow us on:</span>
<ul class="mb-0">
<li class="list-inline-item"><a class="hdr-facebook" href="#"><i class="ecicon eci-facebook"></i></a></li>
<li class="list-inline-item"><a class="hdr-twitter" href="#"><i class="ecicon eci-twitter"></i></a></li>
<li class="list-inline-item"><a class="hdr-instagram" href="#"><i class="ecicon eci-instagram"></i></a></li>
<li class="list-inline-item"><a class="hdr-linkedin" href="#"><i class="ecicon eci-linkedin"></i></a></li>
<li class="list-inline-item"><a class="hdr-facebook"
href="https://www.facebook.com/ObananaPH/"><i
class="ecicon eci-facebook"></i></a></li>
<li class="list-inline-item"><a class="hdr-twitter"
href="https://twitter.com/obananac?lang=en"><i
class="ecicon eci-twitter"></i></a></li>
<li class="list-inline-item"><a class="hdr-instagram"
href="https://www.instagram.com/obananaph/"><i
class="ecicon eci-instagram"></i></a></li>
<li class="list-inline-item"><a class="hdr-linkedin"
href="https://ph.linkedin.com/company/obananaph"><i
class="ecicon eci-linkedin"></i></a></li>
</ul>
</div>
</div>
@ -151,7 +169,8 @@
<!-- Footer Copyright Start -->
<div class="col text-center footer-copy">
<div class="footer-bottom-copy ">
<div class="ec-copy">Copyright © 2023 <a class="site-name text-upper" href="#">Obanana<span>.</span></a>. All Rights Reserved</div>
<div class="ec-copy">Copyright © 2023 <a class="site-name text-upper"
href="#">Obanana<span>.</span></a>. All Rights Reserved</div>
</div>
</div>
<!-- Footer Copyright End -->
@ -169,7 +188,7 @@
</div>
</div>
</div>
<!-- Footer navigation panel for responsive display -->
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<div class="container">
<div class="ec-nav-panel">
@ -179,7 +198,7 @@
<div class="ec-nav-panel-icons">
<a href="cart.php" class="ec-header-btn ec-header-wishlist">
<div class="header-icon"><i class="fi-rr-shopping-bag"></i></div>
</a>
</a>
</div>
<div class="ec-nav-panel-icons">
<a href="index.php" class="ec-header-btn"><i class="fi-rr-home"></i></a>
@ -195,4 +214,4 @@
</div>
<!-- Footer navigation panel for responsive display -->
</footer>
<!-- Footer Area End -->
<!-- Footer Area End -->

View File

@ -20,7 +20,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -328,121 +331,7 @@ var pass2I = document.getElementById(`passInput2`);
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -18,7 +18,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -162,121 +165,7 @@
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -19,7 +19,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -247,129 +250,7 @@
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -24,7 +24,7 @@ $_SESSION["email"] = $_POST["name"];
// Check if the customer exists in the database
$result = customerExists($_SESSION["email"]);
if ($result > 0) {
if ($result) {
$forgot = forgot_password($_SESSION["email"]);
if($forgot){
header("location: forget_otp.php");

2891
header.php

File diff suppressed because it is too large Load Diff

142
index.php
View File

@ -39,7 +39,10 @@ if ($_SESSION["userId"] <> "") {
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -76,11 +79,13 @@ if ($_SESSION["userId"] <> "") {
}
</style>
<script>
function updateCartItemCount() {
function updateCartItemCount() {
$.get("cartitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data, status) {
if (data != "") {
console.log("Data: " + data + "\nStatus: " + status);
document.getElementById("cartItemCount").innerHTML = data;
document.getElementById("cartNewItemCount").innerHTML = data;
}
});
}
@ -89,6 +94,8 @@ if ($_SESSION["userId"] <> "") {
$.get("wishlistitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data) {
if (data != "") {
document.getElementById("wishItemCount").innerHTML = data;
document.getElementById("wishNewItemCount").innerHTML = data;
}
});
}
@ -187,13 +194,13 @@ if ($_SESSION["userId"] <> "") {
<!-- Tab Start -->
<div class="col-md-12 text-center">
<ul class="ec-pro-tab-nav nav justify-content-center">
<li class="nav-item"><a class="nav-link active" data-bs-toggle="tab" href="#tab-pro-for-all">For
<li class="nav-item"><a class="nav-link active" data-bs-toggle="tab" href="#all-top-products">For
All</a></li>
<li class="nav-item"><a class="nav-link" data-bs-toggle="tab" href="#tab-pro-for-men">For
<li class="nav-item"><a class="nav-link" data-bs-toggle="tab" href="#electronics">For
Electronics</a></li>
<li class="nav-item"><a class="nav-link" data-bs-toggle="tab" href="#tab-pro-for-women">For
<li class="nav-item"><a class="nav-link" data-bs-toggle="tab" href="#smart-home">For
Smart Home</a></li>
<li class="nav-item"><a class="nav-link" data-bs-toggle="tab" href="#tab-pro-for-child">For
<li class="nav-item"><a class="nav-link" data-bs-toggle="tab" href="#e-vehicle">For
E-Vehicle</a></li>
</ul>
</div>
@ -203,7 +210,7 @@ if ($_SESSION["userId"] <> "") {
<div class="col">
<div class="tab-content">
<!-- 1st Product tab start -->
<div class="tab-pane fade show active" id="tab-pro-for-all">
<div class="tab-pane fade show active" id="all-top-products">
<div class="row">
<!-- Product Content -->
<?php
@ -327,7 +334,7 @@ if ($_SESSION["userId"] <> "") {
</div>
<!-- ec 1st Product tab end -->
<!-- ec 2nd Product tab start -->
<div class="tab-pane fade" id="tab-pro-for-men">
<div class="tab-pane fade" id="electronics">
<div class="row">
<!-- Product Content -->
<?php
@ -449,7 +456,7 @@ if ($_SESSION["userId"] <> "") {
</div>
<!-- ec 2nd Product tab end -->
<!-- ec 3rd Product tab start -->
<div class="tab-pane fade" id="tab-pro-for-women">
<div class="tab-pane fade" id="smart-home">
<div class="row">
<!-- Product Content -->
<?php
@ -569,7 +576,7 @@ if ($_SESSION["userId"] <> "") {
</div>
<!-- ec 3rd Product tab end -->
<!-- ec 4th Product tab start -->
<div class="tab-pane fade" id="tab-pro-for-child">
<div class="tab-pane fade" id="e-vehicle">
<div class="row">
<!-- Product Content -->
<?php
@ -1717,121 +1724,6 @@ if ($_SESSION["userId"] <> "") {
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon">
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

129
login.php
View File

@ -21,7 +21,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -255,129 +258,7 @@
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -33,7 +33,10 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -252,121 +255,7 @@ $vendorSearchResult = $_SESSION["vendorSearchResult"];
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -31,7 +31,10 @@ if ($_SESSION["userId"] <> "") {
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -982,129 +985,7 @@ maxPriceInput.addEventListener('input', function() {
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

165
offer.php
View File

@ -22,7 +22,8 @@ if ($_SESSION["userId"] <> "") {
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<title>oBanana B2B - Elevate Your Business</title>
<meta name="keywords" content="apparel, catalog, clean, ecommerce, ecommerce HTML, electronics, fashion, html eCommerce, html store, minimal, multipurpose, multipurpose ecommerce, online store, responsive ecommerce template, shops" />
<meta name="keywords"
content="apparel, catalog, clean, ecommerce, ecommerce HTML, electronics, fashion, html eCommerce, html store, minimal, multipurpose, multipurpose ecommerce, online store, responsive ecommerce template, shops" />
<meta name="description" content="Best ecommerce html template for single and multi vendor store.">
<meta name="author" content="ashishmaraviya">
@ -33,6 +34,12 @@ if ($_SESSION["userId"] <> "") {
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -49,22 +56,22 @@ if ($_SESSION["userId"] <> "") {
<!-- Background css -->
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
<script>
function updateCartItemCount() {
$.get("cartitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data, status) {
if (data != "") {
console.log("Data: " + data + "\nStatus: " + status);
document.getElementById("cartItemCount").innerHTML = data;
}
});
}
function updateCartItemCount() {
$.get("cartitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data, status) {
if (data != "") {
console.log("Data: " + data + "\nStatus: " + status);
document.getElementById("cartItemCount").innerHTML = data;
}
});
}
function updateWishItemCount() {
$.get("wishlistitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data) {
if (data != "") {
document.getElementById("wishItemCount").innerHTML = data;
}
});
}
function updateWishItemCount() {
$.get("wishlistitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data) {
if (data != "") {
document.getElementById("wishItemCount").innerHTML = data;
}
});
}
</script>
</head>
@ -228,16 +235,20 @@ if ($_SESSION["userId"] <> "") {
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
<a href="#ec-mobile-menu" class="navbar-toggler-btn ec-header-btn ec-side-toggle"><i class="fi-rr-menu-burger"></i></a>
<a href="#ec-mobile-menu" class="navbar-toggler-btn ec-header-btn ec-side-toggle"><i
class="fi-rr-menu-burger"></i></a>
</div>
<div class="ec-nav-panel-icons">
<a href="#ec-side-cart" class="toggle-cart ec-header-btn ec-side-toggle"><i class="fi-rr-shopping-bag"></i><span class="ec-cart-noti ec-header-count cart-count-lable">3</span></a>
<a href="#ec-side-cart" class="toggle-cart ec-header-btn ec-side-toggle"><i
class="fi-rr-shopping-bag"></i><span
class="ec-cart-noti ec-header-count cart-count-lable">3</span></a>
</div>
<div class="ec-nav-panel-icons">
<a href="index.php" class="ec-header-btn"><i class="fi-rr-home"></i></a>
</div>
<div class="ec-nav-panel-icons">
<a href="wishlist.html" class="ec-header-btn"><i class="fi-rr-heart"></i><span class="ec-cart-noti">4</span></a>
<a href="wishlist.html" class="ec-header-btn"><i class="fi-rr-heart"></i><span
class="ec-cart-noti">4</span></a>
</div>
<div class="ec-nav-panel-icons">
<a href="login.php" class="ec-header-btn"><i class="fi-rr-user"></i></a>
@ -271,121 +282,7 @@ if ($_SESSION["userId"] <> "") {
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -17,7 +17,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -444,121 +447,7 @@
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

File diff suppressed because it is too large Load Diff

View File

@ -17,7 +17,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -294,121 +297,7 @@
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -22,7 +22,10 @@ $_SESSION["isVendor"] = false;
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -175,121 +178,7 @@ $_SESSION["isVendor"] = false;
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -25,7 +25,10 @@ $customerData = json_decode($customers, true);
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -230,129 +233,7 @@ $customerData = json_decode($customers, true);
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -20,7 +20,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -181,121 +184,7 @@
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -25,7 +25,10 @@ $vendorData = json_decode($vendors, true);
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -298,121 +301,7 @@ $vendorData = json_decode($vendors, true);
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -32,7 +32,10 @@ if ($_SESSION["userId"] <> "") {
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -268,121 +271,7 @@ if ($_SESSION["userId"] <> "") {
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -28,7 +28,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -1080,129 +1083,7 @@
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -104,7 +104,10 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -794,121 +797,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

File diff suppressed because it is too large Load Diff

View File

@ -33,7 +33,10 @@ if ($_SESSION["userId"] <> "") {
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -50,12 +53,15 @@ if ($_SESSION["userId"] <> "") {
<!-- Background css -->
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
<script>
function updateCartItemCount() {
$.get("cartitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data, status) {
if (data != "") {
console.log("Data: " + data + "\nStatus: " + status);
document.getElementById("cartItemCount").innerHTML = data;
document.getElementById("cartNewItemCount").innerHTML = data;
}
});
}
@ -64,10 +70,13 @@ if ($_SESSION["userId"] <> "") {
$.get("wishlistitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data) {
if (data != "") {
document.getElementById("wishItemCount").innerHTML = data;
document.getElementById("wishNewItemCount").innerHTML = data;
}
});
}
</script>
<!-- raymart added css feb 14 2024 -->
<style>
.ec-product-inner .ec-pro-image .ec-pro-actions .add-to-cart {
@ -789,121 +798,7 @@ if ($_SESSION["userId"] <> "") {
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -17,7 +17,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -450,121 +453,7 @@
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -53,7 +53,10 @@ $products = productList();
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -111,6 +114,10 @@ $products = productList();
<!-- ekka Cart End -->
<!-- Category Sidebar start -->
<?php include "category-slider.php" ?>
<!-- Ec breadcrumb start -->
<div class="sticky-header-next-sec ec-breadcrumb section-space-mb">
<div class="container">
@ -416,6 +423,7 @@ $products = productList();
} else {
console.error("Product row with ID " + productId + " not found in the DOM.");
}
location.reload();
} else {
throw new Error("Error deleting product with ID " + productId + ": " + response.statusText);
}
@ -425,10 +433,7 @@ $products = productList();
});
});
}
}
}
</script>
</section>
<!-- End Vendor dashboard section -->
@ -486,121 +491,7 @@ $products = productList();
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -45,7 +45,10 @@ $array = json_decode($result, true);
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -223,11 +226,11 @@ $array = json_decode($result, true);
if ($array['status'] === 'TO SHIP' || $array['status'] === 'To Ship') {
echo '<div class="col-md-6">
<label for="inputEmail4" class="form-label">Tracking Number</label>
<input type="text" name="tracking_number" class="form-control slug-title" value="' . $array['tracking_number'] . '" >
<input type="text" name="tracking_number" class="form-control slug-title" value="' . $array['tracking_number'] . '" required>
</div>';
echo '<div class="col-md-6">
<label for="inputEmail4" class="form-label">COURIER NAME</label>
<input type="text" name="courier_name" class="form-control slug-title" value="' . $array['courier_name'] . '" >
<input type="text" name="courier_name" class="form-control slug-title" value="' . $array['courier_name'] . '" required>
</div>';
} elseif ($array['status'] === 'TO RECEIVE' || $array['status'] === 'To Receive') {
echo '<div class="col-md-6">
@ -336,121 +339,7 @@ $array = json_decode($result, true);
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -19,6 +19,8 @@ $products = productList();
$shopOrders = getOrderbyVendorId($vendorId);
$vendorOrderss = json_decode($shopOrders);
$vendorOrders1 = json_encode($shopOrders);
if (is_array($vendorOrderss)) {
$vendorOrders = json_decode($shopOrders);
@ -50,7 +52,8 @@ if ($_SESSION["isCustomer"] == true) {
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<title>oBanana B2B - Elevate Your Business</title>
<meta name="keywords" content="apparel, catalog, clean, ecommerce, ecommerce HTML, electronics, fashion, html eCommerce, html store, minimal, multipurpose, multipurpose ecommerce, online store, responsive ecommerce template, shops" />
<meta name="keywords"
content="apparel, catalog, clean, ecommerce, ecommerce HTML, electronics, fashion, html eCommerce, html store, minimal, multipurpose, multipurpose ecommerce, online store, responsive ecommerce template, shops" />
<meta name="description" content="Best ecommerce html template for single and multi vendor store.">
<meta name="author" content="ashishmaraviya">
<link href="https://cdn.materialdesignicons.com/4.4.95/css/materialdesignicons.min.css" rel="stylesheet" />
@ -62,6 +65,9 @@ if ($_SESSION["isCustomer"] == true) {
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -69,9 +75,9 @@ if ($_SESSION["isCustomer"] == true) {
<link rel="stylesheet" href="assets/css/plugins/jquery-ui.min.css" />
<link rel="stylesheet" href="assets/css/plugins/countdownTimer.css" />
<link rel="stylesheet" href="assets/css/plugins/slick.min.css" />
<link rel="stylesheet" href="assets/css/plugins/bootstrap.css" />
<link rel="stylesheet" href="https://cdn.metroui.org.ua/current/metro.css">
<script src="https://cdn.metroui.org.ua/current/metro.js"></script>
<!-- <link rel="stylesheet" href="assets/css/plugins/bootstrap.css" /> -->
<!-- Main Style -->
<link rel="stylesheet" href="assets/css/style.css" />
<link rel="stylesheet" href="assets/css/responsive.css" />
@ -79,21 +85,37 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Background css -->
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
<style>
#pagination {
display: flex;
list-style: none;
padding: 0;
margin: 0;
justify-content: center;
}
#pagination {
display: flex;
list-style: none;
padding: 0;
margin: 0;
justify-content: center;
}
#pagination a {
color: #333;
text-decoration: none;
padding: 5px 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
.roww {
width: 100%;
display: flex;
/* justify-content: center;
align-items: center; */
flex-wrap: nowrap !important;
flex-direction: row !important;
}
@media(max-width:992px) {
.roww {
flex-wrap: wrap !important;
#pagination a {
color: #333;
text-decoration: none;
padding: 5px 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
}
</style>
</head>
@ -116,10 +138,10 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Ec breadcrumb start -->
<div class="sticky-header-next-sec ec-breadcrumb section-space-mb">
<div class="container">
<div class="row">
<div class="bootstrap-section container">
<div class="bootstrap-section row ">
<div class="col-12">
<div class="row ec_breadcrumb_inner">
<div class="row ec_breadcrumb_inner roww">
<div class="col-md-6 col-sm-12">
<h2 class="ec-breadcrumb-title">Vendor Dashboard</h2>
</div>
@ -140,8 +162,8 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Vendor dashboard section -->
<section class="ec-page-content ec-vendor-dashboard section-space-p">
<div class="container">
<div class="row">
<div id="bootstrap-section" class="container container1">
<div class="row roww">
<!-- Sidebar Area Start -->
<div class="ec-shop-leftside ec-vendor-sidebar col-lg-3 col-md-12">
<div class="ec-sidebar-wrap ec-border-box">
@ -151,9 +173,13 @@ if ($_SESSION["isCustomer"] == true) {
<!-- 03-12-2024 Stacy added placeholder for vendor banner -->
<?php
if (!empty($vendorData['vendor_banner'])) { ?>
<div class="ec-vendor-block-bg" style="background-image: url(<?php echo $vendorData['vendor_banner'] ?>) !important;"></div>
<?php } else { ?>
<div class="ec-vendor-block-bg" style="background-color: orange; background-image: url(<?php echo $vendorData['vendor_banner'] ?>) !important;"></div>
<div class="ec-vendor-block-bg"
style="background-image: url(<?php echo $vendorData['vendor_banner'] ?>) !important;">
</div>
<?php } else { ?>
<div class="ec-vendor-block-bg"
style="background-color: orange; background-image: url(<?php echo $vendorData['vendor_banner'] ?>) !important;">
</div>
<?php } ?>
<!-- <div class="ec-vendor-block-bg" style="background-image: url(<?php #echo $vendorData['vendor_banner'] ?>) !important;"></div> -->
<div class="ec-vendor-block-detail">
@ -161,9 +187,12 @@ if ($_SESSION["isCustomer"] == true) {
<!-- 03-12-2024 Stacy added placeholder for vendor profile -->
<?php
if (!empty($vendorData['vendor_image'])) { ?>
<img loading="lazy" class="v-img" src=<?php echo $vendorData['vendor_image'] ?> alt="vendor image">
<img loading="lazy" class="v-img" src=<?php echo $vendorData['vendor_image'] ?>
alt="vendor image">
<?php } else { ?>
<img loading="lazy" class="v-img" src="https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg" alt="vendor image">
<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>
@ -180,7 +209,16 @@ if ($_SESSION["isCustomer"] == true) {
</div>
</div>
</div>
<div class="ec-shop-rightside col-lg-9 col-md-12">
<?php
$filteredOrders = array_filter($vendorOrders, function($order) {
$orderArray1 = json_encode($order, true);
$orderItems1 = json_decode($orderArray1, true);
return $orderItems1['status'] !== 'TO CHECKOUT';
});
// var_dump($filteredOrders);
?>
<div class="row">
<div class="col-lg-3 col-md-6">
<div class="ec-vendor-dashboard-sort-card color-blue">
@ -197,7 +235,10 @@ if ($_SESSION["isCustomer"] == true) {
<div class="col-lg-3 col-md-6">
<div class="ec-vendor-dashboard-sort-card color-pink">
<h5>Orders</h5>
<h3> <?php echo count($vendorOrders); ?></h3>
<h3> <?php
echo count($filteredOrders );
?></h3>
</div>
</div>
<!-- 02-26-2024 Stacy commented out -->
@ -222,30 +263,23 @@ if ($_SESSION["isCustomer"] == true) {
</div>
</div>
<div class="ec-vendor-card-body">
<div class="table-container" >
<table class="table striped hovered" id="order-table" style="overflow-x: auto;"
data-role="table"
data-pagination="true"
data-searching="true"
data-filtering="true"
data-sorting="true"
data-show-rows-steps="5,10,20,-1"
data-horizontal-scroll="true"
data-rownum="true"
data-table-info-title="Display from $1 to $2 of $3 order(s)"
>
<thead>
<tr>
<th data-sortable="false">Image</th>
<th data-sortable="true">Name</th>
<th data-sortable="true">Status</th>
<th data-sortable="true">Customer</th>
<th data-sortable="true" >Total</th>
<th>Action</th>
</tr>
</thead>
<tbody id="orderItemsBody">
<div class="table-container">
<table class="table striped hovered" id="order-table" style="overflow-x: auto;"
data-role="table" data-pagination="true" data-searching="true" data-filtering="true"
data-sorting="true" data-show-rows-steps="5,10,20,-1" data-horizontal-scroll="true"
data-rownum="true" data-table-info-title="Display from $1 to $2 of $3 order(s)">
<thead>
<tr>
<th data-sortable="false">Image</th>
<th data-sortable="true">Name</th>
<th data-sortable="true">Status</th>
<th data-sortable="true">Customer</th>
<th data-sortable="true">Total</th>
<th>Action</th>
</tr>
</thead>
<tbody id="orderItemsBody">
<?php
$totalOrders = count($vendorOrders);
$displayLimit = 5;
@ -254,85 +288,97 @@ if ($_SESSION["isCustomer"] == true) {
$order = $vendorOrders[$i];
$orderArray = json_encode($order, true);
$orderItems = json_decode($orderArray, true);
if ($orderItems['status'] !== 'TO CHECKOUT' ) {
foreach ($orderItems['items'] as $item) {
?>
<tr>
<td>
<!-- raymart added function feb 21 2024 -->
<?php
<tr>
<td>
<!-- raymart added function feb 21 2024 -->
<?php
# 03-11-2024 Stacy modified
if (isset($orderItems['items'][0]['product']['product_image'])) {
?>
<img loading="lazy" style="height:50px; width:50px" class="prod-img" src="<?php echo $orderItems['items'][0]['product']['product_image']; ?>" alt="edit" />
<?php
<img loading="lazy" style="height:50px; width:50px" class="prod-img"
src="<?php echo $orderItems['items'][0]['product']['product_image']; ?>"
alt="edit" />
<?php
} else {
?>
<img loading="lazy" style="height:50px; width:50px" class="prod-img rounded-circle" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/65/No-Image-Placeholder.svg/495px-No-Image-Placeholder.svg.png?20200912122019" alt="edit" />
<?php
<img loading="lazy" style="height:50px; width:50px"
class="prod-img rounded-circle"
src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/65/No-Image-Placeholder.svg/495px-No-Image-Placeholder.svg.png?20200912122019"
alt="edit" />
<?php
}
?>
<!-- <?php
<!-- <?php
if (isset($item['product']['product_image']) && !empty($item['product']['product_image'])) {
echo '<img loading="lazy " style="height:50px; width:50px" src="' . $item['product']['product_image'] . '" alt="Product Image" class="prod-img">';
} else {
echo '<img loading="lazy " style="height:50px; width:50px" src="assets/img/vendor/u1.jpg" class="prod-img rounded-circle" alt="Placeholder Image">';
}
?> -->
</td>
<td style="max-width:300px;"><span class="text-truncate"><?php echo $item['product']['name']; ?></span></td>
<?php
$status = $orderItems['status'];
$style = '';
$textColor = '';
$borderColor = '';
</td>
<td style="max-width:300px;"><span
class="text-truncate"><?php echo $item['product']['name']; ?></span>
</td>
<?php
$status = $orderItems['status'];
$style = '';
$textColor = '';
$borderColor = '';
switch ($status) {
case 'TO SHIP':
$borderColor = 'mint';
$textColor = 'min'; // Change this to match the text color you prefer
break;
case 'TO PAY':
$borderColor = '#E0EA00';
$textColor = '#E0EA00';
break;
case 'TO RECEIVE':
$borderColor = '#20FF5A';
$textColor = '#20FF5A';
break;
case 'COMPLETED':
$borderColor = '#2098FF';
$textColor = '#2098FF'; // Change this to match the text color you prefer
break;
case 'TO REFUND':
$borderColor = '#FF5320';
$textColor = '#FF5320';
break;
default:
// Default styles if the status doesn't match any case
$borderColor = '#464646';
$textColor = '#464646';
}
switch (strtoupper($status)) {
case 'TO SHIP':
$backgroundColor = '#8061ef';
$textColor = 'white';
break;
case 'TO PAY':
$backgroundColor = '#1E6E58';
$textColor = 'white';
break;
case 'TO RECEIVE':
$backgroundColor = '#FFD700';
$textColor = 'black';
break;
case 'COMPLETED':
$backgroundColor = '#4c84ff';
$textColor = 'white';
break;
case 'RETURNED':
$backgroundColor = '#ff7b7b';
$textColor = 'white';
break;
default:
$backgroundColor = '#464646';
$textColor = 'white';
}
// Generating style attribute based on the selected colors
$style = "display: flex; height: 15px;font-weight:400; width:90px; margin-top:10px; font-size:10px !important; justify-content:center; align-items:center; padding: 10px; border: 3px solid $borderColor; border-radius: 30px; color: $textColor;";
// Generating style attribute based on the selected colors
$style = "display: flex; height: 15px; font-weight: bold;
width: 90px; font-size: 10px !important;
justify-content: center; align-items: center; padding: 10px;
background-color: $backgroundColor; border-radius: 30px; color: $textColor;";
?>
?>
<td><span style="<?php echo $style; ?>"> <p><?php echo $status; ?></p></span></td>
<td><span style="text-transform:capitalize"><?php echo $orderItems['shipping_address']['shipping_first_name']; ?></span></td>
<td ><span><?php echo $orderItems['total_amount']; ?></span></td>
<td style="display:flex; justify-content:center; margin-top:-4px;">
<span onclick="editVendorOrder('<?php echo $orderItems['_id'] ?>');">
<a class="mdi mdi-circle-edit-outline" style="font-size: 20px;"></a>
</span>
</td>
</tr>
<td><span style="<?php echo $style; ?>">
<p><?php echo $status; ?></p>
</span></td>
<td><span
style="text-transform:capitalize"><?php echo $orderItems['shipping_address']['shipping_first_name']; ?></span>
</td>
<td><span><?php echo $orderItems['total_amount']; ?></span></td>
<td style="display:flex; justify-content:center; margin-top:-4px;">
<span onclick="editVendorOrder('<?php echo $orderItems['_id'] ?>');">
<a class="mdi mdi-circle-edit-outline" style="font-size: 20px;"></a>
</span>
</td>
</tr>
<?php
}
}
}
?>
</tbody>
</table>
@ -341,139 +387,139 @@ $style = "display: flex; height: 15px;font-weight:400; width:90px; margin-top:10
<!-- <div id="pagination"></div> -->
</div>
<script>
// Initialize Metro UI components
// var tables = document.querySelectorAll('[data-role="table"]');
// tables.forEach(function(table) {
// new METRO.Table(table);
// });
// document.getElementById("exportBtn").addEventListener("click", function() {
// var table = document.querySelector('#order-table')._metroTable;
// table.export('CSV', 'all', 'table-export.csv', {
// csvDelimiter: "\t",
// csvNewLine: "\r\n",
// includeHeader: true
// });
// });
</script>
<script>
var sessionToken = '<?php echo isset($_SESSION["token"]) ? $_SESSION["token"] : ""; ?>';
var email = '<?php echo isset($_SESSION["email"]) ? $_SESSION["email"] : ""; ?>';
var password = '<?php echo isset($_SESSION["password"]) ? $_SESSION["password"] : ""; ?>';
function login(username, password, callback) {
fetch("https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/login", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Api-Key": "{{apiKey}}"
},
body: JSON.stringify({
username: username,
password: password
})
})
.then(response => {
if (response.ok) {
return response.json();
} else {
throw new Error("Unable to login");
}
})
.then(data => {
// Update the session token on the server side
fetch("update-token-session.php", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
token: data.token
})
})
.then(response => response.json())
.then(result => {
if (result.status === 'success') {
// Update the session token in the client-side variable
sessionToken = data.token;
console.log("New Token:", sessionToken);
callback();
} else {
throw new Error("Unable to update session token");
}
});
})
.catch(error => {
console.error("Error:", error.message);
});
}
function editVendorOrder(vendorOrderId) {
console.log("Session Token:", sessionToken);
login(email, password, function() {
window.open("vendor-dashboard-orders-edit.php?id=" + vendorOrderId, "_self");
})
}
function addProduct() {
console.log("Session Token:", sessionToken);
login(email, password, function() {
// Removed the call to updateSessionToken
window.open("vendor-uploads-add-product-action.php", "_self");
});
}
// Initialize Metro UI components
// var tables = document.querySelectorAll('[data-role="table"]');
// tables.forEach(function(table) {
// new METRO.Table(table);
// });
// document.getElementById("exportBtn").addEventListener("click", function() {
// var table = document.querySelector('#order-table')._metroTable;
// table.export('CSV', 'all', 'table-export.csv', {
// csvDelimiter: "\t",
// csvNewLine: "\r\n",
// includeHeader: true
// });
// });
</script>
<script>
const itemsPerPage = 5;
const totalItems = <?php echo $totalOrders; ?>;
const totalPages = Math.ceil(totalItems / itemsPerPage);
var sessionToken = '<?php echo isset($_SESSION["token"]) ? $_SESSION["token"] : ""; ?>';
var email = '<?php echo isset($_SESSION["email"]) ? $_SESSION["email"] : ""; ?>';
var password = '<?php echo isset($_SESSION["password"]) ? $_SESSION["password"] : ""; ?>';
//03-11-2024 Stacy modified for the pagination UI
function showPage(page) {
const startIndex = (page - 1) * itemsPerPage;
const endIndex = startIndex + itemsPerPage;
const tableRows = document.querySelectorAll('#orderItemsBody tr');
// for pagination button
const pager = document.querySelectorAll('.page-btn')
pager.forEach((row, index) => {
if (index!==page-1) {
row.style.backgroundColor="white";
row.style.color="black";
function login(username, password, callback) {
fetch("https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/login", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Api-Key": "{{apiKey}}"
},
body: JSON.stringify({
username: username,
password: password
})
})
.then(response => {
if (response.ok) {
return response.json();
} else {
row.style.backgroundColor="#007bff";
row.style.color="white";
throw new Error("Unable to login");
}
})
.then(data => {
// Update the session token on the server side
fetch("update-token-session.php", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
token: data.token
})
})
.then(response => response.json())
.then(result => {
if (result.status === 'success') {
// Update the session token in the client-side variable
sessionToken = data.token;
console.log("New Token:", sessionToken);
callback();
} else {
throw new Error("Unable to update session token");
}
});
})
.catch(error => {
console.error("Error:", error.message);
});
}
// document.querySelector('.page-' + page).style.backgroundColor="red";
tableRows.forEach((row, index) => {
if (index >= startIndex && index < endIndex) {
row.style.display = 'table-row';
} else {
row.style.display = 'none';
}
});
}
// function createPagination() {
// const paginationContainer = document.getElementById('pagination');
function editVendorOrder(vendorOrderId) {
// for (let i = 1; i <= totalPages; i++) {
// // created a tag
// const pageButton = document.createElement('a');
// // created class for a tag
// pageButton.className = "page-btn page-" + i
// pageButton.style="margin:5px"
// pageButton.textContent = i;
// pageButton.addEventListener('click', () => showPage(i));
// paginationContainer.appendChild(pageButton);
// }
// }
console.log("Session Token:", sessionToken);
login(email, password, function() {
window.open("vendor-dashboard-orders-edit.php?id=" + vendorOrderId, "_self");
})
}
// createPagination();
showPage(1); // Show the first page by default
function addProduct() {
console.log("Session Token:", sessionToken);
login(email, password, function() {
// Removed the call to updateSessionToken
window.open("vendor-uploads-add-product-action.php", "_self");
});
}
</script>
<script>
const itemsPerPage = 5;
const totalItems = <?php echo $totalOrders; ?>;
const totalPages = Math.ceil(totalItems / itemsPerPage);
//03-11-2024 Stacy modified for the pagination UI
function showPage(page) {
const startIndex = (page - 1) * itemsPerPage;
const endIndex = startIndex + itemsPerPage;
const tableRows = document.querySelectorAll('#orderItemsBody tr');
// for pagination button
const pager = document.querySelectorAll('.page-btn')
pager.forEach((row, index) => {
if (index !== page - 1) {
row.style.backgroundColor = "white";
row.style.color = "black";
} else {
row.style.backgroundColor = "#007bff";
row.style.color = "white";
}
});
// document.querySelector('.page-' + page).style.backgroundColor="red";
tableRows.forEach((row, index) => {
if (index >= startIndex && index < endIndex) {
row.style.display = 'table-row';
} else {
row.style.display = 'none';
}
});
}
// function createPagination() {
// const paginationContainer = document.getElementById('pagination');
// for (let i = 1; i <= totalPages; i++) {
// // created a tag
// const pageButton = document.createElement('a');
// // created class for a tag
// pageButton.className = "page-btn page-" + i
// pageButton.style="margin:5px"
// pageButton.textContent = i;
// pageButton.addEventListener('click', () => showPage(i));
// paginationContainer.appendChild(pageButton);
// }
// }
// createPagination();
showPage(1); // Show the first page by default
</script>
</div>
@ -483,22 +529,16 @@ $style = "display: flex; height: 15px;font-weight:400; width:90px; margin-top:10
<div class="ec-header-btn">
<a class="btn btn-lg btn-primary" href="vendor-all-product-list.php">View All</a>
<!-- <a class="btn btn-lg btn-primary" href="vendor-uploads-add-product-action.php">Add</a> -->
<a class="btn btn-lg btn-primary" href="vendor-uploads-add-product-action.php" onclick="addProduct('<?php echo $product['_id'] ?>');">Add</a>
<a class="btn btn-lg btn-primary" href="vendor-uploads-add-product-action.php"
onclick="addProduct('<?php echo $product['_id'] ?>');">Add</a>
</div>
</div>
<div class="ec-vendor-card-body">
<div class="ec-vendor-card-table">
<table class="table ec-table"
id="order-table"
data-role="table"
data-searching="true"
data-filtering="true"
data-sorting="true"
data-show-rows-steps="5,10,20,-1"
data-horizontal-scroll="true"
data-rownum="true"
data-table-info-title="Display from $1 to $2 of $3 product(s)"
>
<table class="table ec-table" id="order-table" data-role="table" data-searching="true"
data-filtering="true" data-sorting="true" data-show-rows-steps="5,10,20,-1"
data-horizontal-scroll="true" data-rownum="true"
data-table-info-title="Display from $1 to $2 of $3 product(s)">
<thead>
<tr>
<th data-sortable="false" scope="col">Image</th>
@ -520,39 +560,47 @@ $style = "display: flex; height: 15px;font-weight:400; width:90px; margin-top:10
$product = $products[$i];
?>
<tr>
<td>
<!-- raymart added function feb 21 2024 -->
<?php
<tr>
<td>
<!-- raymart added function feb 21 2024 -->
<?php
if (isset($product['images'])) {
$image_urls = explode(',', $product['images']);
if (!empty($image_urls)) {
$first_image_url = trim($image_urls[0]);
?>
<img loading="lazy" class="prod-img" src="<?php echo $first_image_url; ?>" alt="edit" />
<?php
<img loading="lazy" class="prod-img"
src="<?php echo $first_image_url; ?>" alt="edit" />
<?php
}
} else {
?>
<img loading="lazy" class="prod-img rounded-circle" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/65/No-Image-Placeholder.svg/495px-No-Image-Placeholder.svg.png?20200912122019" alt="edit" />
<?php
<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
<!-- <?php
if (isset($product['product_image']) && !empty($product['product_image'])) {
echo '<img loading="lazy" src="' . $product['product_image'] . '" alt="Product Image" class="prod-img" >';
} else {
echo '<img loading="lazy" src="assets/img/vendor/u1.jpg" class="prod-img rounded-circle" alt="Placeholder Image" >';
}
?> -->
</td>
<td style="max-width:300px;"><span class="text-truncate"><?php echo $product['product_name']; ?></span></td>
<td><span><?php echo $product['regular_price']; ?></span></td>
<td><span><?php echo !empty($product['sale_price']) ?$product['sale_price']: "N/A"; ?></span></td>
<td><span><?php echo !empty($product['minimum_order']) ?$product['minimum_order']: "N/A";?></span></td>
<td><span><?php echo !empty($product['stock']) ?$product['stock']: "0"; ?></span></td>
</tr>
</td>
<td style="max-width:300px;"><span
class="text-truncate"><?php echo $product['product_name']; ?></span>
</td>
<td><span><?php echo $product['regular_price']; ?></span></td>
<td><span><?php echo !empty($product['sale_price']) ?$product['sale_price']: "N/A"; ?></span>
</td>
<td><span><?php echo !empty($product['minimum_order']) ?$product['minimum_order']: "N/A";?></span>
</td>
<td><span><?php echo !empty($product['stock']) ?$product['stock']: "0"; ?></span>
</td>
</tr>
<?php
}
?>
@ -595,42 +643,53 @@ $style = "display: flex; height: 15px;font-weight:400; width:90px; margin-top:10
<!-- Swiper -->
<div class="qty-product-cover">
<div class="qty-slide">
<img loading="lazy" 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 loading="lazy" 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 loading="lazy" 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 loading="lazy" 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 loading="lazy" 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 loading="lazy" 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 loading="lazy" 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 loading="lazy" 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 loading="lazy" 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 loading="lazy" 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>
<div class="col-md-7 col-sm-12 col-xs-12">
<div class="quickview-pro-content">
<h5 class="ec-quick-title"><a href="shop-left-sidebar-col-4.php">Handbag leather purse for women</a>
<h5 class="ec-quick-title"><a href="shop-left-sidebar-col-4.php">Handbag leather purse
for women</a>
</h5>
<div class="ec-quickview-rating">
<i class="ecicon eci-star fill"></i>
@ -664,7 +723,8 @@ $style = "display: flex; height: 15px;font-weight:400; width:90px; margin-top:10
<span>Size</span>
<div class="ec-pro-variation-content">
<ul class="ec-opt-size">
<li class="active"><a href="#" class="ec-opt-sz" data-tooltip="Small">S</a></li>
<li class="active"><a href="#" class="ec-opt-sz"
data-tooltip="Small">S</a></li>
<li><a href="#" class="ec-opt-sz" data-tooltip="Medium">M</a></li>
<li><a href="#" class="ec-opt-sz" data-tooltip="Large">X</a></li>
<li><a href="#" class="ec-opt-sz" data-tooltip="Extra Large">XL</a></li>
@ -677,7 +737,8 @@ $style = "display: flex; height: 15px;font-weight:400; width:90px; margin-top:10
<input class="qty-input" type="text" name="ec_qtybtn" value="1" />
</div>
<div class="ec-quickview-cart ">
<button class="btn btn-primary"><i class="fi-rr-shopping-basket"></i> Add To Cart</button>
<button class="btn btn-primary"><i class="fi-rr-shopping-basket"></i> Add To
Cart</button>
</div>
</div>
</div>
@ -694,16 +755,20 @@ $style = "display: flex; height: 15px;font-weight:400; width:90px; margin-top:10
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
<a href="#ec-mobile-menu" class="navbar-toggler-btn ec-header-btn ec-side-toggle"><i class="fi-rr-menu-burger"></i></a>
<a href="#ec-mobile-menu" class="navbar-toggler-btn ec-header-btn ec-side-toggle"><i
class="fi-rr-menu-burger"></i></a>
</div>
<div class="ec-nav-panel-icons">
<a href="#ec-side-cart" class="toggle-cart ec-header-btn ec-side-toggle"><i class="fi-rr-shopping-bag"></i><span class="ec-cart-noti ec-header-count cart-count-lable">3</span></a>
<a href="#ec-side-cart" class="toggle-cart ec-header-btn ec-side-toggle"><i
class="fi-rr-shopping-bag"></i><span
class="ec-cart-noti ec-header-count cart-count-lable">3</span></a>
</div>
<div class="ec-nav-panel-icons">
<a href="index.php" class="ec-header-btn"><i class="fi-rr-home"></i></a>
</div>
<div class="ec-nav-panel-icons">
<a href="wishlist.html" class="ec-header-btn"><i class="fi-rr-heart"></i><span class="ec-cart-noti">4</span></a>
<a href="wishlist.html" class="ec-header-btn"><i class="fi-rr-heart"></i><span
class="ec-cart-noti">4</span></a>
</div>
<div class="ec-nav-panel-icons">
<a href="login.php" class="ec-header-btn"><i class="fi-rr-user"></i></a>
@ -737,121 +802,7 @@ $style = "display: flex; height: 15px;font-weight:400; width:90px; margin-top:10
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -33,7 +33,10 @@ $products = productList();
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -465,121 +468,7 @@ $products = productList();
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -45,10 +45,11 @@ if ($_SESSION["isCustomer"] == true) {
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<title>oBanana B2B - Elevate Your Business</title>
<meta name="keywords" content="apparel, catalog, clean, ecommerce, ecommerce HTML, electronics, fashion, html eCommerce, html store, minimal, multipurpose, multipurpose ecommerce, online store, responsive ecommerce template, shops" />
<meta name="keywords"
content="apparel, catalog, clean, ecommerce, ecommerce HTML, electronics, fashion, html eCommerce, html store, minimal, multipurpose, multipurpose ecommerce, online store, responsive ecommerce template, shops" />
<meta name="description" content="Best ecommerce html template for single and multi vendor store.">
<meta name="author" content="ashishmaraviya">
<!-- site Favicon -->
<link rel="icon" href="assets/images/favicon/favicon.png" sizes="32x32" />
<link rel="apple-touch-icon" href="assets/images/favicon/favicon.png" />
@ -56,6 +57,9 @@ if ($_SESSION["isCustomer"] == true) {
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -75,40 +79,57 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Background css -->
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
<style>
.tab.active {
background-color: #ffaa00;
/* Set your desired background color for the active tab */
color: #ffffff;
/* Set your desired text color for the active tab */
.tab.active {
background-color: #ffaa00;
/* Set your desired background color for the active tab */
color: #ffffff;
/* Set your desired text color for the active tab */
}
#pagination {
display: flex;
list-style: none;
padding: 0;
margin: 0;
justify-content: center;
margin-top: 20px;
}
#pagination a {
color: #333;
text-decoration: none;
padding: 5px 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
.roww {
width: 100%;
display: flex;
/* justify-content: center;
align-items: center; */
flex-wrap: nowrap !important;
flex-direction: row !important;
}
@media(max-width:992px) {
.roww {
flex-wrap: wrap !important;
}
#pagination {
display: flex;
list-style: none;
padding: 0;
margin: 0;
justify-content: center;
margin-top: 20px;
}
#pagination a {
color: #333;
text-decoration: none;
padding: 5px 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
}
</style>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script>
function updateCartItemCount() {
$.get("cartitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data, status) {
if (data != "") {
console.log("Data: " + data + "\nStatus: " + status);
document.getElementById("cartItemCount").innerHTML = data;
}
});
}
function updateCartItemCount() {
$.get("cartitems.php?id=<?php echo $_SESSION['customerId']; ?>", function(data, status) {
if (data != "") {
console.log("Data: " + data + "\nStatus: " + status);
document.getElementById("cartItemCount").innerHTML = data;
}
});
}
</script>
</head>
@ -124,18 +145,22 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Header start -->
<?php include "header.php" ?>
<!-- Header End -->
<!-- ekka Cart Start -->
<!-- ekka Cart End -->
<!-- Category Sidebar start -->
<?php include "category-slider.php" ?>
<!-- Ec breadcrumb start -->
<div class="sticky-header-next-sec ec-breadcrumb section-space-mb">
<div class="container">
<div class="row">
<div class="col-12">
<div class="row ec_breadcrumb_inner">
<div class="row ec_breadcrumb_inner roww">
<div class="col-md-6 col-sm-12">
<h2 class="ec-breadcrumb-title">User History</h2>
</div>
@ -152,12 +177,12 @@ if ($_SESSION["isCustomer"] == true) {
</div>
</div>
</div>
<!-- Ec breadcrumb end -->
<!-- Ec breadcrumb end -->
<section class="ec-page-content ec-vendor-uploads ec-user-account section-space-p">
<div class="container">
<div class="row">
<div class="row roww">
<!-- Sidebar Area Start -->
<div class="ec-shop-leftside ec-vendor-sidebar col-lg-3 col-md-12">
<div class="ec-shop-leftside ec-vendor-sidebar col-lg-3 col-md-12 ">
<div class="ec-sidebar-wrap ec-border-box">
<!-- Sidebar Category Block -->
<div class="ec-sidebar-block">
@ -165,18 +190,25 @@ if ($_SESSION["isCustomer"] == true) {
<!-- 03-12-2024 Stacy added placeholder for vendor banner -->
<?php
if (!empty($vendorData['vendor_banner'])) { ?>
<div class="ec-vendor-block-bg" style="background-image: url(<?php echo $vendorData['vendor_banner'] ?>) !important;"></div>
<?php } else { ?>
<div class="ec-vendor-block-bg" style="background-color: orange; background-image: url(<?php echo $vendorData['vendor_banner'] ?>) !important;"></div>
<div class="ec-vendor-block-bg"
style="background-image: url(<?php echo $vendorData['vendor_banner'] ?>) !important;">
</div>
<?php } else { ?>
<div class="ec-vendor-block-bg"
style="background-color: orange; background-image: url(<?php echo $vendorData['vendor_banner'] ?>) !important;">
</div>
<?php } ?>
<!-- <div class="ec-vendor-block-bg" style="background-image: url(<?php echo $vendorData['vendor_banner'] ?>) !important;"></div> -->
<div class="ec-vendor-block-detail">
<?php
<?php
if (!empty($vendorData['vendor_image'])) { ?>
<img loading="lazy" class="v-img" src=<?php echo $vendorData['vendor_image'] ?> alt="vendor image">
<?php } else { ?>
<img loading="lazy" class="v-img" src="https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg" alt="vendor image">
<?php } ?>
<img loading="lazy" class="v-img" src=<?php echo $vendorData['vendor_image'] ?>
alt="vendor image">
<?php } else { ?>
<img loading="lazy" class="v-img"
src="https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg"
alt="vendor image">
<?php } ?>
<!-- <img loading="lazy" class="v-img" src=<?php #echo $vendorData['vendor_image'] ?> alt="vendor image"> -->
<h5 class="name"><?php echo $vendorData['user_login'] ?></h5>
</div>
@ -186,11 +218,11 @@ if ($_SESSION["isCustomer"] == true) {
<li><a href="vendor-uploads.php">Upload Product</a></li>
<li><a href="vendor-settings.php">Settings (Edit)</a></li>
<li><a href="user-refund-history.php">User Refund History</a></li> -->
<!-- <li><a href="cart.html">Cart</a></li>
<!-- <li><a href="cart.html">Cart</a></li>
<li><a href="checkout.html">Checkout</a></li>
<li><a href="track-order.html">Track Order</a></li>
<li><a href="user-invoice.html">Invoice</a></li> -->
<!-- </ul>
<!-- </ul>
</div> -->
<?php include "vendor-user-tabs.php" ?>
</div>
@ -200,34 +232,27 @@ if ($_SESSION["isCustomer"] == true) {
<div class="ec-shop-rightside col-lg-9 col-md-12">
<div class="ec-vendor-dashboard-card">
<div class="ec-vendor-card-header">
<h5>Payments</h5>
<h5>Payments</h5>
</div>
<div class="ec-vendor-card-body">
<div class="ec-vendor-card-table">
<div id="payments" class="tab-content active">
<!-- Gelo added vendor payments tab -->
<table class="table ec-table"
id="order-table" style="overflow-x: auto;"
data-role="table"
data-pagination="true"
data-searching="true"
data-filtering="true"
data-sorting="true"
data-show-rows-steps="5,10,20,-1"
data-horizontal-scroll="true"
data-rownum="true"
data-table-info-title="Display from $1 to $2 of $3 payment(s)"
>
<table class="table ec-table" id="order-table" style="overflow-x: auto;"
data-role="table" data-pagination="true" data-searching="true"
data-filtering="true" data-sorting="true" data-show-rows-steps="5,10,20,-1"
data-horizontal-scroll="true" data-rownum="true"
data-table-info-title="Display from $1 to $2 of $3 payment(s)">
<thead>
<tr>
<th data-sortable="true" scope="col">Payment Method</th>
<th data-sortable="true" scope="col">Amount</th>
<th data-sortable="true" scope="col">Status</th>
<th data-sortable="true" scope="col">Description</th>
<th data-sortable="true" scope="col">Date Created</th>
<th data-sortable="true" scope="col">Action</th>
<th data-sortable="true" scope="col">Date Created</th>
<th data-sortable="true" scope="col">Action</th>
</tr>
</thead>
<tbody id="paymentsTableBody">
@ -245,16 +270,19 @@ if ($_SESSION["isCustomer"] == true) {
}
$totalPayments++;
?>
<tr>
<td><?php echo $orderItems['payment_method']; ?></td>
<td> <?php echo $orderItems['total_amount']; ?></td>
<td><?php echo $orderItems['payment']['status']; ?></td>
<td><?php echo $orderItems['items'][0]['product']['name']; ?></td>
<td><?php echo $formattedDate?></td>
<td><button type="button" class="btn btn-primary showSinglePaymentBtn" data-order-id="<?php echo $orderItems['_id']; ?>" data-bs-toggle="modal" data-bs-target="#vendorPaymentsModal">View</button></td>
<tr>
<td><?php echo $orderItems['payment_method']; ?></td>
<td> <?php echo $orderItems['total_amount']; ?></td>
<td><?php echo $orderItems['payment']['status']; ?></td>
<td><?php echo $orderItems['items'][0]['product']['name']; ?></td>
<td><?php echo $formattedDate?></td>
<td><button type="button" class="btn btn-primary showSinglePaymentBtn"
data-order-id="<?php echo $orderItems['_id']; ?>"
data-bs-toggle="modal"
data-bs-target="#vendorPaymentsModal">View</button></td>
</tr>
</tr>
<?php
}
}
@ -267,190 +295,190 @@ if ($_SESSION["isCustomer"] == true) {
<script>
const itemsPerPage = 5;
const totalItems = <?php echo $totalPayments; ?>;
const totalPages = Math.ceil(totalItems / itemsPerPage);
const itemsPerPage = 5;
const totalItems = <?php echo $totalPayments; ?>;
const totalPages = Math.ceil(totalItems / itemsPerPage);
function showPage(page) {
const startIndex = (page - 1) * itemsPerPage;
const endIndex = startIndex + itemsPerPage;
const tableRows = document.querySelectorAll('#paymentsTableBody tr');
// for pagination button
const pager = document.querySelectorAll('.page-btn')
pager.forEach((row, index) => {
if (index!==page-1) {
row.style.backgroundColor="white";
row.style.color="black";
} else {
row.style.backgroundColor="#007bff";
row.style.color="white";
}
});
tableRows.forEach((row, index) => {
if (index >= startIndex && index < endIndex) {
row.style.display = 'table-row';
} else {
row.style.display = 'none';
}
});
}
function showPage(page) {
const startIndex = (page - 1) * itemsPerPage;
const endIndex = startIndex + itemsPerPage;
const tableRows = document.querySelectorAll('#paymentsTableBody tr');
// function createPagination() {
// const paginationContainer = document.getElementById('pagination');
// for pagination button
const pager = document.querySelectorAll('.page-btn')
pager.forEach((row, index) => {
if (index !== page - 1) {
row.style.backgroundColor = "white";
row.style.color = "black";
} else {
row.style.backgroundColor = "#007bff";
row.style.color = "white";
}
});
// for (let i = 1; i <= totalPages; i++) {
// // created a tag
// const pageButton = document.createElement('a');
// // created class for a tag
// pageButton.className = "page-btn page-" + i
// pageButton.textContent = i;
// pageButton.addEventListener('click', () => showPage(i));
// paginationContainer.appendChild(pageButton);
// }
// }
// createPagination();
showPage(1); // Show the first page by default
tableRows.forEach((row, index) => {
if (index >= startIndex && index < endIndex) {
row.style.display = 'table-row';
} else {
row.style.display = 'none';
}
});
}
// function createPagination() {
// const paginationContainer = document.getElementById('pagination');
// for (let i = 1; i <= totalPages; i++) {
// // created a tag
// const pageButton = document.createElement('a');
// // created class for a tag
// pageButton.className = "page-btn page-" + i
// pageButton.textContent = i;
// pageButton.addEventListener('click', () => showPage(i));
// paginationContainer.appendChild(pageButton);
// }
// }
// createPagination();
showPage(1); // Show the first page by default
</script>
<script>
var sessionToken = '<?php echo isset($_SESSION["token"]) ? $_SESSION["token"] : ""; ?>';
var email = '<?php echo isset($_SESSION["email"]) ? $_SESSION["email"] : ""; ?>';
var password = '<?php echo isset($_SESSION["password"]) ? $_SESSION["password"] : ""; ?>';
var sessionToken = '<?php echo isset($_SESSION["token"]) ? $_SESSION["token"] : ""; ?>';
var email = '<?php echo isset($_SESSION["email"]) ? $_SESSION["email"] : ""; ?>';
var password =
'<?php echo isset($_SESSION["password"]) ? $_SESSION["password"] : ""; ?>';
function login(username, password, callback) {
fetch("https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/login", {
method: "POST",
function login(username, password, callback) {
fetch("https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/login", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Api-Key": "{{apiKey}}"
},
body: JSON.stringify({
username: username,
password: password
})
})
.then(response => {
if (response.ok) {
return response.json();
} else {
throw new Error("Unable to login");
}
})
.then(data => {
// Update the session token on the server side
fetch("update-token-session.php", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
token: data.token
})
})
.then(response => response.json())
.then(result => {
if (result.status === 'success') {
// Update the session token in the client-side variable
sessionToken = data.token;
console.log("New Token:", sessionToken);
callback();
} else {
throw new Error("Unable to update session token");
}
});
})
.catch(error => {
console.error("Error:", error.message);
});
}
function updateRefundShipStatus(orderId, image, reason) {
login(email, password, function() {
fetch(`https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/${orderId}`, {
method: 'PATCH',
headers: {
"Content-Type": "application/json",
"X-Api-Key": "{{apiKey}}"
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + sessionToken,
},
body: JSON.stringify({
username: username,
password: password
})
return_order: {
reason: reason,
image: image,
status: 'To Ship',
}
}),
})
.then(response => {
if (response.ok) {
return response.json();
.then(response => response.json())
.then(data => {
// Assuming the server responds with a JSON object indicating success or failure
if (data && data !== "") {
// Update the status in the table without reloading the page
// document.querySelector(`[data-order-id="${orderId}"] .order-status`).innerText = 'COMPLETED';
// location.reload();
} else {
throw new Error("Unable to login");
alert('Failed to update order status');
}
})
.catch(error => {
console.error('Error:', error);
alert('An error occurred while updating order status');
});
})
}
function updateRefundReceiveStatus(orderId, image, reason) {
login(email, password, function() {
fetch(`https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/${orderId}`, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + sessionToken,
},
body: JSON.stringify({
return_order: {
reason: reason,
image: image,
status: 'To Refund',
}
}),
})
.then(response => response.json())
.then(data => {
// Update the session token on the server side
fetch("update-token-session.php", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
token: data.token
})
})
.then(response => response.json())
.then(result => {
if (result.status === 'success') {
// Update the session token in the client-side variable
sessionToken = data.token;
console.log("New Token:", sessionToken);
callback();
} else {
throw new Error("Unable to update session token");
}
});
// Assuming the server responds with a JSON object indicating success or failure
if (data && data !== "") {
// Update the status in the table without reloading the page
// document.querySelector(`[data-order-id="${orderId}"] .order-status`).innerText = 'COMPLETED';
location.reload();
} else {
alert('Failed to update order status');
}
})
.catch(error => {
console.error("Error:", error.message);
console.error('Error:', error);
alert('An error occurred while updating order status');
});
}
})
function updateRefundShipStatus(orderId, image, reason) {
login(email, password, function() {
fetch(`https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/${orderId}`, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + sessionToken,
},
body: JSON.stringify({
return_order: {
reason: reason,
image: image,
status: 'To Ship',
}
}),
})
.then(response => response.json())
.then(data => {
// Assuming the server responds with a JSON object indicating success or failure
if (data && data !== "") {
// Update the status in the table without reloading the page
// document.querySelector(`[data-order-id="${orderId}"] .order-status`).innerText = 'COMPLETED';
// location.reload();
} else {
alert('Failed to update order status');
}
})
.catch(error => {
console.error('Error:', error);
alert('An error occurred while updating order status');
});
})
}
function updateRefundReceiveStatus(orderId, image, reason) {
login(email, password, function() {
fetch(`https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/${orderId}`, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + sessionToken,
},
body: JSON.stringify({
return_order: {
reason: reason,
image: image,
status: 'To Refund',
}
}),
})
.then(response => response.json())
.then(data => {
// Assuming the server responds with a JSON object indicating success or failure
if (data && data !== "") {
// Update the status in the table without reloading the page
// document.querySelector(`[data-order-id="${orderId}"] .order-status`).innerText = 'COMPLETED';
location.reload();
} else {
alert('Failed to update order status');
}
})
.catch(error => {
console.error('Error:', error);
alert('An error occurred while updating order status');
});
})
}
}
//S 03-06-2024 Stacy added upload function
function addProduct() {
console.log("Session Token:", sessionToken);
login(email, password, function() {
// Removed the call to updateSessionToken
window.open("vendor-uploads-add-product-action.php", "_self");
});
}
//S 03-06-2024 Stacy added upload function
function addProduct() {
console.log("Session Token:", sessionToken);
login(email, password, function() {
// Removed the call to updateSessionToken
window.open("vendor-uploads-add-product-action.php", "_self");
});
}
</script>
</div>
</div>
@ -460,11 +488,13 @@ if ($_SESSION["isCustomer"] == true) {
</div>
</section>
<!--Gelo added payment details modal-->
<div class="modal fade" id="vendorPaymentsModal" tabindex="-1" aria-labelledby="vendorPaymentsModalLabel" aria-hidden="true">
<div class="modal fade" id="vendorPaymentsModal" tabindex="-1" aria-labelledby="vendorPaymentsModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-xl" style="min-width: 90%;">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title fs-5" id="vendorPaymentsModalLabel">Payment ID: <span id="paymentIdSpan"></span></h5>
<h5 class="modal-title fs-5" id="vendorPaymentsModalLabel">Payment ID: <span
id="paymentIdSpan"></span></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
@ -480,48 +510,54 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<!-- GELO ADDED AJAX FUNCTION FOR MODAL BOX QUERY -->
<script>
$(document).ready(function() {
$('.showSinglePaymentBtn').click(function() {
var orderId = $(this).data('order-id');
$(document).ready(function() {
$('.showSinglePaymentBtn').click(function() {
var orderId = $(this).data('order-id');
var token = "<?php echo $authtoken;?>";
<?php
var token = "<?php echo $authtoken;?>";
<?php
?>
$.ajax({
// url: 'https://api.obanana.shop/api/v1/orders/' + orderId,
url: 'https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/' + orderId,
type: 'GET',
headers: {
'Authorization': 'Bearer ' + token
},
success: function(response) {
$.ajax({
// url: 'https://api.obanana.shop/api/v1/orders/' + orderId,
url: 'https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/' +
orderId,
type: 'GET',
headers: {
'Authorization': 'Bearer ' + token
},
success: function(response) {
// Handle successful response
console.log(response);
var paymentId = response.payment.reference_number;
$('#paymentIdSpan').text(paymentId);
var gross_price = (response.payment.details[0]?.attributes.data.attributes.amount / 100).toFixed(2);
var payment_status = response.payment.status;
var fee = response.payment.details[0]?.attributes.data.attributes.fee;
var net_amount = (response.payment.details[0]?.attributes.data.attributes.payments[0].attributes.net_amount / 100).toFixed(2);
var desc = response.items[0].product.name;
var method = response.payment_method;
var name = response.billing_address.billing_first_name + " " + response.billing_address.billing_last_name;
var email = response.payment.details[0]?.attributes.data.attributes.payments[0].attributes.billing?.email;
var phone = response.billing_address.billing_phone;
var rawDate = response.payment.details[0]?.attributes.data.attributes.payments[0]?.createdAt;
var payoutStatus = response.payout_status[0]?.status;
if (rawDate){
var createdAtDate = new Date(rawDate);
var month = String(createdAtDate.getMonth() + 1).padStart(2, '0');
var day = String(createdAtDate.getDate()).padStart(2, '0');
var year = createdAtDate.getFullYear();
var date = month + '/' + day + '/' + year;
}
var paymentId = response.payment.reference_number;
$('#paymentIdSpan').text(paymentId);
var gross_price = (response.payment.details[0]?.attributes.data
.attributes.amount / 100).toFixed(2);
var payment_status = response.payment.status;
var fee = response.payment.details[0]?.attributes.data.attributes.fee;
var net_amount = (response.payment.details[0]?.attributes.data
.attributes.payments[0].attributes.net_amount / 100).toFixed(2);
var desc = response.items[0].product.name;
var method = response.payment_method;
var name = response.billing_address.billing_first_name + " " + response
.billing_address.billing_last_name;
var email = response.payment.details[0]?.attributes.data.attributes
.payments[0].attributes.billing?.email;
var phone = response.billing_address.billing_phone;
var rawDate = response.payment.details[0]?.attributes.data.attributes
.payments[0]?.createdAt;
var payoutStatus = response.payout_status[0]?.status;
if (rawDate) {
var createdAtDate = new Date(rawDate);
var month = String(createdAtDate.getMonth() + 1).padStart(2, '0');
var day = String(createdAtDate.getDate()).padStart(2, '0');
var year = createdAtDate.getFullYear();
var date = month + '/' + day + '/' + year;
}
if(payoutStatus === 'Deposited'){
var orderDetailsHtml = `
if (payoutStatus === 'Deposited') {
var orderDetailsHtml = `
<div class="row">
<div class="col-12">
@ -588,8 +624,8 @@ if ($_SESSION["isCustomer"] == true) {
</div>
</div>
`;
}else{
var orderDetailsHtml = `
} else {
var orderDetailsHtml = `
<div class="row">
<div class="col-12">
@ -649,13 +685,13 @@ if ($_SESSION["isCustomer"] == true) {
</div>
</div>
`;
}
$('#orderDetailsContainer').html(orderDetailsHtml);
},
})
});
}
$('#orderDetailsContainer').html(orderDetailsHtml);
},
})
});
});
</script>
<!-- Footer Start -->
<?php include "footer.php" ?>
@ -667,16 +703,20 @@ if ($_SESSION["isCustomer"] == true) {
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
<a href="#ec-mobile-menu" class="navbar-toggler-btn ec-header-btn ec-side-toggle"><i class="fi-rr-menu-burger"></i></a>
<a href="#ec-mobile-menu" class="navbar-toggler-btn ec-header-btn ec-side-toggle"><i
class="fi-rr-menu-burger"></i></a>
</div>
<div class="ec-nav-panel-icons">
<a href="#ec-side-cart" class="toggle-cart ec-header-btn ec-side-toggle"><i class="fi-rr-shopping-bag"></i><span class="ec-cart-noti ec-header-count cart-count-lable">3</span></a>
<a href="#ec-side-cart" class="toggle-cart ec-header-btn ec-side-toggle"><i
class="fi-rr-shopping-bag"></i><span
class="ec-cart-noti ec-header-count cart-count-lable">3</span></a>
</div>
<div class="ec-nav-panel-icons">
<a href="index.php" class="ec-header-btn"><i class="fi-rr-home"></i></a>
</div>
<div class="ec-nav-panel-icons">
<a href="wishlist.html" class="ec-header-btn"><i class="fi-rr-heart"></i><span class="ec-cart-noti">4</span></a>
<a href="wishlist.html" class="ec-header-btn"><i class="fi-rr-heart"></i><span
class="ec-cart-noti">4</span></a>
</div>
<div class="ec-nav-panel-icons">
<a href="login.php" class="ec-header-btn"><i class="fi-rr-user"></i></a>
@ -696,121 +736,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>
@ -885,7 +811,7 @@ if ($_SESSION["isCustomer"] == true) {
<script src="assets/js/vendor/bootstrap.min.js"></script>
<script src="assets/js/vendor/jquery-migrate-3.3.0.min.js"></script>
<script src="assets/js/vendor/modernizr-3.11.2.min.js"></script>
<!--Plugins JS-->
@ -898,11 +824,10 @@ if ($_SESSION["isCustomer"] == true) {
<script src="assets/js/vendor/jquery.magnific-popup.min.js"></script>
<script src="assets/js/plugins/jquery.sticky-sidebar.js"></script>
<script src="assets/js/plugins/nouislider.js"></script>
<script src="https://cdn.metroui.org.ua/current/metro.js"></script>
<script>
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
<!-- <script src="https://cdn.metroui.org.ua/current/metro.js"></script> -->
<script>
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
</script>
<!-- Main Js -->
<script src="assets/js/vendor/index.js"></script>

View File

@ -51,7 +51,8 @@ $vendorPayoutData = json_decode($response, true);
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<title>oBanana B2B - Elevate Your Business</title>
<meta name="keywords" content="apparel, catalog, clean, ecommerce, ecommerce HTML, electronics, fashion, html eCommerce, html store, minimal, multipurpose, multipurpose ecommerce, online store, responsive ecommerce template, shops" />
<meta name="keywords"
content="apparel, catalog, clean, ecommerce, ecommerce HTML, electronics, fashion, html eCommerce, html store, minimal, multipurpose, multipurpose ecommerce, online store, responsive ecommerce template, shops" />
<meta name="description" content="Best ecommerce html template for single and multi vendor store.">
<meta name="author" content="ashishmaraviya">
@ -62,6 +63,9 @@ $vendorPayoutData = json_decode($response, true);
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -75,34 +79,55 @@ $vendorPayoutData = json_decode($response, true);
<link rel="stylesheet" href="assets/css/style.css" />
<link rel="stylesheet" href="assets/css/style2.css" />
<link rel="stylesheet" href="assets/css/responsive.css" />
<link href="https://cdn.datatables.net/v/bs5/dt-2.0.3/r-3.0.0/sp-2.3.0/datatables.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.metroui.org.ua/current/metro.css">
<script src="https://cdn.metroui.org.ua/current/metro.js"></script>
<!-- Background css -->
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@latest/dist/css/select2.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" />
<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 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();
}
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; ?>;
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);
if (currentTime >= renewalTime || currentTime >= expirationTime) {
renewToken();
}
}, 60000);
</script>
</head>
<style>
.roww {
width: 100%;
display: flex;
/* justify-content: center;
align-items: center; */
flex-wrap: nowrap !important;
flex-direction: row !important;
}
@media(max-width:992px) {
.roww {
flex-wrap: wrap !important;
}
}
</style>
<body class="shop_page">
<div id="ec-overlay">
@ -130,15 +155,15 @@ $vendorPayoutData = json_decode($response, true);
<div class="container">
<div class="row">
<div class="col-12">
<div class="row ec_breadcrumb_inner">
<div class="row ec_breadcrumb_inner roww">
<div class="col-md-6 col-sm-12">
<h2 class="ec-breadcrumb-title">Vendor Settings</h2>
<h2 class="ec-breadcrumb-title">Vendor Payouts</h2>
</div>
<div class="col-md-6 col-sm-12">
<!-- ec-breadcrumb-list start -->
<ul class="ec-breadcrumb-list">
<li class="ec-breadcrumb-item"><a href="index.php">Home</a></li>
<li class="ec-breadcrumb-item active">Settings</li>
<li class="ec-breadcrumb-item active">Payouts</li>
</ul>
<!-- ec-breadcrumb-list end -->
</div>
@ -152,190 +177,230 @@ $vendorPayoutData = json_decode($response, true);
<!-- Vendor setting section -->
<section class="ec-page-content ec-vendor-uploads section-space-p">
<div class="container">
<div class="row">
<div class="row roww">
<!-- Sidebar Area Start -->
<div class="ec-shop-leftside ec-vendor-sidebar col-lg-3 col-md-12">
<div class="ec-sidebar-wrap ec-border-box">
<!-- Sidebar Category Block -->
<div class="ec-sidebar-block">
<div class="ec-vendor-block">
<!-- 03-12-2024 Stacy added placeholder for vendor banner -->
<?php
if (!empty($vendorData['vendor_banner'])) { ?>
<div class="ec-vendor-block-bg"
style="background-image: url(<?php echo $vendorData['vendor_banner'] ?>) !important;">
</div>
<?php } else { ?>
<div class="ec-vendor-block-bg"
style="background-color: orange; background-image: url(<?php echo $vendorData['vendor_banner'] ?>) !important;">
</div>
<?php } ?>
<!-- <div class="ec-vendor-block-bg" style="background-image: url(<?php #echo $vendorData['vendor_banner'] ?>) !important;"></div> -->
<div class="ec-vendor-block-detail">
<!-- <img loading="lazy" class="v-img" src=<?php #echo $vendorData['vendor_image'] ?> alt="vendor image"> -->
<!-- 03-12-2024 Stacy added placeholder for vendor profile -->
<?php
if (!empty($vendorData['vendor_image'])) { ?>
<img loading="lazy" class="v-img" src=<?php echo $vendorData['vendor_image'] ?>
alt="vendor image">
<?php } else { ?>
<img loading="lazy" class="v-img"
src="https://yourteachingmentor.com/wp-content/uploads/2020/12/istockphoto-1223671392-612x612-1.jpg"
alt="vendor image">
<?php } ?>
<h5 class="name"><?php echo $vendorData['user_login'] ?></h5>
</div>
<!-- <div class="ec-vendor-block-items">
<ul>
<li><a href="vendor-dashboard.php">Dashboard</a></li>
<li><a onclick="addProduct();" href="">Upload Product</a></li>
<li><a href="vendor-settings.php">Settings (Edit)</a></li>
</ul>
</div> -->
<?php include "vendor-user-tabs.php" ?>
</div>
</div>
</div>
</div>
<div class="ec-shop-rightside col-lg-9 col-md-12">
<div class="ec-vendor-dashboard-card ec-vendor-setting-card">
<div class="ec-vendor-card-body">
<div class="row">
<div class="col-md-12 mb-5">
<div class="panel panel-primary">
<div class="panel-heading">
<h5 class="panel-title"><strong>Upcoming Payout</strong></h5>
</div>
<div class="panel-body ">
<div class="row">
<h4 style="color: #444;">
<div class="d-flex align-items-center">
<?php
$response = getOrderbyVendorId($vendorId);
$upcomingPayout = json_decode($response, true);
$payoutSum = 0;
foreach ($upcomingPayout as $x => $val) {
$paymentStatus = strtolower($val['payment']['status']);
$orderStatus = strtolower($val['status']);
$payoutStatus = empty($val['payout_status']);
if(( $paymentStatus == "paid") && ( $orderStatus == "completed") && ($payoutStatus == true)){
$orderAmount = $val['total_amount'];
$payoutSum += $orderAmount;
}
}
$finalPayoutSum = number_format($payoutSum, 2, '.', ',');
?>
<strong>
<?php echo $finalPayoutSum ?>
</strong>
</div>
</h4>
<!-- <div class="text-sm mt-3">
Payout Generation: Tue, Mar 19, 2024
</div>
<div class="text-sm">
Receive Payout on or before: Wed, Mar 20, 2024
</div> -->
<div class="text-sm">
<?php
$vendorResponse = getVendorbyId($vendorId);
$vendorInformation = json_decode($vendorResponse, true);
$bankAccountNumber = $vendorInformation['bank_acount_details'][0]['bank_account_number'];
$bankDetails = $vendorInformation['bank_acount_details'];
foreach ($bankDetails as $details) {
if ($details['bank_payout'] === true) {
$bankName = $details['bank_name'];
$bankAccountNumber = $details['bank_account_number'];
}
}
$bankNumEnding = substr($bankAccountNumber, -3);
?>
Receipient: <?php echo $bankName; ?> Account ending in <?php echo $bankNumEnding?>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="ec-vendor-dashboard-card">
<div class="ec-vendor-card-header">
<h5><strong>Upcoming Payout</strong></h5>
</div>
<!-- ADDITIONAL PANELS FOR PAYOUTS FOR FUTURE USE, DO NOT REMOVE -->
<!-- <div class="col-md-4 mb-5">
<div class="panel panel-primary">
<div class="panel-heading">
<h5 class="panel-title"><strong>Payout Generation Schedule</strong></h5>
</div>
<div class="panel-body ">
<div class="row">
<h4 style="color: #444;">
<div class="d-flex align-items-center">
<i class="fi-rs-calendar mt-1 mr-3 "></i>
<strong>
Weekly
</strong>
</div>
</h4>
<div class="mt-3">
<h6>
<strong class="text-primary ">Every Tuesday</strong>
</h6>
</div>
<div class="text-sm">
Payouts that will fall on holiday will be processed the next banking day
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4 mb-5">
<div class="panel panel-primary">
<div class="panel-heading">
<h5 class="panel-title"><strong>Next Payout</strong></h5>
</div>
<div class="panel-body ">
<div class="row">
<h4 style="color: #444;">
<div class="d-flex align-items-center">
<strong>
0.00
</strong>
</div>
</h4>
<- <div class="text-sm mt-3">
Payout Generation: Tue, Mar 25, 2024
</div>
<div class="text-sm">
Receive Payout on or before: Wed, Mar 26, 2024
</div> -
<div class="text-sm">
Receipient: Philippine National Bank (PNB) Account ending in <php echo $bankNumEnding?>
</div>
</div>
</div>
</div>
</div> -->
<div class="col-md-12 mt-3">
<h5 class='m-0'><strong>Payout History</strong></h5>
<div class="table-responsive px-4">
<table id='payoutsTableContent' class="table ec-table">
<thead>
<tr>
<th scope="col">Amount</th>
<th scope="col">Bank</th>
<th scope="col">Account Number</th>
<th scope="col">Payout Generation</th>
<th scope="col">Status</th>
<th scope="col">Action</th>
<div class="ec-vendor-card-body">
<div class="row">
<h4 style="color: #444;">
<div class="d-flex align-items-center">
<?php
$response = getOrderbyVendorId($vendorId);
$upcomingPayout = json_decode($response, true);
$payoutSum = 0;
</tr>
</thead>
<tbody class='table-group-divider'>
<?php
foreach ($vendorPayoutData as $x => $val) {
$vendorIdCheck = $val['vendor_details'][0]['vendor_id'];
$status = ucfirst(strtolower($val['status']));
$payoutDate = date("F d, Y", strtotime($val['createdAt']));
$payoutId = $val['_id'];
if ((empty($vendorIdCheck) == false) && ($vendorIdCheck == $vendorId) && ($status == "Deposited")) { ?>
<tr>
<td> <?php echo "" . $val['net_amount'] ?> </td>
<?php if (empty($val['bank_information'][0]['bank_name']) == false) {
?>
<td> <?php echo $val['bank_information'][0]['bank_name'] ?> </td>
<?php } else { ?>
<td> N/A </td>
<?php }
if (empty($val['bank_information'][0]['bank_account_number']) == false) {
$accNum = $val['bank_information'][0]['bank_account_number'];
// Replace characters with asterisks for all characters except the last three segments
$maskedAccNum = substr_replace($accNum, str_repeat('*', strlen($accNum) - 3), 0, -3); ?>
<td> <?php echo $maskedAccNum ?> </td>
<?php } else { ?>
<td> N/A </td>
<?php } ?>
<td> <?php echo $payoutDate ?> </td>
<td> <?php echo $status ?> </td>
<td>
<button type="button" class="btn btn-primary btn-sm showSinglePayoutBtn" data-order-id="<?php echo $payoutId; ?>" data-bs-toggle="modal" data-bs-target="#payoutsModal">View</button>
</td>
</tr>
<?php
foreach ($upcomingPayout as $x => $val) {
$paymentStatus = strtolower($val['payment']['status']);
$orderStatus = strtolower($val['status']);
$payoutStatus = empty($val['payout_status']);
if(( $paymentStatus == "paid") && ( $orderStatus == "completed") && ($payoutStatus == true)){
$orderAmount = $val['total_amount'];
$payoutSum += $orderAmount;
}
} ?>
</tbody>
</table>
}
$finalPayoutSum = number_format($payoutSum, 2, '.', ',');
?>
<strong>
<?php echo $finalPayoutSum ?>
</strong>
</div>
</h4>
<!-- <div class="text-sm mt-3">
Payout Generation: Tue, Mar 19, 2024
</div>
<div class="text-sm">
Receive Payout on or before: Wed, Mar 20, 2024
</div> -->
<div class="text-sm">
<?php
$vendorResponse = getVendorbyId($vendorId);
$vendorInformation = json_decode($vendorResponse, true);
$bankAccountNumber = $vendorInformation['bank_acount_details'][0]['bank_account_number'];
$bankDetails = $vendorInformation['bank_acount_details'];
foreach ($bankDetails as $details) {
if ($details['bank_payout'] === true) {
$bankName = $details['bank_name'];
$bankAccountNumber = $details['bank_account_number'];
}
}
$bankNumEnding = substr($bankAccountNumber, -3);
?>
Receipient: <?php echo $bankName; ?> Account ending in
<?php echo $bankNumEnding?>
</div>
</div>
</div>
</div>
</div>
<!-- ADDITIONAL PANELS FOR PAYOUTS FOR FUTURE USE, DO NOT REMOVE -->
<!-- <div class="col-md-12">
<div class="ec-vendor-dashboard-card">
<div class="ec-vendor-card-header">
<h5><strong>Payout Generation Schedule</strong></h5>
</div>
<div class="ec-vendor-card-body">
<div class="row">
<h4 style="color: #444;">
<div class="d-flex align-items-center">
<i class="fi-rs-calendar mt-1 mr-3 "></i>
<strong>
Weekly
</strong>
</div>
</h4>
<div class="mt-3">
<h6>
<strong class="text-primary ">Every Tuesday</strong>
</h6>
</div>
<div class="text-sm">
Payouts that will fall on holiday will be processed the next banking day
</div>
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="ec-vendor-dashboard-card">
<div class="ec-vendor-card-header">
<h5><strong>Next Payout</strong></h5>
</div>
<div class="ec-vendor-card-body">
<div class="row">
<h4 style="color: #444;">
<div class="d-flex align-items-center">
<strong>
0.00
</strong>
</div>
</h4>
<div class="text-sm mt-3">
Payout Generation: Tue, Mar 25, 2024
</div>
<div class="text-sm">
Receive Payout on or before: Wed, Mar 26, 2024
</div>
<div class="text-sm">
Receipient: Philippine National Bank (PNB) Account ending in 123
</div>
</div>
</div>
</div>
</div> -->
</div>
<div class="ec-vendor-dashboard-card space-bottom-30">
<div class="ec-vendor-card-header">
<h5>Payout History</h5>
</div>
<div class="ec-vendor-card-body">
<div class="ec-vendor-card-table">
<table class="table ec-table" id="payout-table" style="overflow-x: auto;"
data-role="table" data-pagination="true" data-searching="true" data-filtering="true"
data-sorting="true" data-show-rows-steps="5,10,20,-1" data-horizontal-scroll="true"
data-rownum="true" data-table-info-title="Display from $1 to $2 of $3 payment(s)">
<thead>
<tr>
<th data-sortable="true" scope="col">Amount</th>
<th data-sortable="true" scope="col">Bank</th>
<th data-sortable="true" scope="col">Account Number</th>
<th data-sortable="true" scope="col">Payout Generation</th>
<th data-sortable="true" scope="col">Status</th>
<th data-sortable="true" scope="col">Action</th>
</tr>
</thead>
<tbody class='table-group-divider'>
<?php
foreach (array_reverse($vendorPayoutData) as $x => $val) {
$vendorIdCheck = $val['vendor_details'][0]['vendor_id'];
$status = ucfirst(strtolower($val['status']));
$payoutDate = date("F d, Y", strtotime($val['createdAt']));
$payoutId = $val['_id'];
if ((empty($vendorIdCheck) == false) && ($vendorIdCheck == $vendorId) && ($status == "Deposited")) { ?>
<tr>
<td> <?php echo "" . $val['net_amount'] ?> </td>
<?php if (empty($val['bank_information'][0]['bank_name']) == false) {
?>
<td> <?php echo $val['bank_information'][0]['bank_name'] ?> </td>
<?php } else { ?>
<td> N/A </td>
<?php }
if (empty($val['bank_information'][0]['bank_account_number']) == false) {
$accNum = $val['bank_information'][0]['bank_account_number'];
// Replace characters with asterisks for all characters except the last three segments
$maskedAccNum = substr_replace($accNum, str_repeat('*', strlen($accNum) - 3), 0, -3); ?>
<td> <?php echo $maskedAccNum ?> </td>
<?php } else { ?>
<td> N/A </td>
<?php } ?>
<td> <?php echo $payoutDate ?> </td>
<td> <?php echo $status ?> </td>
<td>
<button type="button" class="btn btn-primary btn-sm showSinglePayoutBtn"
data-order-id="<?php echo $payoutId; ?>" data-bs-toggle="modal"
data-bs-target="#payoutsModal">View</button>
</td>
</tr>
<?php
}
} ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
@ -394,121 +459,7 @@ $vendorPayoutData = json_decode($response, true);
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>
@ -595,7 +546,8 @@ $vendorPayoutData = json_decode($response, true);
<script src="assets/js/plugins/jquery.sticky-sidebar.js"></script>
<script src="assets/js/plugins/nouislider.js"></script>
<script src="https://cdn.datatables.net/v/bs5/dt-2.0.3/r-3.0.0/sp-2.3.0/datatables.min.js"></script>
<!-- <script src="https://cdn.metroui.org.ua/current/metro.js"></script> -->
<!-- <script>
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
@ -607,52 +559,56 @@ $vendorPayoutData = json_decode($response, true);
<!-- JS CRIPT FOR DYNAMIC MODAL BOX USING AJAX - JOHN LOUIE C. SUPERALIS MARCH 22, 2024 -->
<script>
$(document).ready(function() {
$('.showSinglePayoutBtn').click(function() {
var payoutId = $(this).data('order-id');
var token = "<?php echo $authToken; ?>";
$('#payoutIdSpan').text(payoutId);
$.ajax({
// url: 'https://api.obanana.shop/api/v1/payouts/' + payoutId,
url: 'https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/payouts/' + payoutId,
type: 'GET',
headers: {
'Authorization': 'Bearer ' + token
},
success: function(response) {
// Handle successful response
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();
var bankName = response.bank_information[0].bank_name;
var bankNum = response.bank_information[0].bank_account_number;
var bankNumEnding = bankNum.slice(-3); // Extract last three characters of bankNum
var maskedBankNum = "Ending in " + bankNumEnding; // Create message
var bankAccName = response.bank_information[0].bank_account_name;
var transactionLogsHtml = ''; // Initialize empty string to store HTML for transaction logs
response.transaction_logs.forEach(function(log)
{
var paymentType = log.Type;
var transDate = new Date(log?.Transaction_date).toLocaleString('en-US', {
year: 'numeric',
month: '2-digit',
$(document).ready(function() {
$('.showSinglePayoutBtn').click(function() {
var payoutId = $(this).data('order-id');
var token = "<?php echo $authToken; ?>";
$('#payoutIdSpan').text(payoutId);
$.ajax({
// url: 'https://api.obanana.shop/api/v1/payouts/' + payoutId,
url: 'https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/payouts/' +
payoutId,
type: 'GET',
headers: {
'Authorization': 'Bearer ' + token
},
success: function(response) {
// Handle successful response
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();
var bankName = response.bank_information[0].bank_name;
var bankNum = response.bank_information[0].bank_account_number;
var bankNumEnding = bankNum.slice(-
3); // Extract last three characters of bankNum
var maskedBankNum = "Ending in " + bankNumEnding; // Create message
var bankAccName = response.bank_information[0].bank_account_name;
var transactionLogsHtml =
''; // Initialize empty string to store HTML for transaction logs
response.transaction_logs.forEach(function(log) {
var paymentType = log.Type;
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 += `
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>
<td>${paymentType}</td>
<td>${transDate}</td>
@ -661,11 +617,11 @@ $vendorPayoutData = json_decode($response, true);
<td> ${transNetAmount}</td>
<td>${transDesc}</td>
</tr>`;
});
});
// Populate data dynamically using the response
var payoutDetailsHtml = `
// Populate data dynamically using the response
var payoutDetailsHtml = `
<div class="row">
<div class="col-md-7 mb-4">
<div class="d-flex flex-column">
@ -673,8 +629,9 @@ $vendorPayoutData = json_decode($response, true);
<div>
<h6><strong>Payout Information</strong></h6>
</div>
<button class="fw-bold border border-success border-2 btn-outline-success btn-sm" disabled>${payoutStatus}</button>
<div>
<button disabled style="border: 2px solid #198754; color: #198754 !important; border-radius: 5px;">${payoutStatus}</button>
</div>
</div>
<div class="d-flex justify-content-between p-2">
<div class="fw-bold">Gross Amount</div>
@ -693,7 +650,7 @@ $vendorPayoutData = json_decode($response, true);
</div>
</div>
<div class="col-md-5 mb-4">
<div class="d-flex flex-column" style="border-bottom: 1px solid #000;">
<div class="d-flex flex-column" >
<div class="d-flex justify-content-between p-2">
<h6><strong>Bank Information</strong></h6>
</div>
@ -736,18 +693,13 @@ $vendorPayoutData = json_decode($response, true);
</div>
</div>
</div>`;
$('#payoutDetailsContainer').html(payoutDetailsHtml);
$('#payoutDetailsContainer').html(payoutDetailsHtml);
},
})
},
})
});
});
</script>
<script>
$(document).ready( function () {
$('#payoutsTableContent').DataTable();
} );
});
</script>
</body>

View File

@ -28,7 +28,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -417,129 +420,7 @@
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266"
data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -52,7 +52,10 @@ if ($_SESSION["isCustomer"] == true) {
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -69,9 +72,14 @@ if ($_SESSION["isCustomer"] == true) {
<link rel="stylesheet" href="assets/css/style.css" />
<link rel="stylesheet" href="assets/css/style2.css" />
<link rel="stylesheet" href="assets/css/responsive.css" />
<link href="https://cdn.datatables.net/v/bs5/dt-2.0.3/r-3.0.0/sp-2.3.0/datatables.min.css" rel="stylesheet">
<!-- Background css -->
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@latest/dist/css/select2.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" />
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/select2@latest/dist/js/select2.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<style>
.tab.active {
background-color: #ffffff;
@ -260,7 +268,7 @@ if ($_SESSION["isCustomer"] == true) {
<h5 class="name"><?php echo $vendorData['user_login'] ?></h5>
</div>
<!-- <div class="ec-vendor-block-items">
<!-- <ul>
<ul>
<li><a href="vendor-dashboard.php">Dashboard</a></li>
<li><a href="vendor-uploads.php">Upload Product</a></li>
<li><a href="vendor-settings.php">Settings (Edit)</a></li>
@ -319,8 +327,8 @@ if ($_SESSION["isCustomer"] == true) {
<!-- 03-26-2024 Stacy added tab for all orders -->
<!-- Content for "All Refunds" tab -->
<div id="allRefunds" class="tab-content active">
<table class="table ec-table">
<div id="allRefunds" class="tab-content mt-1 active">
<table id="allRefundsTbl" class="table ec-table">
<thead id="allRefundTHead">
<tr class="Title">
<th scope="col">Image</th>
@ -353,12 +361,13 @@ if ($_SESSION["isCustomer"] == true) {
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
<td><span><?php echo $order['total_amount'] ?></span></td>
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
<td><span><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
@ -388,8 +397,8 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Content for "To Approve" tab -->
<div id="toApprove" class="tab-content">
<table class="table ec-table">
<div id="toApprove" class="tab-content mt-1">
<table id="toApproveTbl" class="table ec-table">
<thead id="toApproveTHead">
<tr class="Title">
<th scope="col">Image</th>
@ -420,12 +429,12 @@ if ($_SESSION["isCustomer"] == true) {
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView">
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'">
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['items'][0]['quantity']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['items'][0]['price']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['total_amount'] ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
@ -459,8 +468,8 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Content for "To Ship" tab -->
<div id="toShip" class="tab-content">
<table class="table ec-table">
<div id="toShip" class="tab-content mt-1">
<table id="toShipTbl" class="table ec-table">
<thead id="toShipTHead">
<tr class="Title">
<th scope="col">Image</th>
@ -491,12 +500,13 @@ if ($_SESSION["isCustomer"] == true) {
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
<td><span><?php echo $order['total_amount'] ?></span></td>
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
<td><span><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
@ -526,8 +536,8 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Content for "To Receive" tab -->
<div id="toReceive" class="tab-content">
<table class="table ec-table">
<div id="toReceive" class="tab-content mt-1">
<table id="toReceiveTbl" class="table ec-table">
<thead id="toReceiveTHead">
<tr class="Title">
<th scope="col">Image</th>
@ -557,12 +567,12 @@ if ($_SESSION["isCustomer"] == true) {
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView">
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'">
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['items'][0]['quantity']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['items'][0]['price']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['total_amount'] ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
<td data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails"><span><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
@ -595,8 +605,8 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Content for "To Refund" tab -->
<div id="toRefund" class="tab-content">
<table class="table ec-table">
<div id="toRefund" class="tab-content mt-1">
<table id="toRefundTbl" class="table ec-table">
<thead id="toRefundTHead">
<tr class="Title">
<th scope="col">Image</th>
@ -626,12 +636,13 @@ if ($_SESSION["isCustomer"] == true) {
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
<td><span><?php echo $order['total_amount'] ?></span></td>
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
<td><span><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
@ -664,8 +675,8 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Content for "Return Complete" tab -->
<div id="returnComplete" class="tab-content">
<table class="table ec-table">
<div id="returnComplete" class="tab-content mt-1">
<table id="returnCompleteTbl" class="table ec-table">
<thead id="returnCompleteTHead">
<tr class="Title">
<th scope="col">Image</th>
@ -695,12 +706,13 @@ if ($_SESSION["isCustomer"] == true) {
<?php
$jsonorder = json_encode($order);
?>
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<tr class="tableView" style="cursor:pointer;" onmouseover="this.style.backgroundColor='#e5e5e5'" onmouseout="this.style.backgroundColor='#ffffff'"
data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
<td><img loading="lazy" class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td>
<td><span class="text-truncate"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span><?php echo $order['items'][0]['price']; ?></span></td>
<td><span><?php echo $order['total_amount'] ?></span></td>
<td><span class="text-truncate" style="width:20em;"><?php echo $order['items'][0]['product']['name']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['items'][0]['quantity']; ?></span></td>
<td><span style="width:4em;"><?php echo $order['items'][0]['price']; ?></span></td>
<td><span style="width:3em;"><?php echo $order['total_amount'] ?></span></td>
<td><span><?php echo $order['return_order']['status']; ?></span></td>
<!-- <td><span><?php # echo $order['return_order']['reason']; ?></span></td>
<td><img loading="lazy" class="prod-img" src="<?php # echo $order['return_order']['image']; ?>" alt="product"></td> -->
@ -1076,7 +1088,7 @@ if ($_SESSION["isCustomer"] == true) {
if (jsonObject.return_order.status === 'To Approve') {
modal.innerHTML = `
<div class="modal-header" style="height:5px;">
<div class="modal-header" style="height:5px; padding:10px;">
<h5 class="modal-title fs-5 font-weight-bold">${jsonObject.items[0].product.name}</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
@ -1246,7 +1258,7 @@ if ($_SESSION["isCustomer"] == true) {
<!-- Footer navigation panel for responsive display -->
<div class="ec-nav-toolbar">
<!-- <div class="ec-nav-toolbar">
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
@ -1267,7 +1279,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
</div>
</div>
</div> -->
<!-- Footer navigation panel for responsive display end -->
<!-- raymart remove popup feb 20 2024 -->
@ -1293,121 +1305,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>
@ -1476,6 +1374,33 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<!-- Feature tools end -->
<!-- DataTables -->
<script>
$(document).ready( function () {
$('#allRefundsTbl').DataTable();
} );
$(document).ready( function () {
$('#toApproveTbl').DataTable();
} );
$(document).ready( function () {
$('#toShipTbl').DataTable();
} );
$(document).ready( function () {
$('#toReceiveTbl').DataTable();
} );
$(document).ready( function () {
$('#toRefundTbl').DataTable();
} );
$(document).ready( function () {
$('#returnCompleteTbl').DataTable();
} );
</script>
<!-- Vendor JS -->
<script src="assets/js/vendor/jquery-3.5.1.min.js"></script>
<script src="assets/js/vendor/popper.min.js"></script>
@ -1493,6 +1418,7 @@ if ($_SESSION["isCustomer"] == true) {
<script src="assets/js/vendor/jquery.magnific-popup.min.js"></script>
<script src="assets/js/plugins/jquery.sticky-sidebar.js"></script>
<script src="assets/js/plugins/nouislider.js"></script>
<script src="https://cdn.datatables.net/v/bs5/dt-2.0.3/r-3.0.0/sp-2.3.0/datatables.min.js"></script>
<!-- Main Js -->
<script src="assets/js/vendor/index.js"></script>

View File

@ -17,7 +17,10 @@
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -223,121 +226,7 @@
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -47,7 +47,10 @@ if ($_SESSION["isCustomer"] == true) {
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -262,10 +265,6 @@ if ($_SESSION["isCustomer"] == true) {
</span>
</div>
<?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>
@ -292,16 +291,44 @@ 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>
<!-- 03-19-24 Jun Jihad Bank Information -->
<div class="col-md-12 col-sm-12" style="display:flex; justify-content: space-between">
<h5>Bank Information </h5>
<button type="button" class="btn btn-primary" id="vendorBankModalBtn" data-bs-toggle="modal" data-bs-target="#vendorBankModal">My Banks</button>
</div>
<!-- 03-19-24 Jun Jihad Bank Information -->
<div class="col-md-12 col-sm-12" style="display:flex; justify-content: space-between">
<h5>Bank Information </h5>
<button type="button" class="btn btn-primary" id="vendorBankModalBtn" data-bs-toggle="modal" data-bs-target="#vendorBankModal">My Banks</button>
</div>
<div class="row">
<div class="col-md-12 col-sm-12">
<div class="py-3 col-md-12 col-sm-12">
<?php foreach ($vendorData['bank_acount_details'] as $bank_acount_details) : ?>
<?php if ($bank_acount_details['bank_payout']) : ?>
<table style="width:100%; border-collapse: collapse;">
@ -411,27 +438,27 @@ if ($_SESSION["isCustomer"] == true) {
<form>
<div class="form-group">
<label for="addressFirstName" class="text-dark font-weight-medium pt-3 mb-2">First Name</label>
<input type="text" class="form-control" id="addressFirstName">
<input type="text" class="form-control" id="addressFirstName" required>
</div>
<div class="form-group">
<label for="addressLastName" class="text-dark font-weight-medium pt-3 mb-2">Last Name</label>
<input type="text" class="form-control" id="addressLastName">
<input type="text" class="form-control" id="addressLastName" required>
</div>
<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="addressContact" value="+63 " oninput="preventErasePrefix(this)">
<input type="text" class="form-control" id="addressContact" value="+63 " oninput="preventErasePrefix(this)" required>
</div>
<div class="form-group">
<label for="addressBuilding" class="text-dark font-weight-medium pt-3 mb-2"> Building,Number </label>
<input type="text" class="form-control" id="addressBuilding">
<label for="addressBuilding" class="text-dark font-weight-medium pt-3 mb-2"> House/Unit/Flr #, Bldg Name, Blk or Lot # </label>
<input type="text" class="form-control" id="addressBuilding" required>
</div>
<div class="form-group">
<label for="addressStreet" class="text-dark font-weight-medium pt-3 mb-2"> Street </label>
<input type="text" class="form-control" id="addressStreet">
<input type="text" class="form-control" id="addressStreet" required>
</div>
<div class="form-group">
<label for="provinceSelect">Province</label>
<select class="form-select" id="provinceSelect">
<select class="form-select" id="provinceSelect" required>
<option value="" disabled selected hidden>Select Province</option>
</select>
</div>
@ -449,7 +476,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<div class="form-group">
<label for="addressCountry" class="text-dark font-weight-medium pt-3 mb-2">Country</label>
<input type="text" class="form-control" id="addressCountry" value="Philippines">
<input type="text" class="form-control" id="addressCountry" value="Philippines" required>
</div>
<button type="button" class="btn btn-primary mt-4" id="submitBtn">Submit</button>
@ -494,7 +521,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<div class="form-group">
<label for="addressBuilding" class="text-dark font-weight-medium pt-3 mb-2">Building,Number</label>
<label for="addressBuilding" class="text-dark font-weight-medium pt-3 mb-2">House/Unit/Floor #, Bldg Name, Block or Lot #</label>
<input type="text" class="form-control" id="addressBuilding2" value="<?php echo $address['address_1']; ?>">
<!-- <label for="addressBuilding" class="text-dark font-weight-medium pt-3 mb-2"> Building,Number </label>
@ -544,7 +571,6 @@ if ($_SESSION["isCustomer"] == true) {
</div>
</div>
<!-- Bank -->
<div class="modal fade" id="vendorBankModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-sm" role="document" style="max-width: 800px;">
@ -561,19 +587,35 @@ if ($_SESSION["isCustomer"] == true) {
<div class="card-body">
<div class="container">
<div class="row">
<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 class="col-md-10 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 class="col-md-2 mx-auto">
<div id="editDelete" style="display:flex; float:right; width:20px; margin-right:-10px;" >
<?php
$bank['id'] =$bank_index;
$jsonBank = json_encode($bank)?>
<a href="javascript:0" data-bs-toggle="modal" data-value=' <?php echo $jsonBank; ?>' data-bs-target="#editBankModal">
<i class="fa-regular fa-pen-to-square" style="font-size:15px; float:right;"></i></a>
<!-- <i class="fa-regular fa-trash-can" style="font-size:15px; float:right;"></i> -->
</div>
<div id="editDelete" style="display:flex; float:right; width:20px; margin-top:20px; margin-right:-20px; margin-top:30px;">
<!-- <i class="fa-solid fa-pen" style="font-size:15px; float:right;"></i></a> -->
<i onclick="deleteBank('<?php echo $vendor['_id']; ?>', <?php echo $bank_index; ?>, true)"
class="fa-regular fa-trash-can" style="font-size:15px; float:right;"></i>
</div>
</div>
</div>
</div>
@ -603,7 +645,6 @@ if ($_SESSION["isCustomer"] == true) {
<label for="bankAccountName" class="text-dark font-weight-medium pt-3 mb-2">Bank Account Name</label>
<input type="text" class="form-control" id="bankAccountName">
</div>
<button type="button" class="btn btn-primary mt-4" id="submitBankBtn">Add Bank</button>
</form>
@ -613,6 +654,45 @@ if ($_SESSION["isCustomer"] == true) {
</div>
</div>
<!-- Louie Added Edit Bank Modal -->
<div class="modal fade" id="editBankModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-sm" role="document" style="max-width: 800px;">
<div class="modal-content">
<div class="modal-body" style="overflow-y: auto; max-height: 90vh;">
<form>
<div class="form-group">
<label for="bankName" class="text-dark font-weight-medium pt-3 mb-2">Bank Name</label>
<input type="text" class="form-control"
id="bankName2"
value="<?php echo $bank['bank_name']; ?>">
<!-- <label for="addressFirstName" class="text-dark font-weight-medium pt-3 mb-2">First Name</label>-->
<input type="hidden" class="form-control" id="bankId" >
<input type="hidden" class="form-control" id="bankPayoutStatus" >
</div>
<div class="form-group">
<label for="bankAccNum" class="text-dark font-weight-medium pt-3 mb-2">Bank Account Number</label>
<input min="0" type="number" class="form-control" id="bankAccNum" value="<?php echo $bank['bank_account_number']; ?>">
<!-- <label for="addressLastName" class="text-dark font-weight-medium pt-3 mb-2">Last Name</label>
<input type="text" class="form-control" id="addressLastName"> -->
</div>
<div class="form-group">
<label for="bankAccName" class="text-dark font-weight-medium pt-3 mb-2">Bank Account Name</label>
<input type="text" class="form-control" id="bankAccName" value="<?php echo $bank['bank_account_name']; ?>" >
<!-- <label for="addressContact" class="text-dark font-weight-medium pt-3 mb-2">Contact Number</label>
<input type="number" class="form-control" id="addressContact"> -->
</div>
<button type="button" class="btn btn-primary mt-4" id="editBankBtn">Submit</button>
</form>
</div>
</div>
</div>
</div>
<script>
function preventErasePrefix(input) { /* secondmodal */
@ -915,6 +995,8 @@ if ($_SESSION["isCustomer"] == true) {
});
</script>
<script>
const vendorid = `<?php echo $_SESSION["LoggedInVendorId"]; ?>`;
document.addEventListener('DOMContentLoaded', function() {
@ -947,7 +1029,6 @@ if ($_SESSION["isCustomer"] == true) {
}
})
.then(provincesData => {
provincesData.forEach(province => {
const option = new Option(province.name, province.code);
provinceSelect.append(option);
@ -1185,7 +1266,6 @@ if ($_SESSION["isCustomer"] == true) {
const bankName = $('#bankName').val();
const bankAccountNumber = $('#bankAccountNumber').val();
const bankAccountName = $('#bankAccountName').val();
const newBank = {
bank_name: bankName,
bank_account_number: bankAccountNumber,
@ -1218,7 +1298,7 @@ if ($_SESSION["isCustomer"] == true) {
});
});
</script>
<script>
<script>
async function updateAddressBilling(vendorid, addressIndex, isBilling) {
try {
const apiUrl = `https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/${vendorid}`;
@ -1417,6 +1497,128 @@ if ($_SESSION["isCustomer"] == true) {
}
</script>
<!-- Script added by Louie for Dynamic Edit Modal Box. May 08, 2024 -->
<script>
$('#editBankModal').on('shown.bs.modal', function (event) {
var jsonString = $(event.relatedTarget).data('value');
var jsonObject = JSON.parse(jsonString);
console.log("This is the data", jsonObject)
// shows inputed data by the vendor
document.querySelector('input[id="bankName2"]').value = jsonObject.bank_name;
document.querySelector('input[id="bankAccNum"]').value = jsonObject.bank_account_number;
document.querySelector('input[id="bankAccName"]').value = jsonObject.bank_account_name;
document.querySelector('input[id="bankPayoutStatus"]').value = jsonObject.bank_payout;
document.querySelector('input[id="bankId"]').value = jsonObject.id;
})
$('#editBankBtn').on('click', function() {
const vendorid = `<?php echo $_SESSION["LoggedInVendorId"]; ?>`;
console.log("The vendorid is", vendorid)
// fetch('https://api.obanana.shop/api/v1/customers/65482e8d209ff8d348bd30fd')
fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/' + vendorid)
.then(response => response.json())
.then(data => {
// Get the existing addresses array
const existingBankDetails = data.bank_acount_details || [];
console.log("This is the existing data", existingBankDetails)
// Get the new bank details
const editedbankName = $('#bankName2').val();
const editedAccNum = $('#bankAccNum').val();
const editedAccName = $('#bankAccName').val();
const editedPayout = $('#bankPayoutStatus').val() === "true";
const id = $('#bankId').val();
console.log('this is the bank id '+ id)
console.log(typeof editedPayout);
console.log(editedPayout);
// Create a new address object
let bankDetails = existingBankDetails
bankDetails[id]={
bank_name: editedbankName,
bank_account_number: editedAccNum,
bank_account_name: editedAccName,
bank_payout: editedPayout,
};
console.log( bankDetails[id])
// Make a PATCH request to update the addresses array
return fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/' + vendorid, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
bank_acount_details: bankDetails
}),
});
})
.then(response => {
if (response.ok) {
// Handle success (e.g., show a success message)
location.reload();
} else {
// Handle error
console.error('Failed to submit data');
alert('Failed to submit data');
}
})
.catch(error => {
// Handle network or other errors
console.error('Error:', error);
alert('Error submitting data');
});
});
</script>
<!-- Script added by Louie for Deleting Bank Information. May 08, 2024 -->
<script>
const vendorId = `<?php echo $_SESSION["LoggedInVendorId"]; ?>`;
function deleteBank(vendorId, bankIndex) {
fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/' + vendorId)
.then(response => response.json())
.then(data => {
let existingBank = data.bank_acount_details || [];
if (bankIndex >= 0 && bankIndex < existingBank.length) {
existingBank.splice(bankIndex, 1);
fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/' + vendorId, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
bank_acount_details: existingBank
}),
})
.then(response => {
if (response.ok) {
location.reload();
// filter the delete action
document.getElementById('form-check-' + bankIndex).remove();
} else {
console.error('Failed to submit data');
alert('Failed to submit data');
}
})
.catch(error => {
console.error('Error:', error);
alert('Error submitting data');
});
} else {
console.log("Invalid address index.");
}
})
.catch(error => {
console.error('Error:', error);
alert('Error fetching vendor data');
});
}
</script>
</section>
<!-- End Vendor setting section -->
@ -1747,121 +1949,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -31,19 +31,19 @@ $token = $_SESSION["token"];
$response = addProduct(
$vendorId,
$productName,
$stock,
$price,
$salePrice,
$weight,
$length,
$width,
$height,
$specifications,
$productType,
$parentId,
$token);
$vendorId,
$productName,
$stock,
$price,
$salePrice,
$weight,
$length,
$width,
$height,
$specifications,
$productType,
$parentId,
$token);
$array = json_decode($response,true);
$_SESSION['newProductId'] = $array['_id'];
header("location: vendor-uploads.php");

View File

@ -54,32 +54,32 @@ for ($i = 0; $i < count($quantities); $i++) {
$response = editProduct(
$productId,
$vendorId,
$productName,
$stock,
$ndd,
$sdd,
$freeSf,
$price,
$salePrice,
$weight,
$length,
$width,
$height,
$description,
$specifications,
$productType,
$productCategory,
$productSf,
$productStatus,
$parentId,
$minimumOrder,
$color,
$material,
$size,
$priceMatrix,
$token);
$productId,
$vendorId,
$productName,
$stock,
$ndd,
$sdd,
$freeSf,
$price,
$salePrice,
$weight,
$length,
$width,
$height,
$description,
$specifications,
$productType,
$productCategory,
$productSf,
$productStatus,
$parentId,
$minimumOrder,
$color,
$material,
$size,
$priceMatrix,
$token);
$array = json_decode($response,true);
$_SESSION['newProdictId'] = $array['_id'];
header("location: vendor-all-product-list.php");

View File

@ -47,7 +47,10 @@ if ($_SESSION["isCustomer"] == true) {
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
@ -278,11 +281,11 @@ if ($_SESSION["isCustomer"] == true) {
<div class="row g-3">
<div class="col-md-6">
<label for="inputEmail4" class="form-label">Product name</label>
<input type="text" class="form-control slug-title" id="inputEmail4" name="product_name" value="<?php echo $array['product_name']; ?>">
<input type="text" class="form-control slug-title" id="inputEmail4" name="product_name" value="<?php echo $array['product_name']; ?>" required>
</div>
<div class="col-md-6">
<label class="form-label">Product Type</label>
<select id="Categories" class="form-select" name="product_type" onchange="variables()">
<select id="Categories" class="form-select" name="product_type" onchange="variables()" >
<option value="simple" <?php if ($array['product_type'] == 'simple') {
echo 'selected';
} ?>>Simple</option>
@ -342,32 +345,32 @@ if ($_SESSION["isCustomer"] == true) {
<div class="col-md-12">
<label for="slug" class="col-12 col-form-label">Slug</label>
<div class="col-12">
<input id="slug" name="slug" class="form-control here set-slug" type="text">
<input id="slug" name="slug" class="form-control here set-slug" type="text" required>
</div>
</div>
<div class="col-md-6">
<!-- <label for="weight" class="form-label">Weight</label> -->
<!-- raymart edit weight -->
<label for="weight" class="form-label">Weight(grams)</label>
<input type="number" class="form-control slug-title" id="width" name="weight" value="<?php echo $array['weight']; ?>">
<input type="number" class="form-control slug-title" id="width" name="weight" value="<?php echo $array['weight']; ?>" required>
</div>
<div class="col-md-6">
<!-- <label for="length" class="form-label">Length</label> -->
<!-- raymart edit length -->
<label for="length" class="form-label">Length(cm)</label>
<input type="number" class="form-control slug-title" id="width" name="length" value="<?php echo $array['length']; ?>">
<input type="number" class="form-control slug-title" id="width" name="length" value="<?php echo $array['length']; ?>" required>
</div>
<div class="col-md-6">
<!-- <label for="width" class="form-label">Width</label> -->
<!-- raymart edit width -->
<label for="width" class="form-label">Width(cm)</label>
<input type="number" class="form-control slug-title" id="width" name="width" value="<?php echo $array['width']; ?>">
<input type="number" class="form-control slug-title" id="width" name="width" value="<?php echo $array['width']; ?>" required>
</div>
<div class="col-md-6">
<!-- <label for="height" class="form-label">Height</label> -->
<!-- raymart edit height -->
<label for="height" class="form-label">Height(cm)</label>
<input type="number" class="form-control slug-title" id="height" name="height" value="<?php echo $array['height']; ?>">
<input type="number" class="form-control slug-title" id="height" name="height" value="<?php echo $array['height']; ?>" required>
</div>
<!-- raymart added short des feb 21 2024 -->
<div class="col-md-12">
@ -467,7 +470,7 @@ if ($_SESSION["isCustomer"] == true) {
</div> -->
<div class="col-md-6">
<label class="form-label">Product Category</label>
<select class="form-select" name="product_category" id="product_category">
<select class="form-select" name="product_category" id="product_category" required>
<option value="">Select Category</option>
<option value="Electronics" <?php echo ($array['product_category'] === 'Electronics') ? 'selected' : ''; ?>>Electronics</option>
<option value="Solar" <?php echo ($array['product_category'] === 'Solar') ? 'selected' : ''; ?>>Solar</option>
@ -486,7 +489,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<div class="col-md-6">
<label class="form-label">Product Status</label>
<select class="form-select" name="status" id="status">
<select class="form-select" name="status" id="status" required>
<option value="">Select Product Status</option>
<option value="Active" <?php echo ($array['status'] === 'Active') ? 'selected' : ''; ?>>Active</option>
<option value="Inactive" <?php echo ($array['status'] === 'Inactive') ? 'selected' : ''; ?>>Inactive</option>
@ -932,121 +935,7 @@ if ($_SESSION["isCustomer"] == true) {
</div>
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>

View File

@ -7,7 +7,7 @@ $current_page = basename($_SERVER['PHP_SELF']);
<ul>
<li <?php if ($current_page == 'vendor-dashboard.php') echo 'class="active"'; ?>><a href="vendor-dashboard.php" id="vendor-dashboard-link">Dashboards</a></li>
<li <?php if ($current_page == 'vendor-uploads.php') echo 'class="active"'; ?>><a onclick="addProduct();" id="vendor-uploads-link">Uploads</a></li>
<li <?php if ($current_page == 'vendor-settings.php') echo 'class="active"'; ?>><a href="vendor-settings.php" id="vendor-settings-link">Settings (edit)</a></li>
<li <?php if ($current_page == 'vendor-settings.php') echo 'class="active"'; ?>><a href="vendor-settings.php" id="vendor-settings-link">Vendor Profile</a></li>
<li <?php if ($current_page == 'vendor-refund-history.php') echo 'class="active"'; ?>><a href="vendor-refund-history.php" id="vendor-refund-history-link">Vendor Refund History</a></li>
<li <?php if ($current_page == 'vendor-payments.php') echo 'class="active"'; ?>><a href="vendor-payments.php" id="vendor-payments-link">Payments</a></li>
<li <?php if ($current_page == 'vendor-payouts.php') echo 'class="active"'; ?>><a href="vendor-payouts.php" id="vendor-payouts-link">Payouts</a></li>

View File

@ -41,7 +41,10 @@ if ($_SESSION["isVendor"] == true) {
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css All Plugins Files -->
@ -174,240 +177,244 @@ if ($_SESSION["isVendor"] == true) {
</div>
<div class="row margin-minus-b-30">
<?php foreach ($customer['favorites']['products'] as $product) {
// raymart added vendorproduct feb 14 2024
$vendorOfProduct = getVendorbyId($product['vendor_api_id']);
?>
<div class="col-lg-3 col-md-4 col-sm-6 col-xs-6 mb-6 pro-gl-content">
<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" 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 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" 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) : ?>
<?php
if (empty($customer['favorites']['products'])) {
echo '<div class="col-12 text-center fs-2"><p>No wishlist</p></div>'; // Display "No wishlist" message if wishlist is empty
} else {
foreach ($customer['favorites']['products'] as $product) {
// raymart added vendorproduct feb 14 2024
$vendorOfProduct = getVendorbyId($product['vendor_api_id']);
?>
<div class="col-lg-3 col-md-4 col-sm-6 col-xs-6 mb-6 pro-gl-content">
<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" 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 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" 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 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 else : ($product["regular_price"] == "" || $product["regular_price"] == null) ?>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
</div>
</div>
<div class="ec-pro-content">
<h5 class="ec-pro-title"><a href="product-left-sidebar.php?id=<?php echo $product["_id"]; ?>"><?php echo $product["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">Lorem Ipsum is simply dummy text of the
printing and typesetting industry. Lorem Ipsum is simply dutmmy text
ever since the 1500s, when an unknown printer took a galley.</div> -->
<?php if ($product['product_type'] === 'variable') {
$variation_products = getProductVariations($product['_id']);
if ($variation_products) {
$variation_details = json_decode($variation_products, true);
}
} ?>
<!-- <span class="ec-price">
<span class="old-price">$12.00 <?php echo $product["regular_price"]; ?></span>
<span class="new-price">$10.00</span>
</span> -->
<?php
if ($product['product_type'] === "simple") {
if (isset($product['sale_price']) && $product['sale_price'] > 0) {
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>';
} else {
echo '<span class="new-price">' . $product['regular_price'] . '</span>';
}
} elseif ($product['product_type'] === "variable") {
$lowest_regular_price = null;
$highest_regular_price = null;
$lowest_sale_price = null;
$highest_sale_price = null;
<div class="ec-pro-content">
<h5 class="ec-pro-title"><a href="product-left-sidebar.php?id=<?php echo $product["_id"]; ?>"><?php echo $product["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">Lorem Ipsum is simply dummy text of the
printing and typesetting industry. Lorem Ipsum is simply dutmmy text
ever since the 1500s, when an unknown printer took a galley.</div> -->
<?php if ($product['product_type'] === 'variable') {
$variation_products = getProductVariations($product['_id']);
if ($variation_products) {
$variation_details = json_decode($variation_products, true);
}
} ?>
<!-- <span class="ec-price">
<span class="old-price">$12.00 <?php echo $product["regular_price"]; ?></span>
<span class="new-price">$10.00</span>
</span> -->
<?php
if ($product['product_type'] === "simple") {
if (isset($product['sale_price']) && $product['sale_price'] > 0) {
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>';
} else {
echo '<span class="new-price">' . $product['regular_price'] . '</span>';
}
} elseif ($product['product_type'] === "variable") {
$lowest_regular_price = null;
$highest_regular_price = null;
$lowest_sale_price = null;
$highest_sale_price = null;
if (isset($variation_details) && is_array($variation_details)) {
foreach ($variation_details as $index => $variation) {
$regular_price = isset($variation['regular_price']) ? $variation['regular_price'] : 0;
$sale_price = isset($variation['sale_price']) ? $variation['sale_price'] : 0;
if (isset($variation_details) && is_array($variation_details)) {
foreach ($variation_details as $index => $variation) {
$regular_price = isset($variation['regular_price']) ? $variation['regular_price'] : 0;
$sale_price = isset($variation['sale_price']) ? $variation['sale_price'] : 0;
// Update the minimum and maximum prices only if they are not null
if ($lowest_regular_price === null || $regular_price < $lowest_regular_price) {
$lowest_regular_price = $regular_price;
}
// Update the minimum and maximum prices only if they are not null
if ($lowest_regular_price === null || $regular_price < $lowest_regular_price) {
$lowest_regular_price = $regular_price;
}
if ($highest_regular_price === null || $regular_price > $highest_regular_price) {
$highest_regular_price = $regular_price;
}
if ($highest_regular_price === null || $regular_price > $highest_regular_price) {
$highest_regular_price = $regular_price;
}
if ($lowest_sale_price === null || $sale_price < $lowest_sale_price) {
$lowest_sale_price = $sale_price;
}
if ($lowest_sale_price === null || $sale_price < $lowest_sale_price) {
$lowest_sale_price = $sale_price;
}
if ($highest_sale_price === null || $sale_price > $highest_sale_price) {
$highest_sale_price = $sale_price;
if ($highest_sale_price === null || $sale_price > $highest_sale_price) {
$highest_sale_price = $sale_price;
}
}
}
}
// Display the range of prices based on the presence of sale prices
if ($lowest_sale_price !== null && $highest_sale_price !== null && $lowest_sale_price > 0 && $highest_sale_price > 0) {
echo '<span id="productPrice" class="new-price">' . '&#8369;' . $lowest_sale_price . ' - &#8369;' . $highest_sale_price . '</span>';
} elseif ($lowest_regular_price !== null && $highest_regular_price !== null) {
echo '<span id="productPrice" class="new-price">' . '&#8369;' . $lowest_regular_price . ' - &#8369;' . $highest_regular_price . '</span>';
// Display the range of prices based on the presence of sale prices
if ($lowest_sale_price !== null && $highest_sale_price !== null && $lowest_sale_price > 0 && $highest_sale_price > 0) {
echo '<span id="productPrice" class="new-price">' . '&#8369;' . $lowest_sale_price . ' - &#8369;' . $highest_sale_price . '</span>';
} elseif ($lowest_regular_price !== null && $highest_regular_price !== null) {
echo '<span id="productPrice" class="new-price">' . '&#8369;' . $lowest_regular_price . ' - &#8369;' . $highest_regular_price . '</span>';
}
}
}
?>
?>
</div>
</div>
</div>
</div>
<script>
customerId = '<?php echo $_SESSION['customerId']; ?>'
// Add event listener to remove button
document.addEventListener('DOMContentLoaded', function() {
var removeButtons = document.querySelectorAll('.remove-product');
removeButtons.forEach(function(removeButton) {
removeButton.addEventListener('click', function() {
var productId = removeButton.getAttribute('data-product-id');
removeProduct(productId);
<script>
customerId = '<?php echo $_SESSION['customerId']; ?>'
// Add event listener to remove button
document.addEventListener('DOMContentLoaded', function() {
var removeButtons = document.querySelectorAll('.remove-product');
removeButtons.forEach(function(removeButton) {
removeButton.addEventListener('click', function() {
var productId = removeButton.getAttribute('data-product-id');
removeProduct(productId);
});
});
var deleteButton = document.getElementById('delete-button');
deleteButton.addEventListener('click', function() {
var selectedProducts = [];
var checkboxes = document.querySelectorAll('.product-checkbox');
checkboxes.forEach(function(checkbox) {
if (checkbox.checked) {
selectedProducts.push(checkbox.value);
}
});
deleteProducts(selectedProducts);
});
});
var deleteButton = document.getElementById('delete-button');
deleteButton.addEventListener('click', function() {
var selectedProducts = [];
var checkboxes = document.querySelectorAll('.product-checkbox');
checkboxes.forEach(function(checkbox) {
if (checkbox.checked) {
selectedProducts.push(checkbox.value);
}
var selectAllButton = document.querySelector('#select-button');
selectAllButton.addEventListener('click', function() {
var selectedProducts = [];
var checkboxes = document.querySelectorAll('.product-checkbox');
// checkboxes.forEach(function(checkbox) {
// }
console.log('clicked')
for (let i = 0; i < checkboxes.length; i++ ) {
checkboxes[i].checked = selectAllButton.checked
// checkboxes[i].checked = true
}})
// Function to remove product
function removeProduct(productId) {
// Get all product IDs except the one to remove
var remainingProductIds = Array.from(document.querySelectorAll('.remove-product')).map(function(button) {
return button.getAttribute('data-product-id');
}).filter(function(id) {
return id !== productId;
});
deleteProducts(selectedProducts);
});
});
var selectAllButton = document.querySelector('#select-button');
selectAllButton.addEventListener('click', function() {
var selectedProducts = [];
var checkboxes = document.querySelectorAll('.product-checkbox');
// checkboxes.forEach(function(checkbox) {
// }
console.log('clicked')
for (let i = 0; i < checkboxes.length; i++ ) {
checkboxes[i].checked = selectAllButton.checked
// checkboxes[i].checked = true
}})
// Function to remove product
function removeProduct(productId) {
// Get all product IDs except the one to remove
var remainingProductIds = Array.from(document.querySelectorAll('.remove-product')).map(function(button) {
return button.getAttribute('data-product-id');
}).filter(function(id) {
return id !== productId;
});
// Make an AJAX request to update the favorites with the remaining products
var xhr = new XMLHttpRequest();
// xhr.open('PATCH', 'https://api.obanana.shop/api/v1/customers/' + customerId, true);
xhr.open('PATCH', 'https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/customers/' + customerId, true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.DONE) {
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
} else {
// Handle error response
console.error('Error removing product:', xhr.responseText);
// Make an AJAX request to update the favorites with the remaining products
var xhr = new XMLHttpRequest();
// xhr.open('PATCH', 'https://api.obanana.shop/api/v1/customers/' + customerId, true);
xhr.open('PATCH', 'https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/customers/' + customerId, true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.DONE) {
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
} else {
// Handle error response
console.error('Error removing product:', xhr.responseText);
}
}
}
};
// Construct data object with the remaining product IDs
var data = JSON.stringify({
favorites: {
products: remainingProductIds.map(function(id) {
// Find the product object with the corresponding ID
var remainingProduct = <?php echo json_encode($customer['favorites']['products']); ?>.find(function(product) {
return product['_id'] === id;
});
};
// Construct data object with the remaining product IDs
var data = JSON.stringify({
favorites: {
products: remainingProductIds.map(function(id) {
// Find the product object with the corresponding ID
var remainingProduct = <?php echo json_encode($customer['favorites']['products']); ?>.find(function(product) {
return product['_id'] === id;
});
// Return the entire product object
return remainingProduct;
})
}
});
xhr.send(data);
}
// Function to delete multiple products
function deleteProducts(productIds) {
var xhr = new XMLHttpRequest();
// xhr.open('PATCH', 'https://api.obanana.shop/api/v1/customers/' + customerId, true);
xhr.open('PATCH', 'https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/customers/' + customerId, true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.DONE) {
if (xhr.status === 200) {
console.log('Products removed successfully');
location.reload();
} else {
console.error('Error removing products:', xhr.responseText);
// Return the entire product object
return remainingProduct;
})
}
}
};
var remainingProductIds = Array.from(document.querySelectorAll('.remove-product')).map(function(button) {
return button.getAttribute('data-product-id');
}).filter(function(id) {
return !productIds.includes(id);
});
var data = JSON.stringify({
favorites: {
products: remainingProductIds.map(function(id) {
var remainingProduct = <?php echo json_encode($customer['favorites']['products']); ?>.find(function(product) {
return product['_id'] === id;
});
return remainingProduct;
})
}
});
xhr.send(data);
}
});
xhr.send(data);
}
// Function to delete multiple products
function deleteProducts(productIds) {
var xhr = new XMLHttpRequest();
// xhr.open('PATCH', 'https://api.obanana.shop/api/v1/customers/' + customerId, true);
xhr.open('PATCH', 'https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/customers/' + customerId, true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.DONE) {
if (xhr.status === 200) {
console.log('Products removed successfully');
location.reload();
} else {
console.error('Error removing products:', xhr.responseText);
}
}
};
var remainingProductIds = Array.from(document.querySelectorAll('.remove-product')).map(function(button) {
return button.getAttribute('data-product-id');
}).filter(function(id) {
return !productIds.includes(id);
});
var data = JSON.stringify({
favorites: {
products: remainingProductIds.map(function(id) {
var remainingProduct = <?php echo json_encode($customer['favorites']['products']); ?>.find(function(product) {
return product['_id'] === id;
});
return remainingProduct;
})
}
});
xhr.send(data);
}
</script>
<?php } ?>
<?php } }?>
</div>
</div>
@ -577,121 +584,7 @@ if ($_SESSION["isVendor"] == true) {
<!-- Cart Floating Button end -->
<!-- Whatsapp -->
<div class="ec-style ec-right-bottom">
<!-- Start Floating Panel Container -->
<div class="ec-panel">
<!-- Panel Header -->
<div class="ec-header">
<strong>Need Help?</strong>
<p>Chat with us on WhatsApp</p>
</div>
<!-- Panel Content -->
<div class="ec-body">
<ul>
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Sahar Darya</span>
<p>Sahar left 7 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Yolduz Rafi</span>
<p>Yolduz is online</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Nargis Hawa</span>
<p>Nargis left 30 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
<!-- Start Single Contact List -->
<li>
<a class="ec-list" data-number="918866774266" data-message="Please help me! I have got wrong product - ORDER ID is : #654321485">
<div class="d-flex bd-highlight">
<!-- Profile Picture -->
<div class="ec-img-cont">
<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 -->
<div class="ec-user-info">
<span>Khadija Mehr</span>
<p>Khadija left 50 mins ago</p>
</div>
<!-- Chat iCon -->
<div class="ec-chat-icon">
<i class="fa fa-whatsapp"></i>
</div>
</div>
</a>
</li>
<!--/ End Single Contact List -->
</ul>
</div>
</div>
<!--/ End Floating Panel Container -->
<!-- Start Right Floating Button-->
<div class="ec-right-bottom">
<div class="ec-box">
<div class="ec-button rotateBackward">
<img loading="lazy" class="whatsapp" src="assets/images/common/whatsapp.png" alt="whatsapp icon" />
</div>
</div>
</div>
<!--/ End Right Floating Button-->
</div>
<!-- Whatsapp end -->
<!-- Feature tools -->