899 lines
50 KiB
PHP
899 lines
50 KiB
PHP
<?php
|
||
include "functions.php";
|
||
|
||
$_SESSION["url"] = $_SERVER['REQUEST_URI'];
|
||
if ($_SESSION["userId"] <> "") {
|
||
$_SESSION["isLoggedIn"] = true;
|
||
$vendorLoginId = searchVendorbyLoginId($_SESSION["userId"]);
|
||
$vendorLoginIdjson = json_decode($vendorLoginId, true);
|
||
if (isset($vendorLoginIdjson['results'][0])) {
|
||
$vendorData = $vendorLoginIdjson['results'][0];
|
||
$vendorId = $vendorData['_id'];
|
||
$_SESSION["LoggedInVendorId"] = $vendorId;
|
||
}
|
||
} else {
|
||
$_SESSION["isLoggedIn"] = false;
|
||
header("location: login.php");
|
||
}
|
||
$products = productList();
|
||
$shopOrders = getOrderbyVendorId($vendorId);
|
||
|
||
$vendorOrderss = json_decode($shopOrders);
|
||
$vendorOrders1 = json_encode($shopOrders);
|
||
|
||
|
||
if (is_array($vendorOrderss)) {
|
||
$vendorOrders = json_decode($shopOrders);
|
||
} elseif (is_object($vendorOrderss) && property_exists($vendorOrderss, 'message')) {
|
||
$vendorOrders = [];
|
||
} else {
|
||
echo "Unknown type or no 'message' property found.";
|
||
}
|
||
|
||
if ($_SESSION["isCustomer"] == true) {
|
||
header("location: user-profile.php");
|
||
}
|
||
|
||
|
||
?>
|
||
<!--=========================================================
|
||
Item Name: oBanana B2B - Elevate Your Business
|
||
Author: ashishmaraviya
|
||
Version: 3.6
|
||
Copyright 2023
|
||
Author URI: https://themeforest.net/user/ashishmaraviya
|
||
============================================================-->
|
||
<!DOCTYPE html>
|
||
<html lang="en">
|
||
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta http-equiv="x-ua-compatible" content="ie=edge" />
|
||
<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="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" />
|
||
|
||
<!-- site Favicon -->
|
||
<link rel="icon" href="assets/images/favicon/favicon.png" sizes="32x32" />
|
||
<link rel="apple-touch-icon" href="assets/images/favicon/favicon.png" />
|
||
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
|
||
|
||
<!-- css Icon Font -->
|
||
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
|
||
<link rel="stylesheet" href="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" />
|
||
<link rel="stylesheet" href="assets/css/plugins/swiper-bundle.min.css" />
|
||
<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="https://cdn.metroui.org.ua/current/metro.css">
|
||
<!-- <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" />
|
||
|
||
<!-- 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 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;
|
||
|
||
}
|
||
}
|
||
</style>
|
||
</head>
|
||
|
||
<body class="shop_page">
|
||
<div id="ec-overlay">
|
||
<div class="ec-ellipsis">
|
||
<div></div>
|
||
<div></div>
|
||
<div></div>
|
||
<div></div>
|
||
</div>
|
||
</div>
|
||
<?php include 'header.php'; ?>
|
||
<!-- 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="bootstrap-section container">
|
||
<div class="bootstrap-section row ">
|
||
<div class="col-12">
|
||
<div class="row ec_breadcrumb_inner roww">
|
||
<div class="col-md-6 col-sm-12">
|
||
<h2 class="ec-breadcrumb-title">Vendor Dashboard</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">Dashboard</li>
|
||
</ul>
|
||
<!-- ec-breadcrumb-list end -->
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- Ec breadcrumb end -->
|
||
|
||
<!-- Vendor dashboard section -->
|
||
<section class="ec-page-content ec-vendor-dashboard section-space-p">
|
||
<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">
|
||
<!-- 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">
|
||
<?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">
|
||
<h5>Products</h5>
|
||
<?php
|
||
$vendor_Id = $vendorId;
|
||
$product = array_filter($products, function ($var) use ($vendor_Id) {
|
||
return ($var['vendor_api_id'] == $vendor_Id);
|
||
});
|
||
?>
|
||
<h3><?php echo count($product); ?></h3>
|
||
</div>
|
||
</div>
|
||
<div class="col-lg-3 col-md-6">
|
||
<div class="ec-vendor-dashboard-sort-card color-pink">
|
||
<h5>Orders</h5>
|
||
|
||
<h3> <?php
|
||
echo count($filteredOrders );
|
||
?></h3>
|
||
</div>
|
||
</div>
|
||
<!-- 02-26-2024 Stacy commented out -->
|
||
<!-- <div class="col-lg-3 col-md-6">
|
||
<div class="ec-vendor-dashboard-sort-card color-green">
|
||
<h5>Earnings</h5>
|
||
<h3>$56<span>/ Day</span></h3>
|
||
</div>
|
||
</div>
|
||
<div class="col-lg-3 col-md-6">
|
||
<div class="ec-vendor-dashboard-sort-card color-orange">
|
||
<h5>Sales</h5>
|
||
<h3>550<span>/ Mo</span></h3>
|
||
</div>
|
||
</div> -->
|
||
</div>
|
||
<div class="ec-vendor-dashboard-card space-bottom-30">
|
||
<div class="ec-vendor-card-header">
|
||
<h5>Latest Order</h5>
|
||
<div class="ec-header-btn">
|
||
<!-- <a class="btn btn-lg btn-primary" href="#">View All</a> -->
|
||
</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">
|
||
<?php
|
||
$totalOrders = count($vendorOrders);
|
||
$displayLimit = 5;
|
||
|
||
for ($i = 0; $i < $totalOrders; $i++) {
|
||
$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
|
||
# 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
|
||
} 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
|
||
}
|
||
?>
|
||
|
||
<!-- <?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 = '';
|
||
|
||
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: 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>
|
||
<?php
|
||
}
|
||
}
|
||
}
|
||
?>
|
||
</tbody>
|
||
</table>
|
||
<!-- <button id="exportBtn">Export to CSV</button> -->
|
||
</div>
|
||
<!-- <div id="pagination"></div> -->
|
||
</div>
|
||
<script>
|
||
// Initialize Metro UI components
|
||
// var tables = document.querySelectorAll('[data-role="table"]');
|
||
// tables.forEach(function(table) {
|
||
// new METRO.Table(table);
|
||
// });
|
||
// document.getElementById("exportBtn").addEventListener("click", function() {
|
||
// var table = document.querySelector('#order-table')._metroTable;
|
||
// table.export('CSV', 'all', 'table-export.csv', {
|
||
// csvDelimiter: "\t",
|
||
// csvNewLine: "\r\n",
|
||
// includeHeader: true
|
||
// });
|
||
// });
|
||
</script>
|
||
<script>
|
||
var sessionToken = '<?php echo isset($_SESSION["token"]) ? $_SESSION["token"] : ""; ?>';
|
||
var email = '<?php echo isset($_SESSION["email"]) ? $_SESSION["email"] : ""; ?>';
|
||
var password = '<?php echo isset($_SESSION["password"]) ? $_SESSION["password"] : ""; ?>';
|
||
|
||
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");
|
||
});
|
||
}
|
||
</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>
|
||
<div class="ec-vendor-dashboard-card space-bottom-30">
|
||
<div class="ec-vendor-card-header">
|
||
<h5>Product List</h5>
|
||
<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>
|
||
</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)">
|
||
<thead>
|
||
<tr>
|
||
<th data-sortable="false" scope="col">Image</th>
|
||
<th data-sortable="true" scope="col">Name</th>
|
||
<th data-sortable="true" scope="col">Regular Price</th>
|
||
<th data-sortable="true" scope="col">Sale Price</th>
|
||
<th data-sortable="true" scope="col">Minimum Order</th>
|
||
<th data-sortable="true" scope="col">Stock</th>
|
||
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<?php
|
||
$products = productListVendor($vendorId);
|
||
$totalProducts = count($products);
|
||
$displayLimit = 5;
|
||
// for ($i = 0; $i < min($totalProducts, $displayLimit); $i++) {
|
||
for ($i = 0; $i < min($totalProducts, $displayLimit); $i++) {
|
||
|
||
$product = $products[$i];
|
||
?>
|
||
<tr>
|
||
<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
|
||
}
|
||
} 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
|
||
}
|
||
?>
|
||
|
||
<!-- <?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>
|
||
<?php
|
||
}
|
||
?>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<!-- <div id="pagination"></div> -->
|
||
</div>
|
||
</div>
|
||
<!-- 02-26-2024 Stacy commented out -->
|
||
<!-- <div class="ec-vendor-dashboard-card">
|
||
<div class="ec-vendor-card-header">
|
||
<h5>Growth statastics</h5>
|
||
<div class="ec-header-btn">
|
||
<a class="btn btn-lg btn-primary" href="#">View All</a>
|
||
</div>
|
||
</div>
|
||
<div class="ec-vendor-card-body">
|
||
<canvas id="growthChart"></canvas>
|
||
</div>
|
||
</div> -->
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<!-- End Vendor dashboard section -->
|
||
|
||
<!-- Footer Start -->
|
||
<?php include "footer.php" ?>
|
||
<!-- Footer Area End -->
|
||
|
||
<!-- Modal -->
|
||
<div class="modal fade" id="ec_quickview_modal" tabindex="-1" role="dialog">
|
||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||
<div class="modal-content">
|
||
<button type="button" class="btn-close qty_close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||
<div class="modal-body">
|
||
<div class="row">
|
||
<div class="col-md-5 col-sm-12 col-xs-12">
|
||
<!-- 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="">
|
||
</div>
|
||
<div class="qty-slide">
|
||
<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="">
|
||
</div>
|
||
<div class="qty-slide">
|
||
<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="">
|
||
</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="">
|
||
</div>
|
||
<div class="qty-slide">
|
||
<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="">
|
||
</div>
|
||
<div class="qty-slide">
|
||
<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="">
|
||
</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>
|
||
<div class="ec-quickview-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-quickview-desc">Lorem Ipsum is simply dummy text of the printing and
|
||
typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever
|
||
since the 1500s,</div>
|
||
<div class="ec-quickview-price">
|
||
<span class="old-price">$100.00</span>
|
||
<span class="new-price">$80.00</span>
|
||
</div>
|
||
|
||
<div class="ec-pro-variation">
|
||
<div class="ec-pro-variation-inner ec-pro-variation-color">
|
||
<span>Color</span>
|
||
<div class="ec-pro-color">
|
||
<ul class="ec-opt-swatch">
|
||
<li><span style="background-color:#696d62;"></span></li>
|
||
<li><span style="background-color:#d73808;"></span></li>
|
||
<li><span style="background-color:#577023;"></span></li>
|
||
<li><span style="background-color:#2ea1cd;"></span></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
<div class="ec-pro-variation-inner ec-pro-variation-size ec-pro-size">
|
||
<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><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>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="ec-quickview-qty">
|
||
<div class="qty-plus-minus">
|
||
<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>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- Modal end -->
|
||
|
||
<!-- Footer navigation panel for responsive display -->
|
||
<div class="ec-nav-toolbar">
|
||
<div class="container">
|
||
<div class="ec-nav-panel">
|
||
<div class="ec-nav-panel-icons">
|
||
<a href="#ec-mobile-menu" class="navbar-toggler-btn ec-header-btn ec-side-toggle"><i
|
||
class="fi-rr-menu-burger"></i></a>
|
||
</div>
|
||
<div class="ec-nav-panel-icons">
|
||
<a href="#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>
|
||
</div>
|
||
<div class="ec-nav-panel-icons">
|
||
<a href="login.php" class="ec-header-btn"><i class="fi-rr-user"></i></a>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- Footer navigation panel for responsive display end -->
|
||
|
||
<!-- raymart remove popup feb 20 2024 -->
|
||
<!-- Recent Purchase Popup -->
|
||
<!-- <div class="recent-purchase">
|
||
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
|
||
<div class="detail">
|
||
<p>Someone in new just bought</p>
|
||
<h6>stylish baby shoes</h6>
|
||
<p>10 Minutes ago</p>
|
||
</div>
|
||
<a href="javascript:void(0)" class="icon-btn recent-close">×</a>
|
||
</div> -->
|
||
<!-- Recent Purchase Popup end -->
|
||
|
||
<!-- Cart Floating Button -->
|
||
<div class="ec-cart-float">
|
||
<a href="#ec-side-cart" class="ec-header-btn ec-side-toggle">
|
||
<div class="header-icon"><i class="fi-rr-shopping-basket"></i>
|
||
</div>
|
||
<span class="ec-cart-count cart-count-lable">3</span>
|
||
</a>
|
||
</div>
|
||
<!-- Cart Floating Button end -->
|
||
|
||
|
||
|
||
<!-- Feature tools -->
|
||
<div class="ec-tools-sidebar-overlay"></div>
|
||
<div class="ec-tools-sidebar">
|
||
<div class="tool-title">
|
||
<h3>Features</h3>
|
||
</div>
|
||
<a href="#" class="ec-tools-sidebar-toggle in-out">
|
||
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
|
||
</a>
|
||
<div class="ec-tools-detail">
|
||
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">
|
||
<h3>Color Scheme</h3>
|
||
<ul class="bg-panel">
|
||
<li class="active" data-color="01"><a href="#" class="colorcode1"></a></li>
|
||
<li data-color="02"><a href="#" class="colorcode2"></a></li>
|
||
<li data-color="03"><a href="#" class="colorcode3"></a></li>
|
||
<li data-color="04"><a href="#" class="colorcode4"></a></li>
|
||
<li data-color="05"><a href="#" class="colorcode5"></a></li>
|
||
</ul>
|
||
</div>
|
||
<div class="ec-tools-sidebar-content">
|
||
<h3>Backgrounds</h3>
|
||
<ul class="bg-panel">
|
||
<li class="bg"><a class="back-bg-1" id="bg-1">Background-1</a></li>
|
||
<li class="bg"><a class="back-bg-2" id="bg-2">Background-2</a></li>
|
||
<li class="bg"><a class="back-bg-3" id="bg-3">Background-3</a></li>
|
||
<li class="bg"><a class="back-bg-4" id="bg-4">Default</a></li>
|
||
</ul>
|
||
</div>
|
||
<div class="ec-tools-sidebar-content">
|
||
<h3>Full Screen mode</h3>
|
||
<div class="ec-fullscreen-mode">
|
||
<div class="ec-fullscreen-switch">
|
||
<div class="ec-fullscreen-btn">Mode</div>
|
||
<div class="ec-fullscreen-on">On</div>
|
||
<div class="ec-fullscreen-off">Off</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="ec-tools-sidebar-content">
|
||
<h3>Dark mode</h3>
|
||
<div class="ec-change-mode">
|
||
<div class="ec-mode-switch">
|
||
<div class="ec-mode-btn">Mode</div>
|
||
<div class="ec-mode-on">On</div>
|
||
<div class="ec-mode-off">Off</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="ec-tools-sidebar-content">
|
||
<h3>RTL mode</h3>
|
||
<div class="ec-change-rtl">
|
||
<div class="ec-rtl-switch">
|
||
<div class="ec-rtl-btn">Rtl</div>
|
||
<div class="ec-rtl-on">On</div>
|
||
<div class="ec-rtl-off">Off</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="ec-tools-sidebar-content">
|
||
<h3>Clear local storage</h3>
|
||
<a class="clear-cach" href="javascript:void(0)">Clear Cache & Default</a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- Feature tools end -->
|
||
|
||
<!-- Vendor JS -->
|
||
<script src="assets/js/vendor/jquery-3.5.1.min.js"></script>
|
||
<script src="assets/js/vendor/popper.min.js"></script>
|
||
<script src="assets/js/vendor/bootstrap.min.js"></script>
|
||
<script src="assets/js/vendor/jquery-migrate-3.3.0.min.js"></script>
|
||
<script src="assets/js/vendor/modernizr-3.11.2.min.js"></script>
|
||
<script src="https://cdn.metroui.org.ua/current/metro.js"></script>
|
||
<!--Plugins JS-->
|
||
<script src="assets/js/plugins/swiper-bundle.min.js"></script>
|
||
<script src="assets/js/plugins/nouislider.js"></script>
|
||
<script src="assets/js/plugins/countdownTimer.min.js"></script>
|
||
<script src="assets/js/plugins/scrollup.js"></script>
|
||
<script src="assets/js/plugins/jquery.zoom.min.js"></script>
|
||
<script src="assets/js/plugins/slick.min.js"></script>
|
||
<script src="assets/js/plugins/infiniteslidev2.js"></script>
|
||
<script src="assets/js/vendor/jquery.magnific-popup.min.js"></script>
|
||
<script src="assets/js/plugins/chart.min.js"></script>
|
||
<script src="assets/js/plugins/jquery.sticky-sidebar.js"></script>
|
||
|
||
<!-- Main Js -->
|
||
<script src="assets/js/chart-main.js"></script>
|
||
<script src="assets/js/main.js"></script>
|
||
|
||
</body>
|
||
|
||
</html>
|