Merge branch 'main' of https://code.obanana.io/Obanana.Corporation/obanana_b2b_test into louie_branch
This commit is contained in:
commit
c62160014f
|
@ -1,4 +1,14 @@
|
|||
<div class="ec-left-sidebar ec-bg-sidebar">
|
||||
<style>
|
||||
.sidenav-item.active {
|
||||
background-color: #f0f0f0; /* Change background color */
|
||||
}
|
||||
|
||||
.sidenav-item.active .nav-text {
|
||||
color: #333; /* Change text color */
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="ec-left-sidebar ec-bg-sidebar">
|
||||
<div id="sidebar" class="sidebar ec-sidebar-footer">
|
||||
|
||||
<div class="ec-brand">
|
||||
|
@ -22,7 +32,7 @@
|
|||
</li>
|
||||
|
||||
<!-- Vendors -->
|
||||
<li class="has-sub">
|
||||
<li>
|
||||
<a class="sidenav-item-link" href="vendor-card.php">
|
||||
<i class="mdi mdi-account-group-outline"></i>
|
||||
<span class="nav-text">Vendors</span>
|
||||
|
@ -50,7 +60,7 @@
|
|||
</li>
|
||||
|
||||
<!-- Users -->
|
||||
<li class="has-sub">
|
||||
<li >
|
||||
<a class="sidenav-item-link" href="user-card.php">
|
||||
<i class="mdi mdi-account-group"></i>
|
||||
<span class="nav-text">Users</span>
|
||||
|
@ -76,11 +86,10 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div> -->
|
||||
<hr>
|
||||
</li>
|
||||
|
||||
<!-- Category -->
|
||||
<li class="has-sub">
|
||||
<!-- <li class="has-sub">
|
||||
<a class="sidenav-item-link" href="javascript:void(0)">
|
||||
<i class="mdi mdi-dns-outline"></i>
|
||||
<span class="nav-text">Categories</span> <b class="caret"></b>
|
||||
|
@ -99,10 +108,10 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</li> -->
|
||||
|
||||
<!-- Products -->
|
||||
<li class="has-sub">
|
||||
<!-- <li class="has-sub">
|
||||
<a class="sidenav-item-link" href="product-grid.php">
|
||||
<i class="mdi mdi-palette-advanced"></i>
|
||||
<span class="nav-text">Products</span> <b class="caret"></b>
|
||||
|
@ -131,15 +140,15 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</li> -->
|
||||
|
||||
<!-- Orders -->
|
||||
<li class="has-sub">
|
||||
<a class="sidenav-item-link" href="javascript:void(0)">
|
||||
<li >
|
||||
<a class="sidenav-item-link" href="order-history.php">
|
||||
<i class="mdi mdi-cart"></i>
|
||||
<span class="nav-text">Orders</span> <b class="caret"></b>
|
||||
<span class="nav-text">Orders</span>
|
||||
</a>
|
||||
<div class="collapse">
|
||||
<!-- <div class="collapse">
|
||||
<ul class="sub-menu" id="orders" data-parent="#sidebar-menu">
|
||||
<li class="">
|
||||
<a class="sidenav-item-link" href="new-order.html">
|
||||
|
@ -162,28 +171,28 @@
|
|||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div> -->
|
||||
</li>
|
||||
|
||||
<!-- Reviews -->
|
||||
<li>
|
||||
<!-- <li>
|
||||
<a class="sidenav-item-link" href="review-list.html">
|
||||
<i class="mdi mdi-star-half"></i>
|
||||
<span class="nav-text">Reviews</span>
|
||||
</a>
|
||||
</li>
|
||||
</li> -->
|
||||
|
||||
<!-- Brands -->
|
||||
<li>
|
||||
<!-- <li>
|
||||
<a class="sidenav-item-link" href="brand-list.html">
|
||||
<i class="mdi mdi-tag-faces"></i>
|
||||
<span class="nav-text">Brands</span>
|
||||
</a>
|
||||
<hr>
|
||||
</li>
|
||||
</li> -->
|
||||
|
||||
<!-- Authentication -->
|
||||
<li class="has-sub">
|
||||
<!-- <li class="has-sub">
|
||||
<a class="sidenav-item-link" href="javascript:void(0)">
|
||||
<i class="mdi mdi-login"></i>
|
||||
<span class="nav-text">Authentication</span> <b class="caret"></b>
|
||||
|
@ -202,10 +211,10 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</li> -->
|
||||
|
||||
<!-- Icons -->
|
||||
<li class="has-sub">
|
||||
<!-- <li class="has-sub">
|
||||
<a class="sidenav-item-link" href="javascript:void(0)">
|
||||
<i class="mdi mdi-diamond-stone"></i>
|
||||
<span class="nav-text">Icons</span> <b class="caret"></b>
|
||||
|
@ -229,10 +238,10 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</li> -->
|
||||
|
||||
<!-- Other Pages -->
|
||||
<li class="has-sub">
|
||||
<!-- <li class="has-sub">
|
||||
<a class="sidenav-item-link" href="javascript:void(0)">
|
||||
<i class="mdi mdi-image-filter-none"></i>
|
||||
<span class="nav-text">Other Pages</span> <b class="caret"></b>
|
||||
|
@ -244,7 +253,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</li> -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -81,7 +81,7 @@ if ($_SESSION["isLoggedIn"] == true and $_SESSION["user_type"] == "admin"){
|
|||
<?php
|
||||
}
|
||||
?>
|
||||
<form action="../login_action.php" method="post">
|
||||
<form action="login_action_admin.php" method="post">
|
||||
<div class="mb-3 mt-3">
|
||||
<label for="email">Email:</label>
|
||||
<input type="email" class="form-control" id="email" placeholder="Enter email" name="name">
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
include "../functions.php";
|
||||
|
||||
$url = $_SESSION["url"];
|
||||
$_SESSION["email"] = $_POST["name"];
|
||||
$_SESSION["password"] = $_POST["password"];
|
||||
$result = login($_SESSION["email"],$_SESSION["password"]);
|
||||
|
||||
if ($result) {
|
||||
$_SESSION["token"] = $result;
|
||||
$result = profile($_SESSION["token"]);
|
||||
$_SESSION["userId"] = $result["profile"]["userId"];
|
||||
$_SESSION["user_type"] = $result["user_type"];
|
||||
$result = customerExists($_SESSION["email"]);
|
||||
if ($result > 0) {
|
||||
$_SESSION["isCustomer"] = true;
|
||||
}
|
||||
$result = vendorExists($_SESSION["email"]);
|
||||
if ($result > 0) {
|
||||
$_SESSION["isVendor"] = true;
|
||||
}
|
||||
header("location: index.php");
|
||||
} else {
|
||||
// $_SESSION["loginError"] = "Invalid email or password. Please try again.";
|
||||
header("location: login.php?error=1");
|
||||
}
|
||||
|
||||
|
||||
// $_SESSION["token"] = $result;
|
||||
// $result = profile($_SESSION["token"]);
|
||||
// $_SESSION["userId"] = $result["profile"]["userId"];
|
||||
// $result = customerExists($_SESSION["email"]);
|
||||
// if($result>0){
|
||||
// $_SESSION["isCustomer"] = true;
|
||||
// }
|
||||
// $result = vendorExists($_SESSION["email"]);
|
||||
// if($result>0){
|
||||
// $_SESSION["isVendor"] = true;
|
||||
// }
|
||||
// header("location: $url")
|
||||
?>
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
include "../functions.php";
|
||||
|
||||
$token = loginRenew($_SESSION["email"], $_SESSION["password"], $_SESSION["token"]);
|
||||
$_SESSION["token"] = $token;
|
||||
|
||||
header("Location: vendor-profile.php");
|
||||
exit;
|
||||
|
||||
?>
|
|
@ -65,21 +65,20 @@ foreach ($vendorPayouts as $payout) {
|
|||
}
|
||||
}
|
||||
|
||||
$token = $_SESSION["token"];
|
||||
if (isset($_SESSION["token"])) {
|
||||
$token = $_SESSION["token"];
|
||||
$token_parts = explode(".", $token);
|
||||
$token_payload = base64_decode($token_parts[1]);
|
||||
$token_data = json_decode($token_payload);
|
||||
|
||||
$token_parts = explode(".", $token);
|
||||
$token_payload = base64_decode($token_parts[1]);
|
||||
$token_data = json_decode($token_payload);
|
||||
$issued_at_time = $token_data->iat;
|
||||
$expiration_time = $token_data->exp;
|
||||
$renewal_time = $issued_at_time + 3300;
|
||||
|
||||
$expiration_time = $token_data->exp;
|
||||
$issued_at_time = $token_data->iat;
|
||||
|
||||
$renewal_time = $issued_at_time + 3300;
|
||||
|
||||
|
||||
if (time() >= $renewal_time) {
|
||||
$token = loginRenew($_SESSION["email"], $_SESSION["password"], $token);
|
||||
$_SESSION["token"] = $token;
|
||||
if (time() >= $renewal_time || time() >= $expiration_time) {
|
||||
header("Location: token-renew.php");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
// $token = loginRenew($_SESSION["email"], $_SESSION["password"], $token);
|
||||
// $_SESSION["token"] = $token;
|
||||
|
@ -115,6 +114,23 @@ if (time() >= $renewal_time) {
|
|||
<!-- FAVICON -->
|
||||
<link href="assets/img/favicon.png" rel="shortcut icon" />
|
||||
|
||||
<script>
|
||||
function renewToken() {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", "token-renew.php", true);
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
setInterval(function() {
|
||||
var currentTime = <?php echo time(); ?>;
|
||||
var renewalTime = <?php echo $renewal_time; ?>;
|
||||
var expirationTime = <?php echo $expiration_time; ?>;
|
||||
|
||||
if (currentTime >= renewalTime || currentTime >= expirationTime) {
|
||||
renewToken();
|
||||
}
|
||||
}, 60000);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="ec-header-fixed ec-sidebar-fixed ec-sidebar-dark ec-header-light" id="body">
|
||||
|
|
|
@ -226,9 +226,13 @@ 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>
|
||||
</h5> -->
|
||||
</div>
|
||||
<div class="sContact">
|
||||
<h5>Contact #:
|
||||
|
@ -269,7 +273,7 @@ if (isset($customer_data[0]["address"]) && is_array($customer_data[0]["address"]
|
|||
<div class="form-check" id="form-check-<?php echo $address_index ?>">
|
||||
<input type="radio" class="form-check-input" name="selectedAddress" id="address_<?php echo $customer_index; ?>_<?php echo $address_index; ?>" value="<?php echo $customer_index; ?>_<?php echo $address_index; ?>">
|
||||
<label class="form-check-label" style="max-width: 80%; word-wrap: break-word;" for="address_<?php echo $customer_index; ?>_<?php echo $address_index; ?>">
|
||||
<?php echo $address['first_name']; ?> <?php echo $address['last_name']; ?><br>
|
||||
<?php echo strtoupper($address['first_name']); ?> <?php echo strtoupper($address['last_name']); ?><br>
|
||||
<?php echo $address['address_1']; ?> <?php echo $address['address_2']; ?>
|
||||
<?php echo $address['barangay']; ?>, <?php echo $address['city']; ?>,
|
||||
<?php echo $address['province']; ?> <?php echo $address['country']; ?><br>
|
||||
|
|
|
@ -291,7 +291,7 @@
|
|||
<!-- Footer navigation panel for responsive display end -->
|
||||
|
||||
<!-- Recent Purchase Popup -->
|
||||
<div class="recent-purchase">
|
||||
<!-- <div class="recent-purchase">
|
||||
<img src="assets/images/product-image/1.jpg" alt="payment image">
|
||||
<div class="detail">
|
||||
<p>Someone in new just bought</p>
|
||||
|
@ -299,7 +299,7 @@
|
|||
<p>10 Minutes ago</p>
|
||||
</div>
|
||||
<a href="javascript:void(0)" class="icon-btn recent-close">×</a>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- Recent Purchase Popup end -->
|
||||
|
||||
<!-- Cart Floating Button -->
|
||||
|
|
32
faq.php
32
faq.php
|
@ -1,4 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
@ -168,23 +168,23 @@
|
|||
<div class="col-md-12 ec-cms-block ec-abcms-block text-center">
|
||||
<div class="ec-cms-block-inner">
|
||||
<h3 class="ec-cms-block-title">What is Obanana Corporation's B2B eCommerce platform?</h3>
|
||||
<p>Obanana Corporation's B2B eCommerce platform is an online marketplace designed to connect businesses worldwide, facilitating trade between buyers and sellers.</p>
|
||||
<p>Obanana Corporation's B2B eCommerce platform is an online marketplace designed to connect businesses worldwide, facilitating trade between buyers and sellers.</p><br>
|
||||
<h3 class="ec-cms-block-title">What kind of products can be found on the Obanana Corporation platform?</h3>
|
||||
<p>Our platform offers a diverse range of products across various industries, including but not limited to electronics, clothing, machinery, raw materials, and more, catering to the needs of businesses across different sectors.</p>
|
||||
<p>Our platform offers a diverse range of products across various industries, including but not limited to electronics, clothing, machinery, raw materials, and more, catering to the needs of businesses across different sectors.</p><br>
|
||||
<h3 class="ec-cms-block-title">How does the platform ensure the quality of products listed?</h3>
|
||||
<p>To ensure quality standards, we implement rigorous verification processes for both sellers and products. We encourage buyers to provide feedback and ratings based on their experience, fostering transparency and trust within our marketplace.</p>
|
||||
<p>To ensure quality standards, we implement rigorous verification processes for both sellers and products. We encourage buyers to provide feedback and ratings based on their experience, fostering transparency and trust within our marketplace.</p><br>
|
||||
<h3 class="ec-cms-block-title">What are the payment options available on the Obanana Corporation platform?</h3>
|
||||
<p>We offer a variety of secure payment options to accommodate the needs of our users, including bank transfers, credit/debit cards, and third-party payment gateways, ensuring smooth and secure transactions.</p>
|
||||
<p>We offer a variety of secure payment options to accommodate the needs of our users, including bank transfers, credit/debit cards, and third-party payment gateways, ensuring smooth and secure transactions.</p><br>
|
||||
<h3 class="ec-cms-block-title">Can buyers and sellers communicate directly on the platform?</h3>
|
||||
<p>Yes, our platform facilitates direct communication between buyers and sellers through messaging features and inquiry forms, allowing for seamless negotiation and collaboration.</p>
|
||||
<p>Yes, our platform facilitates direct communication between buyers and sellers through messaging features and inquiry forms, allowing for seamless negotiation and collaboration.</p><br>
|
||||
<h3 class="ec-cms-block-title">How does shipping and logistics work on the Obanana Corporation platform?</h3>
|
||||
<p>We provide comprehensive shipping and logistics solutions, including freight forwarding services and shipping partners, to ensure efficient and timely delivery of goods to buyers worldwide.</p>
|
||||
<p>We provide comprehensive shipping and logistics solutions, including freight forwarding services and shipping partners, to ensure efficient and timely delivery of goods to buyers worldwide.</p><br>
|
||||
<h3 class="ec-cms-block-title">Are there any minimum order requirements for purchasing on the platform?</h3>
|
||||
<p>Minimum order requirements may vary depending on the seller and product category. Buyers can find detailed information regarding minimum order quantities on product listings.</p>
|
||||
<p>Minimum order requirements may vary depending on the seller and product category. Buyers can find detailed information regarding minimum order quantities on product listings.</p><br>
|
||||
<h3 class="ec-cms-block-title">Does Obanana Corporation offer any trade assurance or buyer protection services?</h3>
|
||||
<p>Yes, we provide trade assurance services to protect buyers' interests, offering refunds or replacements for orders that do not meet agreed-upon quality standards or fail to arrive within specified delivery times.</p>
|
||||
<p>Yes, we provide trade assurance services to protect buyers' interests, offering refunds or replacements for orders that do not meet agreed-upon quality standards or fail to arrive within specified delivery times.</p><br>
|
||||
<h3 class="ec-cms-block-title">How does Obanana Corporation handle disputes between buyers and sellers?</h3>
|
||||
<p>In the event of disputes, our dedicated support team mediates and facilitates resolution through our dispute resolution process, ensuring fair outcomes for all parties involved.</p>
|
||||
<p>In the event of disputes, our dedicated support team mediates and facilitates resolution through our dispute resolution process, ensuring fair outcomes for all parties involved.</p><br>
|
||||
<h3 class="ec-cms-block-title">How can businesses join the Obanana Corporation platform as sellers?</h3>
|
||||
<p>Businesses interested in becoming sellers on our platform can apply for membership through our website, where they will undergo a verification process to ensure compliance with our standards and policies.</p>
|
||||
</div>
|
||||
|
@ -196,7 +196,7 @@
|
|||
</section>
|
||||
|
||||
<!-- ec testmonial Start -->
|
||||
<section class="section ec-test-section section-space-ptb-100 section-space-m" id="reviews">
|
||||
<!-- <section class="section ec-test-section section-space-ptb-100 section-space-m" id="reviews">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-center">
|
||||
|
@ -283,11 +283,11 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section> -->
|
||||
<!-- ec testmonial end -->
|
||||
|
||||
<!-- services Section Start -->
|
||||
<section class="section ec-services-section section-space-p" id="services">
|
||||
<!-- <section class="section ec-services-section section-space-p" id="services">
|
||||
<h2 class="d-none">Services</h2>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
@ -337,7 +337,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section> -->
|
||||
<!--services Section End -->
|
||||
|
||||
<!-- Ec Instagram Start -->
|
||||
|
@ -450,7 +450,7 @@
|
|||
<!-- Footer navigation panel for responsive display end -->
|
||||
|
||||
<!-- Recent Purchase Popup -->
|
||||
<div class="recent-purchase">
|
||||
<!-- <div class="recent-purchase">
|
||||
<img src="assets/images/product-image/1.jpg" alt="payment image">
|
||||
<div class="detail">
|
||||
<p>Someone in new just bought</p>
|
||||
|
@ -458,7 +458,7 @@
|
|||
<p>10 Minutes ago</p>
|
||||
</div>
|
||||
<a href="javascript:void(0)" class="icon-btn recent-close">×</a>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- Recent Purchase Popup end -->
|
||||
|
||||
<!-- Cart Floating Button -->
|
||||
|
|
|
@ -288,7 +288,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
</a>
|
||||
<!-- Header Cart End -->
|
||||
<!-- Header Cart Start -->
|
||||
<a href="#ec-side-cart" class="ec-header-btn ec-side-toggle">
|
||||
<a href="cart.php" class="ec-header-btn ec-header-wishlist">
|
||||
<div class="header-icon"><i class="fi-rr-shopping-bag"></i></div>
|
||||
<span class="ec-header-count cart-count-lable">0</span>
|
||||
</a>
|
||||
|
@ -297,9 +297,9 @@ if ($_SESSION["userId"] <> "") {
|
|||
<i class="fi fi-rr-apps"></i>
|
||||
</a>
|
||||
<!-- Header menu Start -->
|
||||
<a href="#ec-mobile-menu" class="ec-header-btn ec-side-toggle d-lg-none">
|
||||
<!-- <a href="#ec-mobile-menu" class="ec-header-btn ec-side-toggle d-lg-none">
|
||||
<i class="fi fi-rr-menu-burger"></i>
|
||||
</a>
|
||||
</a> -->
|
||||
<!-- Header menu End -->
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
if ($result > 0) {
|
||||
$_SESSION["isVendor"] = true;
|
||||
}
|
||||
header("location: $url");
|
||||
header("location: index.php");
|
||||
} else {
|
||||
// $_SESSION["loginError"] = "Invalid email or password. Please try again.";
|
||||
header("location: login.php?error=1");
|
||||
|
|
|
@ -215,7 +215,8 @@ if (isset($_GET['id'])) {
|
|||
right: 15px;
|
||||
bottom: 0;
|
||||
border-radius: 0 0 10px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
/* 02-21-2024 Stacy added css for addtocart & wishlist */
|
||||
</style>
|
||||
</head>
|
||||
|
@ -276,17 +277,17 @@ if (isset($_GET['id'])) {
|
|||
<div class="single-pro-inner">
|
||||
<!-- 02-20-2024 Stacy message sent pop-up -->
|
||||
<?php
|
||||
if (isset($_SESSION["SuccessfullySent"])) {
|
||||
echo '<div class="alert alert-success" id="alertSuccess" role="alert"; content-align:center;>';
|
||||
echo $_SESSION["SuccessfullySent"];
|
||||
echo '</div>';
|
||||
unset($_SESSION["SuccessfullySent"]);
|
||||
echo " <script>
|
||||
if (isset($_SESSION["SuccessfullySent"])) {
|
||||
echo '<div class="alert alert-success" id="alertSuccess" role="alert"; content-align:center;>';
|
||||
echo $_SESSION["SuccessfullySent"];
|
||||
echo '</div>';
|
||||
unset($_SESSION["SuccessfullySent"]);
|
||||
echo " <script>
|
||||
setTimeout(function() {
|
||||
document.getElementById('alertSuccess').style.display = 'none';
|
||||
}, 10000);
|
||||
</script>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!-- 02-20-2024 Stacy message sent pop-up -->
|
||||
<div class="row">
|
||||
|
@ -325,7 +326,8 @@ if (isset($_GET['id'])) {
|
|||
$productImage = $i;
|
||||
}
|
||||
?>
|
||||
<!-- <img class="img-responsive" src="<?php #echo $productImage; ?>" alt="" style="width: 100%; height: 100%; object-fit: cover; object-position: center center;"> -->
|
||||
<!-- <img class="img-responsive" src="<?php #echo $productImage;
|
||||
?>" alt="" style="width: 100%; height: 100%; object-fit: cover; object-position: center center;"> -->
|
||||
<!-- 02-26-2024 Stacy updated img width & height -->
|
||||
<img class="img-responsive" src="<?php echo $productImage; ?>" alt="" style="max/width: 90px; height: 120px; object-fit: cover; object-position: center center;">
|
||||
</div>
|
||||
|
@ -378,16 +380,16 @@ if (isset($_GET['id'])) {
|
|||
<div class="ec-single-price">
|
||||
<span class="ec-single-ps-title">As low as</span>
|
||||
<?php
|
||||
// 02-13-24 Jun Jihad Removed Logic to DIsplay Price Range of Variable Products
|
||||
if (isset($product_details['sale_price']) && $product_details['sale_price'] > 0) {
|
||||
echo '<s><span id="productPrice" class="old-price">' . $product_details['regular_price'] . '</span></s>';
|
||||
echo '<span id="productNewPrice" class="new-price">' . $product_details['sale_price'] . '</span>';
|
||||
} elseif (!isset($product_details['regular_price']) || $product_details['regular_price'] <= 0) {
|
||||
echo '<span id="productPrice" class="new-price">Contact Seller for Price</span>';
|
||||
} else {
|
||||
echo '<span id="productPrice" class="new-price">' . $product_details['regular_price'] . '</span>';
|
||||
}
|
||||
// 02-13-24 Jun Jihad Removed Logic to DIsplay Price Range of Variable Products
|
||||
// 02-13-24 Jun Jihad Removed Logic to DIsplay Price Range of Variable Products
|
||||
if (isset($product_details['sale_price']) && $product_details['sale_price'] > 0) {
|
||||
echo '<s><span id="productPrice" class="old-price">' . $product_details['regular_price'] . '</span></s>';
|
||||
echo '<span id="productNewPrice" class="new-price">' . $product_details['sale_price'] . '</span>';
|
||||
} elseif (!isset($product_details['regular_price']) || $product_details['regular_price'] <= 0) {
|
||||
echo '<span id="productPrice" class="new-price">Contact Seller for Price</span>';
|
||||
} else {
|
||||
echo '<span id="productPrice" class="new-price">' . $product_details['regular_price'] . '</span>';
|
||||
}
|
||||
// 02-13-24 Jun Jihad Removed Logic to DIsplay Price Range of Variable Products
|
||||
?>
|
||||
</div>
|
||||
<div class="ec-single-stoke">
|
||||
|
@ -396,7 +398,7 @@ if (isset($_GET['id'])) {
|
|||
|
||||
</div>
|
||||
</div>
|
||||
<!-- 20240212 Jun Jihad Include Parent Product in the Variation Selection -->
|
||||
<!-- 20240212 Jun Jihad Include Parent Product in the Variation Selection -->
|
||||
<?php
|
||||
if (isset($variation_details) && is_array($variation_details)) {
|
||||
?>
|
||||
|
@ -405,7 +407,7 @@ if (isset($_GET['id'])) {
|
|||
<span>VARIATION</span>
|
||||
<div class="ec-pro-variation-content">
|
||||
<ul class="eccart-pro-items">
|
||||
<?php
|
||||
<?php
|
||||
$main_product_image = isset($product_details["product_image"]) ? $product_details["product_image"] : 'https://upload.wikimedia.org/wikipedia/commons/6/65/No-Image-Placeholder.svg';
|
||||
?>
|
||||
<a href="javascript:void(0);" onclick="selectVariation(<?php echo htmlspecialchars(json_encode($product_details), ENT_QUOTES, 'UTF-8'); ?>)">
|
||||
|
@ -478,29 +480,30 @@ if (isset($_GET['id'])) {
|
|||
|
||||
<div class="qty-plus-minuses" style="display:flex; overflow:visible;">
|
||||
<!-- <div class="qty-btn" style="color:#ffaa00; font-size:35px; padding-right:5px; cursor: pointer;" onclick="decrement()">-</div>
|
||||
<input class="qty-inputs" style="width:100px; height:40px" type="number" name="ec_qtybtn" value="<?php #echo (!empty($product_details['minimum_order'])) ? $product_details['minimum_order'] : "1"; ?>" id="qty-input" />
|
||||
<input class="qty-inputs" style="width:100px; height:40px" type="number" name="ec_qtybtn" value="<?php #echo (!empty($product_details['minimum_order'])) ? $product_details['minimum_order'] : "1";
|
||||
?>" id="qty-input" />
|
||||
<div class="qty-btn" style="color:#ffaa00; font-size:25px; padding-left:5px; cursor: pointer;" onclick="increment()">+</div> -->
|
||||
|
||||
|
||||
<div class="ec-single-cart" style="display:flex; flex-direction:row; width:80%; overflow:visible; text-align:center; align-items:center; ">
|
||||
<!-- 02-13-24 Jun Jihad Contact Seller will appear to Variable products with no price -->
|
||||
<?php
|
||||
<!-- 02-13-24 Jun Jihad Contact Seller will appear to Variable products with no price -->
|
||||
<?php
|
||||
if ($_SESSION["isLoggedIn"]) {
|
||||
if ($product_details['product_type'] === "variable") {
|
||||
echo '<div class="qty-btn" style="color:#ffaa00; font-size:35px; padding-right:5px; cursor: pointer;" onclick="decrement()">-</div>';
|
||||
echo '<input class="qty-inputs" style="width:110px; height:40px" type="number" name="ec_qtybtn" value="';
|
||||
echo (!empty($product_details['minimum_order'])) ? $product_details['minimum_order'] : "1";
|
||||
echo (!empty($product_details['minimum_order'])) ? $product_details['minimum_order'] : "1";
|
||||
echo '" id="qty-input" />';
|
||||
echo '<div class="qty-btn" style="color:#ffaa00; font-size:25px; padding-left:5px; cursor: pointer;" onclick="increment()">+</div>';
|
||||
echo '<div style="display:flex; margin-left:45px;"><button type="button" class="btn btn-primary" id="contactSellerButton" style="background:#ffaa00; width:190px;" data-bs-toggle="modal" data-bs-target="#priceModal"><i class="fi-rr-envelope" style="font-size:20px; margin-bottom:-3px; margin-right:10px;"></i>Contact Seller</button>';
|
||||
echo '<button class="btn btn-primary" id="addToCartButton" style="display:none">Add To Cart</button>';
|
||||
echo '<div class="ec-single-wishlist">
|
||||
<a class="ec-btn-group wishlist" title="Wishlist" onclick="wishlist()"><i class="fi fi-rr-heart" style="color:#B80F0A; font-size:20px;"></i></a>
|
||||
</div></div>';
|
||||
|
||||
} else {
|
||||
if (!empty($product_details['regular_price']) || !empty($product_details['sale_price'])) {
|
||||
echo '<div class="qty-btn" style="color:#ffaa00; font-size:35px; padding-right:5px; cursor: pointer;" onclick="decrement()">-</div>';
|
||||
echo '<input class="qty-inputs" style="width:100px; height:40px" type="number" name="ec_qtybtn" value="';
|
||||
echo (!empty($product_details['minimum_order'])) ? $product_details['minimum_order'] : "1";
|
||||
echo (!empty($product_details['minimum_order'])) ? $product_details['minimum_order'] : "1";
|
||||
echo '" id="qty-input" />';
|
||||
echo '<div class="qty-btn" style="color:#ffaa00; font-size:25px; padding-left:5px; cursor: pointer;" onclick="increment()">+</div>';
|
||||
// echo '<div id="addToCartMessage" style="border:1px solid red;"></div>';
|
||||
|
@ -516,30 +519,30 @@ if (isset($_GET['id'])) {
|
|||
echo '<div class="login-button" style=""><p style="color:red; text-wrap:nowrap;">Please log in to your account.</p>';
|
||||
echo '<a href="login.php" style="margin-left:-2px;"><button type="button" class="btn btn-primary" style="margin-left:-2px; margin-top:-20px; background:#ffaa00; border-radius:10px; letter-spacing:1px;" data-bs-toggle="modal">LOGIN</button></a></div>';
|
||||
}
|
||||
?>
|
||||
<!-- <div class="ec-single-wishlist" style="border: 1px solid yellow;">
|
||||
?>
|
||||
<!-- <div class="ec-single-wishlist" style="border: 1px solid yellow;">
|
||||
<a class="ec-btn-group wishlist" style="padding-left:40px;" title="Wishlist" onclick="wishlist()"><i class="fi fi-rr-heart"></i></a>
|
||||
</div> -->
|
||||
<!-- 02-22-2024 Stacy modified this block of code -->
|
||||
|
||||
<!-- 02-13-24 Jun Jihad Contact Seller will appear to Variable products with no price -->
|
||||
<!-- 02-22-2024 Stacy modified this block of code -->
|
||||
|
||||
<!-- 02-13-24 Jun Jihad Contact Seller will appear to Variable products with no price -->
|
||||
|
||||
|
||||
<!-- <?php
|
||||
// if ($_SESSION["isLoggedIn"]) {
|
||||
// if ($product_details['product_type'] === "variable") {
|
||||
// echo '<button class="btn btn-primary" id="addToCartButton" disabled>Add To Cart</button>';
|
||||
// echo '<button type="button" class="btn btn-primary" id="contactSellerButton" style="display:none" data-bs-toggle="modal" data-bs-target="#priceModal">Contact seller</button>';
|
||||
// } elseif ($product_details['regular_price'] && $product_details['regular_price'] !== "") {
|
||||
// echo '<div id="addToCartMessage"></div>';
|
||||
// echo '<button class="btn btn-primary" id="addToCartButton">Add To Cart</button>';
|
||||
// } else {
|
||||
// echo '<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#priceModal">Contact seller</button>';
|
||||
// }
|
||||
// } else {
|
||||
// echo '<p>Please log in to add to cart.</p>';
|
||||
// }
|
||||
?> -->
|
||||
<!-- <?php
|
||||
// if ($_SESSION["isLoggedIn"]) {
|
||||
// if ($product_details['product_type'] === "variable") {
|
||||
// echo '<button class="btn btn-primary" id="addToCartButton" disabled>Add To Cart</button>';
|
||||
// echo '<button type="button" class="btn btn-primary" id="contactSellerButton" style="display:none" data-bs-toggle="modal" data-bs-target="#priceModal">Contact seller</button>';
|
||||
// } elseif ($product_details['regular_price'] && $product_details['regular_price'] !== "") {
|
||||
// echo '<div id="addToCartMessage"></div>';
|
||||
// echo '<button class="btn btn-primary" id="addToCartButton">Add To Cart</button>';
|
||||
// } else {
|
||||
// echo '<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#priceModal">Contact seller</button>';
|
||||
// }
|
||||
// } else {
|
||||
// echo '<p>Please log in to add to cart.</p>';
|
||||
// }
|
||||
?> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -594,10 +597,10 @@ if (isset($_GET['id'])) {
|
|||
<form action="contact-seller-action.php" method="post">
|
||||
<label for="">Enter product details such as color,size,materials,etc. and other specification requirements to receive an accurate quote</label>
|
||||
<textarea name="message" id="" cols="30" rows="5"></textarea>
|
||||
<input name="product_name" type="hidden" value='<?php echo $product_details['product_name']; ?>'/>
|
||||
<input name="product_name" type="hidden" value='<?php echo $product_details['product_name']; ?>' />
|
||||
<input class="qty-inputs" type="hidden" name="product_quantityf" value="<?php echo (!empty($product_details['minimum_order'])) ? $product_details['minimum_order'] : "1"; ?>" id="qty-input" min="<?php echo (!empty($product_details['minimum_order'])) ? $product_details['minimum_order'] : "1"; ?>" />
|
||||
|
||||
<input name="product_id" type="hidden" value='<?php echo $product_details['_id']; ?>'/>
|
||||
<input name="product_id" type="hidden" value='<?php echo $product_details['_id']; ?>' />
|
||||
|
||||
<!-- <input name="product_quantity" type="number"/> -->
|
||||
<div class="modal-footer">
|
||||
|
@ -774,11 +777,29 @@ if (isset($_GET['id'])) {
|
|||
// April 3, 2024 Jun Jihad 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++) {
|
||||
// if (quantityValue <= parseInt(priceMatrix[i][j].quantity)) {
|
||||
// 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++) {
|
||||
if (quantityValue <= parseInt(priceMatrix[i][j].quantity)) {
|
||||
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;
|
||||
|
@ -789,10 +810,11 @@ if (isset($_GET['id'])) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!foundPrice) {
|
||||
productPrice = parseFloat(document.getElementById("productNewPrice") ? document.getElementById("productNewPrice").innerText : document.getElementById("productPrice").innerText);
|
||||
}
|
||||
}
|
||||
var productData = {
|
||||
product: {
|
||||
product_image: document.getElementById("mainProductImage").getAttribute('src'),
|
||||
|
@ -865,7 +887,7 @@ if (isset($_GET['id'])) {
|
|||
shipping_fee: shippingFee,
|
||||
};
|
||||
|
||||
console.log("Request data:", requestData);
|
||||
console.log("Request data:", requestData);
|
||||
// const token = '<?php echo $_SESSION["token"] ?>';
|
||||
xhr.open("POST", "https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders", true);
|
||||
xhr.setRequestHeader("Content-Type", "application/json", );
|
||||
|
@ -875,7 +897,7 @@ if (isset($_GET['id'])) {
|
|||
if (xhr.status === 201) {
|
||||
var response = JSON.parse(xhr.responseText);
|
||||
|
||||
console.log("Response:", response);
|
||||
console.log("Response:", response);
|
||||
|
||||
// Update the cart dynamically
|
||||
var cartList = document.querySelector(".eccart-pro-items");
|
||||
|
@ -945,24 +967,24 @@ if (isset($_GET['id'])) {
|
|||
}
|
||||
|
||||
function updateOrder(orderId, existingItemId) {
|
||||
var updateOrderXhr = new XMLHttpRequest();
|
||||
// const token = '<?php echo $_SESSION["token"] ?>';
|
||||
updateOrderXhr.open("PUT", `https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/${orderId}/items/${existingItemId}`, true);
|
||||
updateOrderXhr.setRequestHeader("Content-Type", "application/json");
|
||||
updateOrderXhr.setRequestHeader("Authorization", "Bearer " + token);
|
||||
updateOrderXhr.onreadystatechange = function() {
|
||||
if (updateOrderXhr.readyState === 4) {
|
||||
if (updateOrderXhr.status === 200) {
|
||||
var response = JSON.parse(updateOrderXhr.responseText);
|
||||
console.log("Order updated:", response);
|
||||
var updateOrderXhr = new XMLHttpRequest();
|
||||
// const token = '<?php echo $_SESSION["token"] ?>';
|
||||
updateOrderXhr.open("PUT", `https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/${orderId}/items/${existingItemId}`, true);
|
||||
updateOrderXhr.setRequestHeader("Content-Type", "application/json");
|
||||
updateOrderXhr.setRequestHeader("Authorization", "Bearer " + token);
|
||||
updateOrderXhr.onreadystatechange = function() {
|
||||
if (updateOrderXhr.readyState === 4) {
|
||||
if (updateOrderXhr.status === 200) {
|
||||
var response = JSON.parse(updateOrderXhr.responseText);
|
||||
console.log("Order updated:", response);
|
||||
|
||||
var cartItem = document.getElementById(`order_${response._id}`);
|
||||
var cartItem = document.getElementById(`order_${response._id}`);
|
||||
|
||||
if (cartItem) {
|
||||
var updatedQuantity = response.items[0].quantity;
|
||||
var totalAmount = response.items[0].price * updatedQuantity;
|
||||
// If the cart item already exists, update its content using innerHTML
|
||||
cartItem.innerHTML = `
|
||||
if (cartItem) {
|
||||
var updatedQuantity = response.items[0].quantity;
|
||||
var totalAmount = response.items[0].price * updatedQuantity;
|
||||
// If the cart item already exists, update its content using innerHTML
|
||||
cartItem.innerHTML = `
|
||||
<a href="shop-left-sidebar-col-4.php" class="sidekka_pro_img">
|
||||
<img src="${response.items[0].product.product_image}" alt="product">
|
||||
</a>
|
||||
|
@ -980,74 +1002,73 @@ if (isset($_GET['id'])) {
|
|||
<a href="#" class="removeCart" onclick="deleteOrder('${response._id}')">x</a>
|
||||
</div>
|
||||
`;
|
||||
document.getElementById(`qty-input-${response.items[0]._id}`).value = updatedQuantity;
|
||||
} else {
|
||||
// If the cart item doesn't exist, create a new one
|
||||
console.log("Error updating order:", updateOrderXhr.responseText);
|
||||
}
|
||||
document.getElementById(`qty-input-${response.items[0]._id}`).value = updatedQuantity;
|
||||
} else {
|
||||
// If the cart item doesn't exist, create a new one
|
||||
console.log("Error updating order:", updateOrderXhr.responseText);
|
||||
}
|
||||
|
||||
getLatestOrders();
|
||||
updateCartItemCount();
|
||||
document.getElementById("addToCartMessage").innerText = "Product added to cart!";
|
||||
setTimeout(function() {
|
||||
document.getElementById("addToCartMessage").innerText = "";
|
||||
}, 1000);
|
||||
} else {
|
||||
// Handle error response from the server
|
||||
console.log("Error response from the server");
|
||||
console.log(xhr.responseText); // Log the server's response
|
||||
}
|
||||
}
|
||||
};
|
||||
var existingQuantity = parseInt(existingOrder.items[0].quantity, 10);
|
||||
var newQuantity = parseInt(quantityValue, 10);
|
||||
var updatedQuantity = existingQuantity + newQuantity;
|
||||
getLatestOrders();
|
||||
updateCartItemCount();
|
||||
document.getElementById("addToCartMessage").innerText = "Product added to cart!";
|
||||
setTimeout(function() {
|
||||
document.getElementById("addToCartMessage").innerText = "";
|
||||
}, 1000);
|
||||
} else {
|
||||
// Handle error response from the server
|
||||
console.log("Error response from the server");
|
||||
console.log(xhr.responseText); // Log the server's response
|
||||
}
|
||||
}
|
||||
};
|
||||
var existingQuantity = parseInt(existingOrder.items[0].quantity, 10);
|
||||
var newQuantity = parseInt(quantityValue, 10);
|
||||
var updatedQuantity = existingQuantity + newQuantity;
|
||||
|
||||
// Check if the updated quantity exceeds the previous price matrix
|
||||
var newProductPrice = productPrice; // Assume the initial 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++) {
|
||||
if (updatedQuantity <= parseInt(priceMatrix[i][j].quantity)) {
|
||||
newProductPrice = parseFloat(priceMatrix[i][j].price);
|
||||
foundNewPrice = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (foundNewPrice) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update product price if a new price is found in the price matrix
|
||||
if (foundNewPrice) {
|
||||
productPrice = newProductPrice;
|
||||
}
|
||||
if (foundNewPrice) {
|
||||
productPrice = newProductPrice;
|
||||
}
|
||||
|
||||
var updateData = {
|
||||
quantity: updatedQuantity,
|
||||
price: productPrice // Update the price for the item
|
||||
};
|
||||
var updateData = {
|
||||
quantity: updatedQuantity,
|
||||
price: productPrice // Update the price for the item
|
||||
};
|
||||
|
||||
updateOrderXhr.send(JSON.stringify(updateData));
|
||||
updateOrderXhr.send(JSON.stringify(updateData));
|
||||
|
||||
var patchTotalAmountXhr = new XMLHttpRequest();
|
||||
patchTotalAmountXhr.open("PATCH", `https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/${orderId}`, true);
|
||||
patchTotalAmountXhr.setRequestHeader("Content-Type", "application/json");
|
||||
patchTotalAmountXhr.setRequestHeader("Authorization", "Bearer " + token);
|
||||
// Patch the total amount of the order with the updated price and quantity
|
||||
var patchTotalAmountXhr = new XMLHttpRequest();
|
||||
patchTotalAmountXhr.open("PATCH", `https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/orders/${orderId}`, true);
|
||||
patchTotalAmountXhr.setRequestHeader("Content-Type", "application/json");
|
||||
patchTotalAmountXhr.setRequestHeader("Authorization", "Bearer " + token);
|
||||
|
||||
var originalPrice = document.getElementById("productPrice").innerText;
|
||||
var totalAmount = originalPrice * updatedQuantity;
|
||||
console.log(originalPrice);
|
||||
console.log(totalAmount);
|
||||
var patchData = {
|
||||
total_amount: totalAmount
|
||||
};
|
||||
var totalAmount = productPrice * updatedQuantity;
|
||||
var patchData = {
|
||||
total_amount: totalAmount
|
||||
};
|
||||
|
||||
patchTotalAmountXhr.send(JSON.stringify(patchData));
|
||||
}
|
||||
patchTotalAmountXhr.send(JSON.stringify(patchData));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -1544,14 +1565,14 @@ if (isset($_GET['id'])) {
|
|||
<div class="ec-pro-image">
|
||||
<!-- <a href="shop-left-sidebar-col-4.php" class="image"> -->
|
||||
<!-- 02-21-2024 Stacy changed link for image -->
|
||||
<a class="image" href="product-left-sidebar.php?id=<?php echo $similar_products[$pid]["_id"] ?>">
|
||||
<a class="image" href="product-left-sidebar.php?id=<?php echo $similar_products[$pid]["_id"] ?>">
|
||||
<img class="main-image" src="<?php echo $similar_products[$pid]["product_image"] ?>" />
|
||||
<img class="hover-image" src="<?php echo $similar_products[$pid]["product_image"] ?>" />
|
||||
</a>
|
||||
<!-- 02-21-2024 Stacy commented out -->
|
||||
<!-- <span class="percentage">20%</span> -->
|
||||
<!-- <span class="percentage">20%</span> -->
|
||||
<!-- <a href="#" class="quickview" data-link-action="quickview" title="Quick view" data-bs-toggle="modal" data-bs-target="#ec_quickview_modal"><i class="fi-rr-eye"></i></a> -->
|
||||
|
||||
|
||||
<!-- <div class="ec-pro-actions">
|
||||
<a href="compare.html" class="ec-btn-group compare" title="Compare"><i class="fi fi-rr-arrows-repeat"></i></a>
|
||||
<button title="Add To Cart" class="add-to-cart"><i class="fi-rr-shopping-basket"></i> Add To Cart</button>
|
||||
|
@ -1564,17 +1585,17 @@ if (isset($_GET['id'])) {
|
|||
<?php if (isset($similar_products[$pid]["sale_price"]) && $similar_products[$pid]["sale_price"] > 0) : ?>
|
||||
<button title="Add To Cart" onclick="popupAddToCart(`<?php echo htmlspecialchars(json_encode($similar_products[$pid]), ENT_QUOTES, 'UTF-8'); ?>`,`<?php echo htmlspecialchars($vendorOfProduct, ENT_QUOTES, 'UTF-8'); ?>`, `<?php echo isset($_SESSION['token']) ? $_SESSION['token'] : ''; ?>` , `<?php echo isset($_SESSION['email']) ? $_SESSION['email'] : ''; ?>` , `<?php echo isset($_SESSION['password']) ? $_SESSION['password'] : ''; ?>` , `<?php echo htmlspecialchars(json_encode($customer_data), ENT_QUOTES, 'UTF-8'); ?>`);" class="add-to-cart"><i class="fi-rr-shopping-basket"></i> Add To Cart</button>
|
||||
<a class="ec-btn-group wishlist" title="Wishlist" onclick="popupWishlist('<?php echo htmlspecialchars(json_encode($similar_products[$pid]), ENT_QUOTES, 'UTF-8'); ?>', '<?php echo htmlspecialchars(json_encode($customer_data), ENT_QUOTES, 'UTF-8'); ?>');"><i class="fi-rr-heart"></i></a>
|
||||
|
||||
|
||||
<?php elseif (isset($similar_products[$pid]["regular_price"]) && $similar_products[$pid]["regular_price"] != "") : ?>
|
||||
<button title="Add To Cart" onclick="popupAddToCart(`<?php echo htmlspecialchars(json_encode($similar_products[$pid]), ENT_QUOTES, 'UTF-8'); ?>`,`<?php echo htmlspecialchars($vendorOfProduct, ENT_QUOTES, 'UTF-8'); ?>`, `<?php echo isset($_SESSION['token']) ? $_SESSION['token'] : ''; ?>` , `<?php echo isset($_SESSION['email']) ? $_SESSION['email'] : ''; ?>` , `<?php echo isset($_SESSION['password']) ? $_SESSION['password'] : ''; ?>` , `<?php echo htmlspecialchars(json_encode($customer_data), ENT_QUOTES, 'UTF-8'); ?>`);" class="add-to-cart"><i class="fi-rr-shopping-basket"></i> Add To Cart</button>
|
||||
<a class="ec-btn-group wishlist" title="Wishlist" onclick="popupWishlist('<?php echo htmlspecialchars(json_encode($similar_products[$pid]), ENT_QUOTES, 'UTF-8'); ?>', '<?php echo htmlspecialchars(json_encode($customer_data), ENT_QUOTES, 'UTF-8'); ?>');"><i class="fi-rr-heart"></i></a>
|
||||
|
||||
|
||||
<?php else : ($similar_products[$pid]["regular_price"] == "" || $similar_products[$pid]["regular_price"] == null) ?>
|
||||
<a class="ec-btn-group wishlist" title="Wishlist" onclick="popupWishlist('<?php echo htmlspecialchars(json_encode($similar_products[$pid]), ENT_QUOTES, 'UTF-8'); ?>', '<?php echo htmlspecialchars(json_encode($customer_data), ENT_QUOTES, 'UTF-8'); ?>');"><i class="fi-rr-heart"></i></a>
|
||||
|
||||
|
||||
<?php endif; ?>
|
||||
<!-- 02-29-2024 Stacy disabling hover add to cart if there's no price -->
|
||||
|
||||
|
||||
<!-- <button title="Add To Cart" onclick="popupAddToCart(`<?php echo htmlspecialchars(json_encode($similar_products[$pid]), ENT_QUOTES, 'UTF-8'); ?>`,`<?php echo htmlspecialchars($vendorOfProduct, ENT_QUOTES, 'UTF-8'); ?>`, `<?php echo isset($_SESSION['token']) ? $_SESSION['token'] : ''; ?>` , `<?php echo isset($_SESSION['email']) ? $_SESSION['email'] : ''; ?>` , `<?php echo isset($_SESSION['password']) ? $_SESSION['password'] : ''; ?>` , `<?php echo htmlspecialchars(json_encode($customer_data), ENT_QUOTES, 'UTF-8'); ?>`);" class="add-to-cart"><i class="fi-rr-shopping-basket"></i> Add To Cart</button>
|
||||
<a class="ec-btn-group wishlist" title="Wishlist" onclick="popupWishlist('<?php echo htmlspecialchars(json_encode($similar_products[$pid]), ENT_QUOTES, 'UTF-8'); ?>', '<?php echo htmlspecialchars(json_encode($customer_data), ENT_QUOTES, 'UTF-8'); ?>');"><i class="fi-rr-heart"></i></a> -->
|
||||
</div>
|
||||
|
@ -1583,10 +1604,12 @@ if (isset($_GET['id'])) {
|
|||
</div>
|
||||
<div class="ec-pro-content">
|
||||
<!-- 02-21-2024 Stacy updated link for product name -->
|
||||
<!-- <h5 class="ec-pro-title"><a href="shop-left-sidebar-col-4.php?id=<?php #echo $similar_products[$pid]["_id"] ?>"><?php #echo $similar_products[$pid]["product_name"] ?></a></h5> -->
|
||||
<!-- <h5 class="ec-pro-title"><a href="shop-left-sidebar-col-4.php?id=<?php #echo $similar_products[$pid]["_id"]
|
||||
?>"><?php #echo $similar_products[$pid]["product_name"]
|
||||
?></a></h5> -->
|
||||
<h5 class="ec-pro-title"><a href="product-left-sidebar.php?id=<?php echo $similar_products[$pid]["_id"]; ?>"><?php echo $similar_products[$pid]["product_name"] ?></a></h5>
|
||||
<!-- 02-21-2024 Stacy updated link for product name -->
|
||||
|
||||
|
||||
<!-- 02-20-2024 Stacy commented ratings -->
|
||||
<!-- <div class="ec-pro-rating">
|
||||
<i class="ecicon eci-star fill"></i>
|
||||
|
@ -2010,8 +2033,8 @@ if (isset($_GET['id'])) {
|
|||
<script src="assets/js/newjs.js"></script>
|
||||
|
||||
<!-- 02-21-2024 Stacy added js link -->
|
||||
<?php
|
||||
if ($_SESSION["is_test"]==true) {
|
||||
<?php
|
||||
if ($_SESSION["is_test"] == true) {
|
||||
echo '<script src="assets/js/tester11.js"></script>';
|
||||
} else {
|
||||
echo '<script src="assets/js/produc3.js"></script>';
|
||||
|
|
|
@ -213,8 +213,11 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
|
|||
<div class="ec-pro-list-top d-flex">
|
||||
<div class="col-md-6 ec-grid-list">
|
||||
<div class="ec-gl-btn">
|
||||
<button class="btn btn-grid"><i class="fi-rr-apps"></i></button>
|
||||
<button class="btn btn-list active"><i class="fi-rr-list"></i></button>
|
||||
<button class="btn btn-grid active"><i class="fi fi-rr-apps"></i></button>
|
||||
<button class="btn btn-list"><i class="fi fi-rr-list"></i></button>
|
||||
|
||||
<!-- <button class="btn btn-grid active"><i class="fi-rr-apps"></i></button>
|
||||
<button class="btn btn-list"><i class="fi-rr-list"></i></button> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 ec-sort-select">
|
||||
|
@ -321,7 +324,7 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
|
|||
?>
|
||||
<div class="col-lg-4 col-md-6 col-sm-6 col-xs-6 mb-6 pro-gl-content width-100">
|
||||
<div class="ec-product-inner">
|
||||
<div class="ec-pro-image-outer" style="width: 290px; height: 200px;">
|
||||
<div class="ec-pro-image-outer" style="max-width: 290px; height: 350px;">
|
||||
<div class="ec-pro-image">
|
||||
<a href="product-left-sidebar.php?id=<?php echo $product["_id"]; ?>">
|
||||
<?php
|
||||
|
@ -330,12 +333,12 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
|
|||
if (!empty($image_urls)) {
|
||||
$first_image_url = trim($image_urls[0]);
|
||||
?>
|
||||
<img style="width: 290px; height: 200px; object-fit: cover;" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" />
|
||||
<img style="border: 1px solid #eeeeee; height: 330px; object-fit: cover;" class="main-image" src="<?php echo $first_image_url; ?>" alt="edit" />
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
<img style="width: 290px; height: 200px; object-fit: cover;" class="hover-image" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" alt="edit" />
|
||||
<img style="border: 1px solid #eeeeee; height: 330px; object-fit: cover;" class="hover-image" src="https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png" alt="edit" />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
@ -445,224 +448,227 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
|
|||
</div>
|
||||
<!-- Sidebar Area Start -->
|
||||
<div class="ec-shop-leftside col-lg-3 order-lg-first col-md-12 order-md-last">
|
||||
<div id="shop_sidebar">
|
||||
<div class="ec-sidebar-heading">
|
||||
<h1>Filter Products By</h1>
|
||||
</div>
|
||||
<div class="ec-sidebar-wrap">
|
||||
<!-- Sidebar Category Block -->
|
||||
<div class="ec-sidebar-block">
|
||||
<div class="ec-sb-title">
|
||||
<h3 class="ec-sidebar-title">Category</h3>
|
||||
</div>
|
||||
<div class="ec-sb-block-content">
|
||||
<form method="POST" action="shop-list-left-sidebar-action.php">
|
||||
<div class="ec-sidebar-wrap ec-border-box">
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Electronics" <?php echo (isset($_POST['category']) && in_array('Electronics', $_POST['category'])) || (isset($_GET['category']) && in_array('Electronics', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Electronics</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Solar" <?php echo (isset($_POST['category']) && in_array('Solar', $_POST['category'])) || (isset($_GET['category']) && in_array('Solar', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Solar</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="E-bike" <?php echo (isset($_POST['category']) && in_array('E-bike', $_POST['category'])) || (isset($_GET['category']) && in_array('E-bike', $_GET['category'])) ? 'checked' : ''; ?> /> <a>E-bike</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="E-vehicle" <?php echo (isset($_POST['category']) && in_array('E-vehicle', $_POST['category'])) || (isset($_GET['category']) && in_array('E-vehicle', $_GET['category'])) ? 'checked' : ''; ?> /> <a>E-vehicle</a><span class="checked"></span>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Appliance" <?php echo (isset($_POST['category']) && in_array('Appliance', $_POST['category'])) || (isset($_GET['category']) && in_array('Appliance', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Appliance</a><span class="checked"></span>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Smart Home" <?php echo (isset($_POST['category']) && in_array('Smart Home', $_POST['category'])) || (isset($_GET['category']) && in_array('Smart Home', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Smart Home</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Home" <?php echo (isset($_POST['category']) && in_array('Home', $_POST['category'])) || (isset($_GET['category']) && in_array('Home', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Home</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Apparel" <?php echo (isset($_POST['category']) && in_array('Apparel', $_POST['category'])) || (isset($_GET['category']) && in_array('Apparel', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Apparel</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Heavy Equipment" <?php echo (isset($_POST['category']) && in_array('Heavy Equipment', $_POST['category'])) || (isset($_GET['category']) && in_array('Heavy Equipment', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Heavy Equipment</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div style="padding-top:10px;">
|
||||
<label for="minPrice" style="margin-bottom:-5px;">Min Price:</label>
|
||||
<input style="height:40px" type="number" name="minPrice" id="minPrice" value="<?php echo isset($_POST['minPrice']) ? $_POST['minPrice'] : (isset($_GET['minPrice']) ? $_GET['minPrice'] : ''); ?>" />
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<label for="maxPrice" style="margin-bottom:-5px;">Max Price:</label>
|
||||
<input style="height:40px" type="number" name="maxPrice" id="maxPrice" value="<?php echo isset($_POST['maxPrice']) ? $_POST['maxPrice'] : (isset($_GET['maxPrice']) ? $_GET['maxPrice'] : ''); ?>" />
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div style="padding-top:10px;">
|
||||
<button style="font-size:12px; height:30px; width:60px;" class="btn-primary" type="submit">Apply</button>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- <button type="submit">Apply</button> -->
|
||||
</form>
|
||||
<!-- <form method="POST" action="<?php echo $_SERVER['PHP_SELF'] . '?' . http_build_query(array_merge($_GET, $_POST)); ?>">
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Electronics" <?php echo (isset($_POST['category']) && in_array('Electronics', $_POST['category'])) ? 'checked' : ''; ?> /> <a>Electronics</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Solar" <?php echo (isset($_POST['category']) && in_array('Solar', $_POST['category'])) ? 'checked' : ''; ?> /> <a>Solar</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="E-bike" <?php echo (isset($_POST['category']) && in_array('E-bike', $_POST['category'])) ? 'checked' : ''; ?> /> <a>E-bike</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="E-vehicle" <?php echo (isset($_POST['category']) && in_array('E-vehicle', $_POST['category'])) ? 'checked' : ''; ?> /> <a>E-vehicle</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Appliance" <?php echo (isset($_POST['category']) && in_array('Appliance', $_POST['category'])) ? 'checked' : ''; ?> /> <a>Appliance</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Smart Home" <?php echo (isset($_POST['category']) && in_array('Smart Home', $_POST['category'])) ? 'checked' : ''; ?> /> <a>Smart Home</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Home" <?php echo (isset($_POST['category']) && in_array('Home', $_POST['category'])) ? 'checked' : ''; ?> /> <a>Home</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Heavy Equipment" <?php echo (isset($_POST['category']) && in_array('Heavy Equipment', $_POST['category'])) ? 'checked' : ''; ?> /> <a>Heavy Equipment</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<label for="minPrice">Min Price:</label>
|
||||
<input type="number" name="minPrice" id="minPrice" value="<?php echo isset($_POST['minPrice']) ? $_POST['minPrice'] : (isset($_GET['minPrice']) ? $_GET['minPrice'] : ''); ?>" />
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<label for="maxPrice">Max Price:</label>
|
||||
<input type="number" name="maxPrice" id="maxPrice" value="<?php echo isset($_POST['maxPrice']) ? $_POST['maxPrice'] : (isset($_GET['maxPrice']) ? $_GET['maxPrice'] : ''); ?>" />
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<button type="submit">Apply</button>
|
||||
</form> -->
|
||||
|
||||
</div>
|
||||
<div id="shop_sidebar">
|
||||
<div class="ec-sidebar-heading">
|
||||
<h1>Filter Products By</h1>
|
||||
</div>
|
||||
<!-- 02-19-2024 Jun Jihad Search Filter -->
|
||||
<!-- Sidebar Size Block -->
|
||||
<!-- <div class="ec-sidebar-block">
|
||||
<div class="ec-sb-title">
|
||||
<h3 class="ec-sidebar-title">Size</h3>
|
||||
<div class="ec-sidebar-wrap">
|
||||
<!-- Sidebar Category Block -->
|
||||
<div class="ec-sidebar-block">
|
||||
<div class="ec-sb-title">
|
||||
<h3 class="ec-sidebar-title">Category</h3>
|
||||
</div>
|
||||
<div class="ec-sb-block-content">
|
||||
<form method="POST" action="shop-list-left-sidebar-action.php">
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Electronics" <?php echo (isset($_POST['category']) && in_array('Electronics', $_POST['category'])) || (isset($_GET['category']) && in_array('Electronics', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Electronics</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Solar" <?php echo (isset($_POST['category']) && in_array('Solar', $_POST['category'])) || (isset($_GET['category']) && in_array('Solar', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Solar</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="E-bike" <?php echo (isset($_POST['category']) && in_array('E-bike', $_POST['category'])) || (isset($_GET['category']) && in_array('E-bike', $_GET['category'])) ? 'checked' : ''; ?> /> <a>E-bike</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="E-vehicle" <?php echo (isset($_POST['category']) && in_array('E-vehicle', $_POST['category'])) || (isset($_GET['category']) && in_array('E-vehicle', $_GET['category'])) ? 'checked' : ''; ?> /> <a>E-vehicle</a><span class="checked"></span>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Appliance" <?php echo (isset($_POST['category']) && in_array('Appliance', $_POST['category'])) || (isset($_GET['category']) && in_array('Appliance', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Appliance</a><span class="checked"></span>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Smart Home" <?php echo (isset($_POST['category']) && in_array('Smart Home', $_POST['category'])) || (isset($_GET['category']) && in_array('Smart Home', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Smart Home</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Home" <?php echo (isset($_POST['category']) && in_array('Home', $_POST['category'])) || (isset($_GET['category']) && in_array('Home', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Home</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Apparel" <?php echo (isset($_POST['category']) && in_array('Apparel', $_POST['category'])) || (isset($_GET['category']) && in_array('Apparel', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Apparel</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Heavy Equipment" <?php echo (isset($_POST['category']) && in_array('Heavy Equipment', $_POST['category'])) || (isset($_GET['category']) && in_array('Heavy Equipment', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Heavy Equipment</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div style="padding-top:10px;">
|
||||
<label for="minPrice" style="margin-bottom:-5px;">Min Price:</label>
|
||||
<input style="height:40px" type="number" name="minPrice" id="minPrice" value="<?php echo isset($_POST['minPrice']) ? $_POST['minPrice'] : (isset($_GET['minPrice']) ? $_GET['minPrice'] : ''); ?>" />
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<label for="maxPrice" style="margin-bottom:-5px;">Max Price:</label>
|
||||
<input style="height:40px" type="number" name="maxPrice" id="maxPrice" value="<?php echo isset($_POST['maxPrice']) ? $_POST['maxPrice'] : (isset($_GET['maxPrice']) ? $_GET['maxPrice'] : ''); ?>" />
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div style="padding-top:10px;">
|
||||
<button style="font-size:12px; height:30px; width:60px;" class="btn-primary" type="submit">Apply</button>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- <button type="submit">Apply</button> -->
|
||||
</form>
|
||||
<!-- <form method="POST" action="<?php echo $_SERVER['PHP_SELF'] . '?' . http_build_query(array_merge($_GET, $_POST)); ?>">
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Electronics" <?php echo (isset($_POST['category']) && in_array('Electronics', $_POST['category'])) ? 'checked' : ''; ?> /> <a>Electronics</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Solar" <?php echo (isset($_POST['category']) && in_array('Solar', $_POST['category'])) ? 'checked' : ''; ?> /> <a>Solar</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="E-bike" <?php echo (isset($_POST['category']) && in_array('E-bike', $_POST['category'])) ? 'checked' : ''; ?> /> <a>E-bike</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="E-vehicle" <?php echo (isset($_POST['category']) && in_array('E-vehicle', $_POST['category'])) ? 'checked' : ''; ?> /> <a>E-vehicle</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Appliance" <?php echo (isset($_POST['category']) && in_array('Appliance', $_POST['category'])) ? 'checked' : ''; ?> /> <a>Appliance</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Smart Home" <?php echo (isset($_POST['category']) && in_array('Smart Home', $_POST['category'])) ? 'checked' : ''; ?> /> <a>Smart Home</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Home" <?php echo (isset($_POST['category']) && in_array('Home', $_POST['category'])) ? 'checked' : ''; ?> /> <a>Home</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Heavy Equipment" <?php echo (isset($_POST['category']) && in_array('Heavy Equipment', $_POST['category'])) ? 'checked' : ''; ?> /> <a>Heavy Equipment</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<label for="minPrice">Min Price:</label>
|
||||
<input type="number" name="minPrice" id="minPrice" value="<?php echo isset($_POST['minPrice']) ? $_POST['minPrice'] : (isset($_GET['minPrice']) ? $_GET['minPrice'] : ''); ?>" />
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<label for="maxPrice">Max Price:</label>
|
||||
<input type="number" name="maxPrice" id="maxPrice" value="<?php echo isset($_POST['maxPrice']) ? $_POST['maxPrice'] : (isset($_GET['maxPrice']) ? $_GET['maxPrice'] : ''); ?>" />
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<button type="submit">Apply</button>
|
||||
</form> -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ec-sb-block-content">
|
||||
<ul>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" value="" checked /><a href="#">S</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" value="" /><a href="#">M</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" value="" /> <a href="#">L</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" value="" /><a href="#">XL</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" value="" /><a href="#">XXL</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- Sidebar Color item -->
|
||||
<!-- <div class="ec-sidebar-block ec-sidebar-block-clr">
|
||||
<div class="ec-sb-title">
|
||||
<h3 class="ec-sidebar-title">Color</h3>
|
||||
</div>
|
||||
<div class="ec-sb-block-content">
|
||||
<ul>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span style="background-color:#c4d6f9;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span style="background-color:#ff748b;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span style="background-color:#000000;"></span></div>
|
||||
</li>
|
||||
<li class="active">
|
||||
<div class="ec-sidebar-block-item"><span style="background-color:#2bff4a;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span style="background-color:#ff7c5e;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span style="background-color:#f155ff;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span style="background-color:#ffef00;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span style="background-color:#c89fff;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span style="background-color:#7bfffa;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span style="background-color:#56ffc1;"></span></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- 02-19-2024 Jun Jihad Search Filter -->
|
||||
<!-- Sidebar Size Block -->
|
||||
<!-- <div class="ec-sidebar-block">
|
||||
<div class="ec-sb-title">
|
||||
<h3 class="ec-sidebar-title">Size</h3>
|
||||
</div>
|
||||
<div class="ec-sb-block-content">
|
||||
<ul>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" value="" checked /><a href="#">S</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" value="" /><a href="#">M</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" value="" /> <a href="#">L</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" value="" /><a href="#">XL</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" value="" /><a href="#">XXL</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- Sidebar Color item -->
|
||||
<!-- <div class="ec-sidebar-block ec-sidebar-block-clr">
|
||||
<div class="ec-sb-title">
|
||||
<h3 class="ec-sidebar-title">Color</h3>
|
||||
</div>
|
||||
<div class="ec-sb-block-content">
|
||||
<ul>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span style="background-color:#c4d6f9;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span style="background-color:#ff748b;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span style="background-color:#000000;"></span></div>
|
||||
</li>
|
||||
<li class="active">
|
||||
<div class="ec-sidebar-block-item"><span style="background-color:#2bff4a;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span style="background-color:#ff7c5e;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span style="background-color:#f155ff;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span style="background-color:#ffef00;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span style="background-color:#c89fff;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span style="background-color:#7bfffa;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span style="background-color:#56ffc1;"></span></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -781,21 +787,22 @@ if (!empty($_GET['minPrice']) || !empty($_GET['maxPrice']) || !empty($_GET['cate
|
|||
</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>
|
||||
<a href="javascript:void(0)" class="ec-header-btn ec-sidebar-toggle"><i class="fi fi-rr-apps"></i></a>
|
||||
</div>
|
||||
<div class="ec-nav-panel-icons">
|
||||
<a href="#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="cart.php" class="toggle-cart ec-header-btn ec-side-toggle"><i class="fi-rr-shopping-bag"></i><!-- <span class="ec-cart-noti ec-header-count cart-count-lable"></span> --></a>
|
||||
</div>
|
||||
<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.php" class="ec-header-btn"><i class="fi-rr-heart"></i><!-- <span class="ec-cart-noti"></span> --></a>
|
||||
</div>
|
||||
<div class="ec-nav-panel-icons">
|
||||
<a href="login.php" class="ec-header-btn"><i class="fi-rr-user"></i></a>
|
||||
|
|
|
@ -138,8 +138,8 @@ if ($_SESSION["userId"] <> "") {
|
|||
<div class="ec-pro-list-top d-flex">
|
||||
<div class="col-md-6 ec-grid-list">
|
||||
<div class="ec-gl-btn">
|
||||
<button class="btn btn-grid"><i class="fi-rr-apps"></i></button>
|
||||
<button class="btn btn-list active"><i class="fi-rr-list"></i></button>
|
||||
<button class="btn btn-grid active"><i class="fi fi-rr-apps"></i></button>
|
||||
<button class="btn btn-list"><i class="fi fi-rr-list"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 ec-sort-select">
|
||||
|
@ -156,6 +156,27 @@ if ($_SESSION["userId"] <> "") {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="ec-pro-list-top d-flex">
|
||||
<div class="col-md-6 ec-grid-list">
|
||||
<div class="ec-gl-btn">
|
||||
<button class="btn btn-grid"><i class="fi-rr-apps"></i></button>
|
||||
<button class="btn btn-list ctive"><i class="fi-rr-list"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 ec-sort-select">
|
||||
<span class="sort-by">Sort by</span>
|
||||
<div class="ec-select-inner">
|
||||
<select name="ec-select" id="ec-select">
|
||||
<option selected disabled>Position</option>
|
||||
<option value="1">Relevance</option>
|
||||
<option value="2">Name, A to Z</option>
|
||||
<option value="3">Name, Z to A</option>
|
||||
<option value="4">Price, low to high</option>
|
||||
<option value="5">Price, high to low</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- Shop Top End -->
|
||||
|
||||
|
||||
|
@ -359,248 +380,250 @@ if ($_SESSION["userId"] <> "") {
|
|||
</div>
|
||||
<!-- Sidebar Area Start -->
|
||||
<div class="ec-shop-leftside col-lg-3 order-lg-first col-md-12 order-md-last">
|
||||
<div id="shop_sidebar">
|
||||
<div class="ec-sidebar-heading">
|
||||
<h1>Filter Products By</h1>
|
||||
</div>
|
||||
<div class="ec-sidebar-wrap">
|
||||
<!-- Sidebar Category Block -->
|
||||
<div class="ec-sidebar-block">
|
||||
<div class="ec-sb-title">
|
||||
<h3 class="ec-sidebar-title">Category</h3>
|
||||
</div>
|
||||
<div class="ec-sb-block-content">
|
||||
<form method="POST" action="shop-list-left-sidebar-action.php">
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Electronics" <?php echo (isset($_POST['category']) && in_array('Electronics', $_POST['category'])) || (isset($_GET['category']) && in_array('Electronics', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Electronics</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Solar" <?php echo (isset($_POST['category']) && in_array('Solar', $_POST['category'])) || (isset($_GET['category']) && in_array('Solar', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Solar</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="E-bike" <?php echo (isset($_POST['category']) && in_array('E-bike', $_POST['category'])) || (isset($_GET['category']) && in_array('E-bike', $_GET['category'])) ? 'checked' : ''; ?> /> <a>E-bike</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="E-vehicle" <?php echo (isset($_POST['category']) && in_array('E-vehicle', $_POST['category'])) || (isset($_GET['category']) && in_array('E-vehicle', $_GET['category'])) ? 'checked' : ''; ?> /> <a>E-vehicle</a><span class="checked"></span>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Appliance" <?php echo (isset($_POST['category']) && in_array('Appliance', $_POST['category'])) || (isset($_GET['category']) && in_array('Appliance', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Appliance</a><span class="checked"></span>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Smart Home" <?php echo (isset($_POST['category']) && in_array('Smart Home', $_POST['category'])) || (isset($_GET['category']) && in_array('Smart Home', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Smart Home</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Home" <?php echo (isset($_POST['category']) && in_array('Home', $_POST['category'])) || (isset($_GET['category']) && in_array('Home', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Home</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Apparel" <?php echo (isset($_POST['category']) && in_array('Apparel', $_POST['category'])) || (isset($_GET['category']) && in_array('Apparel', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Apparel</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Heavy Equipment" <?php echo (isset($_POST['category']) && in_array('Heavy Equipment', $_POST['category'])) || (isset($_GET['category']) && in_array('Heavy Equipment', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Heavy Equipment</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div style="padding-top:10px;">
|
||||
<label for="minPrice" style="margin-bottom:-5px;">Min Price:</label>
|
||||
<input style="height:40px" type="number" name="minPrice" id="minPrice" value="<?php echo isset($_POST['minPrice']) ? $_POST['minPrice'] : (isset($_GET['minPrice']) ? $_GET['minPrice'] : ''); ?>" />
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<label for="maxPrice" style="margin-bottom:-5px;">Max Price:</label>
|
||||
<input style="height:40px" type="number" name="maxPrice" id="maxPrice" value="<?php echo isset($_POST['maxPrice']) ? $_POST['maxPrice'] : (isset($_GET['maxPrice']) ? $_GET['maxPrice'] : ''); ?>" />
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div style="padding-top:10px;">
|
||||
<button style="font-size:12px; height:30px; width:60px;" class="btn-primary" type="submit">Apply</button>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- <button type="submit">Apply</button> -->
|
||||
</form>
|
||||
<!-- <ul>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" checked /> <a href="#">clothes</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" /> <a href="#">Bags</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" /> <a href="#">Shoes</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" /> <a href="#">cosmetics</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" /> <a href="#">electrics</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" /> <a href="#">phone</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li id="ec-more-toggle-content" style="padding: 0; display: none;">
|
||||
<div class="ec-sidebar-wrap ec-border-box">
|
||||
<div id="shop_sidebar">
|
||||
<div class="ec-sidebar-heading">
|
||||
<h1>Filter Products By</h1>
|
||||
</div>
|
||||
<div class="ec-sidebar-wrap">
|
||||
<!-- Sidebar Category Block -->
|
||||
<div class="ec-sidebar-block">
|
||||
<div class="ec-sb-title">
|
||||
<h3 class="ec-sidebar-title">Category</h3>
|
||||
</div>
|
||||
<div class="ec-sb-block-content">
|
||||
<form method="POST" action="shop-list-left-sidebar-action.php">
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" /> <a href="#">Watch</a><span class="checked"></span>
|
||||
<input type="checkbox" name="category[]" value="Electronics" <?php echo (isset($_POST['category']) && in_array('Electronics', $_POST['category'])) || (isset($_GET['category']) && in_array('Electronics', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Electronics</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" /> <a href="#">Cap</a><span class="checked"></span>
|
||||
<input type="checkbox" name="category[]" value="Solar" <?php echo (isset($_POST['category']) && in_array('Solar', $_POST['category'])) || (isset($_GET['category']) && in_array('Solar', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Solar</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="E-bike" <?php echo (isset($_POST['category']) && in_array('E-bike', $_POST['category'])) || (isset($_GET['category']) && in_array('E-bike', $_GET['category'])) ? 'checked' : ''; ?> /> <a>E-bike</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="E-vehicle" <?php echo (isset($_POST['category']) && in_array('E-vehicle', $_POST['category'])) || (isset($_GET['category']) && in_array('E-vehicle', $_GET['category'])) ? 'checked' : ''; ?> /> <a>E-vehicle</a><span class="checked"></span>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Appliance" <?php echo (isset($_POST['category']) && in_array('Appliance', $_POST['category'])) || (isset($_GET['category']) && in_array('Appliance', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Appliance</a><span class="checked"></span>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Smart Home" <?php echo (isset($_POST['category']) && in_array('Smart Home', $_POST['category'])) || (isset($_GET['category']) && in_array('Smart Home', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Smart Home</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Home" <?php echo (isset($_POST['category']) && in_array('Home', $_POST['category'])) || (isset($_GET['category']) && in_array('Home', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Home</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Apparel" <?php echo (isset($_POST['category']) && in_array('Apparel', $_POST['category'])) || (isset($_GET['category']) && in_array('Apparel', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Apparel</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" name="category[]" value="Heavy Equipment" <?php echo (isset($_POST['category']) && in_array('Heavy Equipment', $_POST['category'])) || (isset($_GET['category']) && in_array('Heavy Equipment', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Heavy Equipment</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div style="padding-top:10px;">
|
||||
<label for="minPrice" style="margin-bottom:-5px;">Min Price:</label>
|
||||
<input style="height:40px" type="number" name="minPrice" id="minPrice" value="<?php echo isset($_POST['minPrice']) ? $_POST['minPrice'] : (isset($_GET['minPrice']) ? $_GET['minPrice'] : ''); ?>" />
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<label for="maxPrice" style="margin-bottom:-5px;">Max Price:</label>
|
||||
<input style="height:40px" type="number" name="maxPrice" id="maxPrice" value="<?php echo isset($_POST['maxPrice']) ? $_POST['maxPrice'] : (isset($_GET['maxPrice']) ? $_GET['maxPrice'] : ''); ?>" />
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div style="padding-top:10px;">
|
||||
<button style="font-size:12px; height:30px; width:60px;" class="btn-primary" type="submit">Apply</button>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item ec-more-toggle">
|
||||
<span class="checked"></span><span id="ec-more-toggle">More
|
||||
Categories</span>
|
||||
</div>
|
||||
</li>
|
||||
<!-- <button type="submit">Apply</button> -->
|
||||
</form>
|
||||
<!-- <ul>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" checked /> <a href="#">clothes</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" /> <a href="#">Bags</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" /> <a href="#">Shoes</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" /> <a href="#">cosmetics</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" /> <a href="#">electrics</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" /> <a href="#">phone</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li id="ec-more-toggle-content" style="padding: 0; display: none;">
|
||||
<ul>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" /> <a href="#">Watch</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" /> <a href="#">Cap</a><span class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item ec-more-toggle">
|
||||
<span class="checked"></span><span id="ec-more-toggle">More
|
||||
Categories</span>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- Sidebar Price Block -->
|
||||
<!-- <div class="ec-sidebar-block">
|
||||
<div class="ec-sb-title">
|
||||
<h3 class="ec-sidebar-title">Price</h3>
|
||||
</div>
|
||||
<div class="ec-sb-block-content es-price-slider">
|
||||
<div class="ec-price-filter">
|
||||
<div id="ec-sliderPrice" class="filter__slider-price" data-min="0" data-max="250" data-step="10"></div>
|
||||
<div class="ec-price-input">
|
||||
<label class="filter__label"><input type="text" class="filter__input"></label>
|
||||
<span class="ec-price-divider"></span>
|
||||
<label class="filter__label"><input type="text" class="filter__input"></label>
|
||||
</div>
|
||||
</ul> -->
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- Sidebar Size Block -->
|
||||
<!-- <div class="ec-sidebar-block">
|
||||
<div class="ec-sb-title">
|
||||
<h3 class="ec-sidebar-title">Size</h3>
|
||||
</div>
|
||||
<div class="ec-sb-block-content">
|
||||
<ul>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" value="" checked /><a href="#">S</a><span
|
||||
class="checked"></span>
|
||||
<!-- Sidebar Price Block -->
|
||||
<!-- <div class="ec-sidebar-block">
|
||||
<div class="ec-sb-title">
|
||||
<h3 class="ec-sidebar-title">Price</h3>
|
||||
</div>
|
||||
<div class="ec-sb-block-content es-price-slider">
|
||||
<div class="ec-price-filter">
|
||||
<div id="ec-sliderPrice" class="filter__slider-price" data-min="0" data-max="250" data-step="10"></div>
|
||||
<div class="ec-price-input">
|
||||
<label class="filter__label"><input type="text" class="filter__input"></label>
|
||||
<span class="ec-price-divider"></span>
|
||||
<label class="filter__label"><input type="text" class="filter__input"></label>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" value="" /><a href="#">M</a><span
|
||||
class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" value="" /> <a href="#">L</a><span
|
||||
class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" value="" /><a href="#">XL</a><span
|
||||
class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" value="" /><a href="#">XXL</a><span
|
||||
class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- Sidebar Color item -->
|
||||
<!-- <div class="ec-sidebar-block ec-sidebar-block-clr">
|
||||
<div class="ec-sb-title">
|
||||
<h3 class="ec-sidebar-title">Color</h3>
|
||||
</div>
|
||||
<div class="ec-sb-block-content">
|
||||
<ul>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span
|
||||
style="background-color:#c4d6f9;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span
|
||||
style="background-color:#ff748b;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span
|
||||
style="background-color:#000000;"></span></div>
|
||||
</li>
|
||||
<li class="active">
|
||||
<div class="ec-sidebar-block-item"><span
|
||||
style="background-color:#2bff4a;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span
|
||||
style="background-color:#ff7c5e;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span
|
||||
style="background-color:#f155ff;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span
|
||||
style="background-color:#ffef00;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span
|
||||
style="background-color:#c89fff;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span
|
||||
style="background-color:#7bfffa;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span
|
||||
style="background-color:#56ffc1;"></span></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- Sidebar Size Block -->
|
||||
<!-- <div class="ec-sidebar-block">
|
||||
<div class="ec-sb-title">
|
||||
<h3 class="ec-sidebar-title">Size</h3>
|
||||
</div>
|
||||
<div class="ec-sb-block-content">
|
||||
<ul>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" value="" checked /><a href="#">S</a><span
|
||||
class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" value="" /><a href="#">M</a><span
|
||||
class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" value="" /> <a href="#">L</a><span
|
||||
class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" value="" /><a href="#">XL</a><span
|
||||
class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item">
|
||||
<input type="checkbox" value="" /><a href="#">XXL</a><span
|
||||
class="checked"></span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- Sidebar Color item -->
|
||||
<!-- <div class="ec-sidebar-block ec-sidebar-block-clr">
|
||||
<div class="ec-sb-title">
|
||||
<h3 class="ec-sidebar-title">Color</h3>
|
||||
</div>
|
||||
<div class="ec-sb-block-content">
|
||||
<ul>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span
|
||||
style="background-color:#c4d6f9;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span
|
||||
style="background-color:#ff748b;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span
|
||||
style="background-color:#000000;"></span></div>
|
||||
</li>
|
||||
<li class="active">
|
||||
<div class="ec-sidebar-block-item"><span
|
||||
style="background-color:#2bff4a;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span
|
||||
style="background-color:#ff7c5e;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span
|
||||
style="background-color:#f155ff;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span
|
||||
style="background-color:#ffef00;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span
|
||||
style="background-color:#c89fff;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span
|
||||
style="background-color:#7bfffa;"></span></div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ec-sidebar-block-item"><span
|
||||
style="background-color:#56ffc1;"></span></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -724,16 +747,16 @@ 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="javascript:void(0)" class="ec-header-btn ec-sidebar-toggle"><i class="fi fi-rr-apps"></i></a>
|
||||
</div>
|
||||
<div class="ec-nav-panel-icons">
|
||||
<a href="#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="cart.php" class="toggle-cart ec-header-btn ec-side-toggle"><i class="fi-rr-shopping-bag"></i><!-- <span class="ec-cart-noti ec-header-count cart-count-lable"></span> --></a>
|
||||
</div>
|
||||
<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.php" class="ec-header-btn"><i class="fi-rr-heart"></i><!-- <span class="ec-cart-noti"></span> --></a>
|
||||
</div>
|
||||
<div class="ec-nav-panel-icons">
|
||||
<a href="login.php" class="ec-header-btn"><i class="fi-rr-user"></i></a>
|
||||
|
|
106
user-history.php
106
user-history.php
|
@ -7,6 +7,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
$customer_data = getCustomerbyLoginId($_SESSION["userId"]);
|
||||
} else {
|
||||
$_SESSION["isLoggedIn"] = false;
|
||||
header("location: login.php");
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
|
@ -323,7 +324,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
<div id="allOrders" class=" tab-content active">
|
||||
<!-- Content for "all Orders" tab -->
|
||||
<table class="table ec-table">
|
||||
<thead>
|
||||
<thead id="allOrdersTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
<th scope="col">Name</th>
|
||||
|
@ -342,29 +343,23 @@ if ($_SESSION["userId"] <> "") {
|
|||
$customer = $customer_data[0];
|
||||
$orders = getOrderbyCustomerId($customer['_id']);
|
||||
$totalAmount = 0;
|
||||
$orderExist = false;
|
||||
if ($orders) {
|
||||
$order_data = json_decode($orders, true);
|
||||
$_SESSION['cart_items'] = $order_data;
|
||||
foreach ($order_data as $order) {
|
||||
// Ensure that the required data is available before accessing it
|
||||
if (isset($order['status']) && isset($order['items'][0]['product'])) {
|
||||
if (isset($order['status']) && (strtoupper($order['status']) === 'TO PAY') || (strtoupper($order['status']) === 'TO SHIP')
|
||||
|| (strtoupper($order['status']) === 'TO RECEIVE') || (strtoupper($order['status']) === 'COMPLETED')
|
||||
&& isset($order['items'][0]['product'])) {
|
||||
$orderExist = true;
|
||||
$totalAmount += $order['total_amount'];
|
||||
?>
|
||||
<?php
|
||||
$jsonorder = json_encode($order);
|
||||
?>
|
||||
<tr class="tableView" data-value=' <?php echo $jsonorder; ?>' data-bs-toggle="modal" data-bs-target="#productDetails">
|
||||
<td>
|
||||
<?php
|
||||
// if (isset($order['items'][0]['product']['product_image'])) {
|
||||
// echo '<img class="prod-img" src="' . $order['items'][0]['product']['product_image'] . '" alt="product"> ';
|
||||
// } else {
|
||||
// echo '<img class="prod-img" src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="product">';
|
||||
// }
|
||||
?>
|
||||
<img class="prod-img" src="<?php echo $order['items'][0]['product']['product_image']; ?>" alt="product">
|
||||
</td>
|
||||
<!-- <img class="prod-img" src="<?php # echo $order['items'][0]['product']['product_image']; ?>" alt="product"></td> -->
|
||||
<td><img 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>
|
||||
|
@ -374,16 +369,31 @@ if ($_SESSION["userId"] <> "") {
|
|||
|
||||
<!-- <td><span class="tbl-btn"><a class="btn btn-lg btn-primary" href="#">View</a></span></td> -->
|
||||
</tr>
|
||||
|
||||
<?php } else { ?>
|
||||
<td> <img class="prod-img" src="https://api.obanana.com/images/storage/web_images/1710214273217-no_image.png" alt="product"> </td>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if (empty($order['status'])) {
|
||||
echo '<tr><p style="padding-top:30px; padding-left:20px;">No Purchased Order/s Yet.</p></tr>';
|
||||
}
|
||||
}
|
||||
}
|
||||
// } else if (empty($order['status'])) {
|
||||
// echo '<p style="padding-top:30px; padding-left:20px;">No Purchased Order/s Yet.</p>';
|
||||
// }
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
<?php
|
||||
if (!$orderExist) {
|
||||
echo '<p style="padding-top:30px; padding-left:20px;">No Order/s Yet.</p>';
|
||||
?>
|
||||
<script>
|
||||
allOrdersTHead.style.display = 'none';
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
@ -391,7 +401,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
<div id="toPay" class="tab-content">
|
||||
<!-- Content for "To Pay" tab -->
|
||||
<table class="table ec-table">
|
||||
<thead>
|
||||
<thead id="toPayTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
<th scope="col">Name</th>
|
||||
|
@ -410,12 +420,14 @@ if ($_SESSION["userId"] <> "") {
|
|||
$customer = $customer_data[0];
|
||||
$orders = getOrderbyCustomerId($customer['_id']);
|
||||
$totalAmount = 0;
|
||||
$orderExist = false;
|
||||
if ($orders) {
|
||||
$order_data = json_decode($orders, true);
|
||||
$_SESSION['cart_items'] = $order_data;
|
||||
foreach ($order_data as $order) {
|
||||
// Ensure that the required data is available before accessing it
|
||||
if (isset($order['status']) && (strtoupper($order['status']) === 'TO PAY') && isset($order['items'][0]['product'])) {
|
||||
$orderExist = true;
|
||||
$totalAmount += $order['total_amount'];
|
||||
?>
|
||||
<?php
|
||||
|
@ -439,6 +451,18 @@ if ($_SESSION["userId"] <> "") {
|
|||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
<?php
|
||||
if (!$orderExist) {
|
||||
echo '<p style="padding-top:30px; padding-left:20px;">No To Pay Order/s Yet.</p>';
|
||||
?>
|
||||
<script>
|
||||
toPayTHead.style.display = 'none';
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
@ -446,7 +470,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
<div id="toShip" class="tab-content">
|
||||
<!-- Content for "To Ship" tab -->
|
||||
<table class="table ec-table">
|
||||
<thead>
|
||||
<thead id="toShipTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
<th scope="col">Name</th>
|
||||
|
@ -467,12 +491,14 @@ if ($_SESSION["userId"] <> "") {
|
|||
$customer = $customer_data[0];
|
||||
$orders = getOrderbyCustomerId($customer['_id']);
|
||||
$totalAmount = 0;
|
||||
$orderExist = false;
|
||||
if ($orders) {
|
||||
$order_data = json_decode($orders, true);
|
||||
$_SESSION['cart_items'] = $order_data;
|
||||
foreach ($order_data as $order) {
|
||||
// Ensure that the required data is available before accessing it
|
||||
if (isset($order['status']) && (strtoupper($order['status']) === 'TO SHIP') && isset($order['items'][0]['product'])) {
|
||||
$orderExist = true;
|
||||
$totalAmount += $order['total_amount'];
|
||||
?>
|
||||
<?php
|
||||
|
@ -496,6 +522,18 @@ if ($_SESSION["userId"] <> "") {
|
|||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
<?php
|
||||
if (!$orderExist) {
|
||||
echo '<p style="padding-top:30px; padding-left:20px;">No To Ship Order/s Yet.</p>';
|
||||
?>
|
||||
<script>
|
||||
toShipTHead.style.display = 'none';
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
@ -503,7 +541,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
<div id="toReceive" class="tab-content">
|
||||
<!-- Content for "To Receive" tab -->
|
||||
<table class="table ec-table">
|
||||
<thead>
|
||||
<thead id="toReceiveTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
<th scope="col">Name</th>
|
||||
|
@ -523,12 +561,14 @@ if ($_SESSION["userId"] <> "") {
|
|||
$customer = $customer_data[0];
|
||||
$orders = getOrderbyCustomerId($customer['_id']);
|
||||
$totalAmount = 0;
|
||||
$orderExist = false;
|
||||
if ($orders) {
|
||||
$order_data = json_decode($orders, true);
|
||||
$_SESSION['cart_items'] = $order_data;
|
||||
foreach ($order_data as $order) {
|
||||
// Ensure that the required data is available before accessing it
|
||||
if (isset($order['status']) && (strtoupper($order['status']) === 'TO RECEIVE') && isset($order['items'][0]['product'])) {
|
||||
$orderExist = true;
|
||||
$totalAmount += $order['total_amount'];
|
||||
?>
|
||||
<?php
|
||||
|
@ -560,6 +600,18 @@ if ($_SESSION["userId"] <> "") {
|
|||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
<?php
|
||||
if (!$orderExist) {
|
||||
echo '<p style="padding-top:30px; padding-left:20px;">No To Receive Order/s Yet.</p>';
|
||||
?>
|
||||
<script>
|
||||
toReceiveTHead.style.display = 'none';
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
@ -567,7 +619,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
<div id="completed" class="tab-content">
|
||||
<!-- Content for "Completed" tab -->
|
||||
<table class="table ec-table">
|
||||
<thead>
|
||||
<thead id="completedTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
<th scope="col">Name</th>
|
||||
|
@ -587,12 +639,14 @@ if ($_SESSION["userId"] <> "") {
|
|||
$customer = $customer_data[0];
|
||||
$orders = getOrderbyCustomerId($customer['_id']);
|
||||
$totalAmount = 0;
|
||||
$orderExist = false;
|
||||
if ($orders) {
|
||||
$order_data = json_decode($orders, true);
|
||||
$_SESSION['cart_items'] = $order_data;
|
||||
foreach ($order_data as $order) {
|
||||
// Ensure that the required data is available before accessing it
|
||||
if (isset($order['status']) && (strtoupper($order['status']) === 'COMPLETED') && isset($order['items'][0]['product'])) {
|
||||
$orderExist = true;
|
||||
$totalAmount += $order['total_amount'];
|
||||
|
||||
?>
|
||||
|
@ -831,6 +885,18 @@ if ($_SESSION["userId"] <> "") {
|
|||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
<?php
|
||||
if (!$orderExist) {
|
||||
echo '<p style="padding-top:30px; padding-left:20px;">No Completed Order/s Yet.</p>';
|
||||
?>
|
||||
<script>
|
||||
completedTHead.style.display = 'none';
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
$customer_data = getCustomerbyLoginId($_SESSION["userId"]);
|
||||
} else {
|
||||
$_SESSION["isLoggedIn"] = false;
|
||||
header("location: login.php");
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
|
@ -513,7 +514,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
})
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
location.reload();
|
||||
// location.reload();
|
||||
// filter the delete action
|
||||
document.getElementById('form-check-' + addressIndex).remove();
|
||||
} else {
|
||||
|
|
|
@ -9,6 +9,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
$customer_data = getCustomerbyLoginId($_SESSION["userId"]);
|
||||
} else {
|
||||
$_SESSION["isLoggedIn"] = false;
|
||||
header("location: login.php");
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
|
@ -338,7 +339,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
<div id="allRefunds" class="tab-content active">
|
||||
<!-- Content for "all Orders" tab -->
|
||||
<table class="table ec-table">
|
||||
<thead>
|
||||
<thead id="allRefundsTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
<th scope="col">Name</th>
|
||||
|
@ -359,6 +360,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
$customer = $customer_data[0];
|
||||
$orders = getOrderbyCustomerId($customer['_id']);
|
||||
$totalAmount = 0;
|
||||
$orderExist = false;
|
||||
if ($orders) {
|
||||
$order_data = json_decode($orders, true);
|
||||
$_SESSION['cart_items'] = $order_data;
|
||||
|
@ -367,6 +369,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'TO APPROVE') || (strtoupper($order['return_order']['status']) === 'TO SHIP')
|
||||
|| (strtoupper($order['return_order']['status']) === 'TO RECEIVE') || (strtoupper($order['return_order']['status']) === 'TO REFUND')
|
||||
|| (strtoupper($order['return_order']['status']) === 'RETURN COMPLETE') && isset($order['items'][0]['product'])) {
|
||||
$orderExist = true;
|
||||
$totalAmount += $order['total_amount'];
|
||||
?>
|
||||
<?php
|
||||
|
@ -392,6 +395,18 @@ if ($_SESSION["userId"] <> "") {
|
|||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
<?php
|
||||
if (!$orderExist) {
|
||||
echo '<p style="padding-top:30px; padding-left:20px;">No Refund/s Yet.</p>';
|
||||
?>
|
||||
<script>
|
||||
allRefundsTHead.style.display = 'none';
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
@ -399,7 +414,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
<div id="toApprove" class="tab-content">
|
||||
<!-- Content for "To Approve" tab -->
|
||||
<table class="table ec-table">
|
||||
<thead>
|
||||
<thead id="toApproveTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
<th scope="col">Name</th>
|
||||
|
@ -420,12 +435,14 @@ if ($_SESSION["userId"] <> "") {
|
|||
$customer = $customer_data[0];
|
||||
$orders = getOrderbyCustomerId($customer['_id']);
|
||||
$totalAmount = 0;
|
||||
$orderExist = false;
|
||||
if ($orders) {
|
||||
$order_data = json_decode($orders, true);
|
||||
$_SESSION['cart_items'] = $order_data;
|
||||
foreach ($order_data as $order) {
|
||||
// Ensure that the required data is available before accessing it
|
||||
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'TO APPROVE') && isset($order['items'][0]['product'])) {
|
||||
$orderExist = true;
|
||||
$totalAmount += $order['total_amount'];
|
||||
?>
|
||||
<?php
|
||||
|
@ -451,6 +468,18 @@ if ($_SESSION["userId"] <> "") {
|
|||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
<?php
|
||||
if (!$orderExist) {
|
||||
echo '<p style="padding-top:30px; padding-left:20px;">No To Approve Refund/s Yet.</p>';
|
||||
?>
|
||||
<script>
|
||||
toApproveTHead.style.display = 'none';
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
@ -458,7 +487,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
<div id="toShip" class="tab-content">
|
||||
<!-- Content for "To Ship" tab -->
|
||||
<table class="table ec-table">
|
||||
<thead>
|
||||
<thead id="toShipTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
<th scope="col">Name</th>
|
||||
|
@ -479,12 +508,14 @@ if ($_SESSION["userId"] <> "") {
|
|||
$customer = $customer_data[0];
|
||||
$orders = getOrderbyCustomerId($customer['_id']);
|
||||
$totalAmount = 0;
|
||||
$orderExist = false;
|
||||
if ($orders) {
|
||||
$order_data = json_decode($orders, true);
|
||||
$_SESSION['cart_items'] = $order_data;
|
||||
foreach ($order_data as $order) {
|
||||
// Ensure that the required data is available before accessing it
|
||||
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'TO SHIP') && isset($order['items'][0]['product'])) {
|
||||
$orderExist = true;
|
||||
$totalAmount += $order['total_amount'];
|
||||
?>
|
||||
<?php
|
||||
|
@ -510,6 +541,18 @@ if ($_SESSION["userId"] <> "") {
|
|||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
<?php
|
||||
if (!$orderExist) {
|
||||
echo '<p style="padding-top:30px; padding-left:20px;">No To Ship Refund/s Yet.</p>';
|
||||
?>
|
||||
<script>
|
||||
toShipTHead.style.display = 'none';
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
@ -517,7 +560,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
<div id="toReceive" class="tab-content">
|
||||
<!-- Content for "To Receive" tab -->
|
||||
<table class="table ec-table">
|
||||
<thead>
|
||||
<thead id="toReceiveTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
<th scope="col">Name</th>
|
||||
|
@ -538,12 +581,14 @@ if ($_SESSION["userId"] <> "") {
|
|||
$customer = $customer_data[0];
|
||||
$orders = getOrderbyCustomerId($customer['_id']);
|
||||
$totalAmount = 0;
|
||||
$orderExist = false;
|
||||
if ($orders) {
|
||||
$order_data = json_decode($orders, true);
|
||||
$_SESSION['cart_items'] = $order_data;
|
||||
foreach ($order_data as $order) {
|
||||
// Ensure that the required data is available before accessing it
|
||||
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'TO RECEIVE') && isset($order['items'][0]['product'])) {
|
||||
$orderExist = true;
|
||||
$totalAmount += $order['total_amount'];
|
||||
?>
|
||||
<?php
|
||||
|
@ -572,6 +617,18 @@ if ($_SESSION["userId"] <> "") {
|
|||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
<?php
|
||||
if (!$orderExist) {
|
||||
echo '<p style="padding-top:30px; padding-left:20px;">No To Receive Refund/s Yet.</p>';
|
||||
?>
|
||||
<script>
|
||||
toReceiveTHead.style.display = 'none';
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
@ -579,7 +636,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
<div id="toRefund" class="tab-content">
|
||||
<!-- Content for "To Refund" tab -->
|
||||
<table class="table ec-table">
|
||||
<thead>
|
||||
<thead id="toRefundTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
<th scope="col">Name</th>
|
||||
|
@ -600,12 +657,14 @@ if ($_SESSION["userId"] <> "") {
|
|||
$customer = $customer_data[0];
|
||||
$orders = getOrderbyCustomerId($customer['_id']);
|
||||
$totalAmount = 0;
|
||||
$orderExist = false;
|
||||
if ($orders) {
|
||||
$order_data = json_decode($orders, true);
|
||||
$_SESSION['cart_items'] = $order_data;
|
||||
foreach ($order_data as $order) {
|
||||
// Ensure that the required data is available before accessing it
|
||||
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'TO REFUND') && isset($order['items'][0]['product'])) {
|
||||
$orderExist = true;
|
||||
$totalAmount += $order['total_amount'];
|
||||
?>
|
||||
<?php
|
||||
|
@ -634,6 +693,18 @@ if ($_SESSION["userId"] <> "") {
|
|||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
<?php
|
||||
if (!$orderExist) {
|
||||
echo '<p style="padding-top:30px; padding-left:20px;">No To Refund/s Yet.</p>';
|
||||
?>
|
||||
<script>
|
||||
toRefundTHead.style.display = 'none';
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
@ -641,7 +712,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
<div id="returnComplete" class="tab-content">
|
||||
<!-- Content for "Return Complete" tab -->
|
||||
<table class="table ec-table">
|
||||
<thead>
|
||||
<thead id="returnCompleteTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
<th scope="col">Name</th>
|
||||
|
@ -661,12 +732,14 @@ if ($_SESSION["userId"] <> "") {
|
|||
$customer = $customer_data[0];
|
||||
$orders = getOrderbyCustomerId($customer['_id']);
|
||||
$totalAmount = 0;
|
||||
$orderExist = false;
|
||||
if ($orders) {
|
||||
$order_data = json_decode($orders, true);
|
||||
$_SESSION['cart_items'] = $order_data;
|
||||
foreach ($order_data as $order) {
|
||||
// Ensure that the required data is available before accessing it
|
||||
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'RETURN COMPLETE') && isset($order['items'][0]['product'])) {
|
||||
$orderExist = true;
|
||||
$totalAmount += $order['total_amount'];
|
||||
?>
|
||||
<?php
|
||||
|
@ -831,6 +904,18 @@ if ($_SESSION["userId"] <> "") {
|
|||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
<?php
|
||||
if (!$orderExist) {
|
||||
echo '<p style="padding-top:30px; padding-left:20px;">No Completed Refund/s Yet.</p>';
|
||||
?>
|
||||
<script>
|
||||
returnCompleteTHead.style.display = 'none';
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -265,7 +265,7 @@ if (is_array($vendorOrderss)) {
|
|||
}
|
||||
?> -->
|
||||
</td>
|
||||
<td><span><?php echo $item['product']['name']; ?></span></td>
|
||||
<td style="max-width:300px;"><span class="text-truncate"><?php echo $item['product']['name']; ?></span></td>
|
||||
<td><span><?php echo $orderItems['status']; ?></span></td>
|
||||
<td><span><?php echo $orderItems['shipping_address']['shipping_first_name']; ?></span></td>
|
||||
<td><span><?php echo $orderItems['total_amount']; ?></span></td>
|
||||
|
@ -463,7 +463,7 @@ if (is_array($vendorOrderss)) {
|
|||
}
|
||||
?> -->
|
||||
</td>
|
||||
<td><span><?php echo $product['product_name']; ?></span></td>
|
||||
<td style="max-width:300px;"><span class="text-truncate"><?php echo $product['product_name']; ?></span></td>
|
||||
<td><span><?php echo $product['regular_price']; ?></span></td>
|
||||
<td><span><?php echo $product['sale_price']; ?></span></td>
|
||||
<td><span><?php echo $product['minimum_order']; ?></span></td>
|
||||
|
|
|
@ -311,11 +311,12 @@ if (is_array($vendorOrderss)) {
|
|||
<div class="tab" data-tab-name="returnComplete" onclick="showTab('returnComplete')">Return Complete</div>
|
||||
</div> -->
|
||||
|
||||
|
||||
<!-- 03-26-2024 Stacy added tab for all orders -->
|
||||
<!-- Content for "All Refunds" tab -->
|
||||
<div id="allRefunds" class="tab-content active">
|
||||
<!-- Content for "All Refunds" tab -->
|
||||
<table class="table ec-table">
|
||||
<thead>
|
||||
<thead id="allRefundTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
<th scope="col">Name</th>
|
||||
|
@ -335,11 +336,13 @@ if (is_array($vendorOrderss)) {
|
|||
$order = $vendorOrders;
|
||||
$orderArray = json_encode($order, true);
|
||||
$orderItems = json_decode($orderArray, true);
|
||||
$orderExist = false; //for checking if order exist
|
||||
foreach ($orderItems as $order) {
|
||||
// Ensure that the required data is available before accessing it
|
||||
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'TO APPROVE') || (strtoupper($order['return_order']['status']) === 'TO SHIP')
|
||||
|| (strtoupper($order['return_order']['status']) === 'TO RECEIVE') || (strtoupper($order['return_order']['status']) === 'TO REFUND')
|
||||
|| (strtoupper($order['return_order']['status']) === 'RETURN COMPLETE') && isset($order['items'][0]['product'])) {
|
||||
$orderExist = true; //if there's an order, orderExist will be set to true
|
||||
$totalAmount += $order['total_amount'];
|
||||
?>
|
||||
<?php
|
||||
|
@ -361,16 +364,28 @@ if (is_array($vendorOrderss)) {
|
|||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
<?php
|
||||
if (!$orderExist) {
|
||||
echo '<p style="padding-top:30px; padding-left:20px;">No Refund/s Yet.</p>';
|
||||
?>
|
||||
<script>
|
||||
allRefundTHead.style.display = 'none';
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="toApprove" class="tab-content active">
|
||||
<!-- Content for "To Approve" tab -->
|
||||
|
||||
<!-- Content for "To Approve" tab -->
|
||||
<div id="toApprove" class="tab-content">
|
||||
<table class="table ec-table">
|
||||
<thead>
|
||||
<thead id="toApproveTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
<th scope="col">Name</th>
|
||||
|
@ -390,9 +405,11 @@ if (is_array($vendorOrderss)) {
|
|||
$order = $vendorOrders;
|
||||
$orderArray = json_encode($order, true);
|
||||
$orderItems = json_decode($orderArray, true);
|
||||
$orderExist = false;
|
||||
foreach ($orderItems as $order) {
|
||||
// Ensure that the required data is available before accessing it
|
||||
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'TO APPROVE') && isset($order['items'][0]['product'])) {
|
||||
$orderExist = true;
|
||||
$totalAmount += $order['total_amount'];
|
||||
?>
|
||||
<?php
|
||||
|
@ -418,16 +435,28 @@ if (is_array($vendorOrderss)) {
|
|||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
<?php
|
||||
if (!$orderExist) {
|
||||
echo '<p style="padding-top:30px; padding-left:20px;">No To Approve Refund/s Yet.</p>';
|
||||
?>
|
||||
<script>
|
||||
toApproveTHead.style.display = 'none';
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Content for "To Ship" tab -->
|
||||
<div id="toShip" class="tab-content">
|
||||
<!-- Content for "To Ship" tab -->
|
||||
<table class="table ec-table">
|
||||
<thead>
|
||||
<thead id="toShipTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
<th scope="col">Name</th>
|
||||
|
@ -447,9 +476,11 @@ if (is_array($vendorOrderss)) {
|
|||
$order = $vendorOrders;
|
||||
$orderArray = json_encode($order, true);
|
||||
$orderItems = json_decode($orderArray, true);
|
||||
$orderExist = false;
|
||||
foreach ($orderItems as $order) {
|
||||
// Ensure that the required data is available before accessing it
|
||||
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'TO SHIP') && isset($order['items'][0]['product'])) {
|
||||
$orderExist = true;
|
||||
$totalAmount += $order['total_amount'];
|
||||
?>
|
||||
<?php
|
||||
|
@ -471,16 +502,28 @@ if (is_array($vendorOrderss)) {
|
|||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
<?php
|
||||
if (!$orderExist) {
|
||||
echo '<p style="padding-top:30px; padding-left:20px;">No To Ship Refund/s Yet.</p>';
|
||||
?>
|
||||
<script>
|
||||
toShipTHead.style.display = 'none';
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Content for "To Receive" tab -->
|
||||
<div id="toReceive" class="tab-content">
|
||||
<!-- Content for "To Receive" tab -->
|
||||
<table class="table ec-table">
|
||||
<thead>
|
||||
<thead id="toReceiveTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
<th scope="col">Name</th>
|
||||
|
@ -499,9 +542,11 @@ if (is_array($vendorOrderss)) {
|
|||
$order = $vendorOrders;
|
||||
$orderArray = json_encode($order, true);
|
||||
$orderItems = json_decode($orderArray, true);
|
||||
$orderExist = false;
|
||||
foreach ($orderItems as $order) {
|
||||
// Ensure that the required data is available before accessing it
|
||||
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'TO RECEIVE') && isset($order['items'][0]['product'])) {
|
||||
$orderExist = true;
|
||||
$totalAmount += $order['total_amount'];
|
||||
?>
|
||||
<?php
|
||||
|
@ -528,13 +573,26 @@ if (is_array($vendorOrderss)) {
|
|||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
<?php
|
||||
if (!$orderExist) {
|
||||
echo '<p style="padding-top:30px; padding-left:20px;">No To Receive Refund/s Yet.</p>';
|
||||
?>
|
||||
<script>
|
||||
toReceiveTHead.style.display = 'none';
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Content for "To Refund" tab -->
|
||||
<div id="toRefund" class="tab-content">
|
||||
<!-- Content for "To Refund" tab -->
|
||||
<table class="table ec-table">
|
||||
<thead>
|
||||
<thead id="toRefundTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
<th scope="col">Name</th>
|
||||
|
@ -553,9 +611,11 @@ if (is_array($vendorOrderss)) {
|
|||
$order = $vendorOrders;
|
||||
$orderArray = json_encode($order, true);
|
||||
$orderItems = json_decode($orderArray, true);
|
||||
$orderExist = false;
|
||||
foreach ($orderItems as $order) {
|
||||
// Ensure that the required data is available before accessing it
|
||||
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'TO REFUND') && isset($order['items'][0]['product'])) {
|
||||
$orderExist = true;
|
||||
$totalAmount += $order['total_amount'];
|
||||
?>
|
||||
<?php
|
||||
|
@ -580,16 +640,28 @@ if (is_array($vendorOrderss)) {
|
|||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
<?php
|
||||
if (!$orderExist) {
|
||||
echo '<p style="padding-top:30px; padding-left:20px;">No To Refund/s Yet.</p>';
|
||||
?>
|
||||
<script>
|
||||
toRefundTHead.style.display = 'none';
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Content for "Return Complete" tab -->
|
||||
<div id="returnComplete" class="tab-content">
|
||||
<!-- Content for "Return Complete" tab -->
|
||||
<table class="table ec-table">
|
||||
<thead>
|
||||
<thead id="returnCompleteTHead">
|
||||
<tr class="Title">
|
||||
<th scope="col">Image</th>
|
||||
<th scope="col">Name</th>
|
||||
|
@ -608,9 +680,11 @@ if (is_array($vendorOrderss)) {
|
|||
$order = $vendorOrders;
|
||||
$orderArray = json_encode($order, true);
|
||||
$orderItems = json_decode($orderArray, true);
|
||||
$orderExist = false;
|
||||
foreach ($orderItems as $order) {
|
||||
// Ensure that the required data is available before accessing it
|
||||
if (isset($order['return_order']['status']) && (strtoupper($order['return_order']['status']) === 'RETURN COMPLETE') && isset($order['items'][0]['product'])) {
|
||||
$orderExist = true;
|
||||
$totalAmount += $order['total_amount'];
|
||||
?>
|
||||
<?php
|
||||
|
@ -771,9 +845,20 @@ if (is_array($vendorOrderss)) {
|
|||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
<?php
|
||||
if (!$orderExist) {
|
||||
echo '<p style="padding-top:30px; padding-left:20px;">No Refund/s Complete Yet.</p>';
|
||||
?>
|
||||
<script>
|
||||
returnCompleteTHead.style.display = 'none';
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -629,7 +629,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
|
||||
<script>
|
||||
// function for deleting address
|
||||
const vendorid = `<?php echo $_SESSION["LoggedInVendorId"]; ?>`;
|
||||
// const vendorid = `<?php # echo $_SESSION["LoggedInVendorId"]; ?>`;
|
||||
function deleteAddress(vendorid, addressIndex) {
|
||||
fetch('https://<?php echo $_SESSION["data_endpoint"]; ?>/api/v1/vendors/' + vendorid)
|
||||
.then(response => response.json())
|
||||
|
@ -648,7 +648,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
})
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
location.reload();
|
||||
// location.reload();
|
||||
// filter the delete action
|
||||
document.getElementById('form-check-' + addressIndex).remove();
|
||||
} else {
|
||||
|
|
|
@ -419,7 +419,7 @@ $array = json_decode($result, true);
|
|||
</div>
|
||||
<!-- 03-15-2024 Jun Jihad price_matrix field Product Upload Vendor Page -->
|
||||
<!-- 02-19-2024 Jun Jihad Promo Field Product Upload Vendor Page -->
|
||||
<div class="col-md-12" style="margin: 0 0 20px 0;">
|
||||
<div class="col-md-12 pt-3" style="margin: 0 0 20px 0; white-space: nowrap;">
|
||||
<label class="form-label">Promo</label>
|
||||
<div class="row" justify-content-between>
|
||||
<div class="col-md-6">
|
||||
|
|
|
@ -331,7 +331,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
if (xhr.status === 200) {
|
||||
// Product removed successfully, you can handle the UI update here if needed
|
||||
console.log('Product removed successfully');
|
||||
location.reload(); // Refresh the page after removing the product
|
||||
// location.reload(); // Refresh the page after removing the product
|
||||
} else {
|
||||
// Handle error response
|
||||
console.error('Error removing product:', xhr.responseText);
|
||||
|
@ -366,7 +366,7 @@ if ($_SESSION["userId"] <> "") {
|
|||
if (xhr.readyState === XMLHttpRequest.DONE) {
|
||||
if (xhr.status === 200) {
|
||||
console.log('Products removed successfully');
|
||||
location.reload();
|
||||
// location.reload();
|
||||
} else {
|
||||
console.error('Error removing products:', xhr.responseText);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue