obanana_b2b_test/next_day_delivery.php

1087 lines
58 KiB
PHP
Raw Permalink Normal View History

2024-02-12 10:35:09 +08:00
<?php
use Symfony\Component\VarDumper\VarDumper;
include "functions.php";
2024-02-12 10:35:09 +08:00
$_SESSION["url"] = $_SERVER['REQUEST_URI'];
if ($_SESSION["userId"] <> "") {
$_SESSION["isLoggedIn"] = true;
$customer_data = getCustomerbyLoginId($_SESSION["userId"]);
} else {
$_SESSION["isLoggedIn"] = false;
}
?>
<!DOCTYPE html>
2024-02-19 11:01:44 +08:00
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<title>oBanana B2B - Elevate Your Business</title>
<meta name="keywords" content="apparel, catalog, clean, ecommerce, ecommerce HTML, electronics, fashion, html eCommerce, html store, minimal, multipurpose, multipurpose ecommerce, online store, responsive ecommerce template, shops" />
<meta name="description" content="Best ecommerce html template for single and multi vendor store.">
<meta name="author" content="ashishmaraviya">
<!-- site Favicon -->
<link rel="icon" href="assets/images/favicon/favicon.png" sizes="32x32" />
<link rel="apple-touch-icon" href="assets/images/favicon/favicon.png" />
<meta name="msapplication-TileImage" content="assets/images/favicon/favicon.png" />
<!-- css Icon Font -->
<link rel="stylesheet" href="assets/css/vendor/ecicons.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
2024-02-19 11:01:44 +08:00
<!-- css All Plugins Files -->
<link rel="stylesheet" href="assets/css/plugins/animate.css" />
<link rel="stylesheet" href="assets/css/plugins/swiper-bundle.min.css" />
<link rel="stylesheet" href="assets/css/plugins/jquery-ui.min.css" />
<link rel="stylesheet" href="assets/css/plugins/countdownTimer.css" />
<link rel="stylesheet" href="assets/css/plugins/slick.min.css" />
<link rel="stylesheet" href="assets/css/plugins/bootstrap.css" />
<link rel="stylesheet" href="assets/css/plugins/nouislider.css" />
<!-- Main Style -->
<link rel="stylesheet" href="assets/css/demo1.css" />
<link rel="stylesheet" href="assets/css/style.css" />
<link rel="stylesheet" href="assets/css/responsive.css" />
<!-- Background css -->
<link rel="stylesheet" id="bg-switcher-css" href="assets/css/backgrounds/bg-4.css">
<style>
.ec-product-inner .ec-pro-image .ec-pro-actions .add-to-cart {
width: 35px;
position: absolute;
right: 15px;
bottom: 36px;
margin: 0;
padding: 0;
font-size: 0;
border-radius: 10px 10px 0 0;
}
2024-02-12 10:35:09 +08:00
2024-02-19 11:01:44 +08:00
.ec-product-inner .ec-pro-image .ec-pro-actions .wishlist {
position: absolute;
right: 15px;
bottom: 0;
border-radius: 0 0 10px 10px;
}
</style>
2024-02-12 10:35:09 +08:00
<script>
function updateCartItemCount() {
2024-04-24 09:49:23 +08:00
var xhr = new XMLHttpRequest();
xhr.open("GET", "cartitems.php?id=<?php echo $_SESSION['customerId']; ?>", true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
var data = xhr.responseText;
if (data !== "") {
console.log("Data: " + data);
document.getElementById("cartItemCount").innerHTML = data;
}
2024-02-12 10:35:09 +08:00
}
2024-04-24 09:49:23 +08:00
};
xhr.send();
}
2024-02-12 10:35:09 +08:00
2024-04-24 09:49:23 +08:00
function updateWishItemCount() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "wishlistitems.php?id=<?php echo $_SESSION['customerId']; ?>", true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
var data = xhr.responseText;
if (data !== "") {
document.getElementById("wishItemCount").innerHTML = data;
}
2024-02-12 10:35:09 +08:00
}
2024-04-24 09:49:23 +08:00
};
xhr.send();
}
2024-02-12 10:35:09 +08:00
</script>
2024-02-19 11:01:44 +08:00
</head>
2024-02-12 10:35:09 +08:00
2024-02-19 11:01:44 +08:00
<body class="shop_page" onload="updateCartItemCount(); updateWishItemCount()">
2024-02-12 10:35:09 +08:00
<div id="ec-overlay">
<div class="ec-ellipsis">
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
2024-02-19 11:01:44 +08:00
<?php include "header.php" ?>
2024-02-12 10:35:09 +08:00
<!-- ekka Cart Start -->
2024-02-20 09:23:54 +08:00
2024-02-12 10:35:09 +08:00
<!-- ekka Cart End -->
2024-02-29 16:00:50 +08:00
<!-- Category Sidebar start -->
<?php include "category-slider.php" ?>
2024-02-19 11:01:44 +08:00
<!-- Page detail section -->
<!-- Main Slider Start -->
<div class="sticky-header-next-sec ec-main-slider section section-space-pb">
<div class="ec-slider swiper-container main-slider-nav main-slider-dot">
<!-- Main slider -->
<div class="swiper-wrapper">
<div class="ec-slide-item swiper-slide d-flex ec-slide-1">
<img loading="lazy" src="https://api.obanana.com/images/storage/web_images/1708068709103-0-02-06-f2fd3afbfa98cf9fcb81bce9df0691a06bb004b883d08ef2e80c4a3bdaf17f8f_1c6db9236e4582.jpg" alt="" width="1920">
2024-02-19 11:01:44 +08:00
<div class="container align-self-center">
<div class="row">
<div class="col-xl-6 col-lg-7 col-md-7 col-sm-7 align-self-center">
<div class="ec-slide-content slider-animation">
2024-02-20 15:21:15 +08:00
<h1 class="ec-slide-title">Next Day Delivery!</h1>
<h2 class="ec-slide-stitle">Get your purchased items within 24 hours!</h2>
<p>Your satisfaction is our priority, and we're here to make your shopping experience convenient and enjoyable!</p>
<!-- <a href="https://obanana.com/product-left-sidebar.php?id=6576c58dd1dba10ba2392765" class="btn btn-lg btn-secondary">Order Now</a> -->
2024-02-19 11:01:44 +08:00
</div>
</div>
2024-02-12 10:35:09 +08:00
</div>
</div>
</div>
</div>
2024-02-19 11:01:44 +08:00
<div class="swiper-pagination swiper-pagination-white"></div>
<div class="swiper-buttons">
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
</div>
2024-02-12 10:35:09 +08:00
</div>
</div>
2024-02-19 11:01:44 +08:00
<!-- Main Slider End -->
<section class="ec-bnr-detail margin-bottom-30 section-space-pt">
<div class="ec-page-detail">
<div class="container">
<div class="ec-main-heading d-none">
<h2>Shop <span>Detail</span></h2>
</div>
<div class="row">
<div class="col-lg-6 col-md-12">
<div class="ec-cat-bnr">
<span><img loading="lazy" src="https://api.obanana.com/images/storage/web_images/1708412192539-NEXT%20DAY%20delivery.png" alt=""></span>
2024-02-19 11:01:44 +08:00
</div>
</div>
<div class="col-lg-6 col-md-12">
<div class="ec-page-description">
<h6>The Best deal on top brands</h6>
2024-02-20 15:21:15 +08:00
<p class="m-0">
We strive to provide exceptional service to our valued customers!
When you make purchases from this list, we're delighted to ensure that they are promptly delivered to you on the very next day. Your satisfaction is our priority, and we're here to make your shopping experience convenient and enjoyable!
2024-02-19 11:01:44 +08:00
<p>
</div>
</div>
</div>
2024-02-12 10:35:09 +08:00
</div>
</div>
</section>
2024-02-19 11:01:44 +08:00
<!-- End detail section -->
<!-- Sart Shop -->
<section class="ec-page-content-bnr section-space-pb">
2024-02-12 10:35:09 +08:00
<div class="container">
<div class="row">
2024-02-19 11:01:44 +08:00
<div class="ec-shop-rightside col-lg-12 col-md-12">
<!-- Shop Top Start -->
<div class="ec-pro-list-top d-flex">
<div class="col-md-6 ec-grid-list">
<div class="ec-gl-btn">
<button class="btn sidebar-toggle-icon"><i class="fi-rr-filter"></i></button>
<button class="btn btn-grid-50 active"><i class="fi-rr-apps"></i></button>
<button class="btn btn-list-50"><i class="fi-rr-list"></i></button>
</div>
2024-02-12 10:35:09 +08:00
</div>
2024-02-19 11:01:44 +08:00
<div class="col-md-6 ec-sort-select">
<!-- <span class="sort-by">Sort by</span>
2024-02-19 11:01:44 +08:00
<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> -->
2024-02-12 10:35:09 +08:00
</div>
</div>
2024-02-19 11:01:44 +08:00
<!-- Shop Top End -->
<!-- Shop content Start -->
2024-02-20 09:23:54 +08:00
<!-- 02-19-2024 Jun Jihad Same Day Delivery page -->
2024-02-19 11:01:44 +08:00
<div class="shop-pro-content">
<div class="shop-pro-inner">
<div class="row" id="product-container2">
2024-04-24 09:49:23 +08:00
2024-02-12 10:35:09 +08:00
</div>
2024-02-19 11:01:44 +08:00
<!-- Ec Pagination Start -->
<div class="ec-pro-pagination" style="padding:10px">
2024-04-24 09:49:23 +08:00
<span class="page-indicator"></span>
<ul class="ec-pro-pagination-inner" id='prod-search-pagination'>
2024-02-20 09:23:54 +08:00
2024-04-24 09:49:23 +08:00
2024-02-12 10:35:09 +08:00
</div>
2024-02-20 09:23:54 +08:00
<!-- 02-19-2024 Jun Jihad Same Day Delivery page -->
2024-02-19 11:01:44 +08:00
<!-- Ec Pagination End -->
2024-02-12 10:35:09 +08:00
</div>
2024-02-19 11:01:44 +08:00
<!--Shop content End -->
2024-02-12 10:35:09 +08:00
</div>
<script>
// JavaScript
document.addEventListener("DOMContentLoaded", function() {
const productsPerPage = 30;
let currentPage = 1;
let page = currentPage;
loadProducts(page); // Initial load of products
// JavaScript
function filterFunction(checkedCategories, minPrice, maxPrice,products) {
var filteredProducts = [];
// Filter by category
if (checkedCategories.length > 0) {
let filteredProduct= products?.filter((product) => {
let categoryF = product?.product_category?.toLowerCase();
// console.log('Category (lowercase):', categoryF);
let result =checkedCategories.includes(categoryF)
// console.log('Checked Categories:', result);
return result; // Return a boolean value indicating whether the category is included
});
filteredProducts=filteredProduct
console.log(filteredProducts);
} else {
// If no categories are selected, keep all products
filteredProducts = products;
}
// If minPrice or maxPrice is not provided, set them to default values
minPriceFinal = minPrice !== '' ? parseInt(minPrice) : 0;
maxPriceFinal = maxPrice !== '' ? parseInt(maxPrice) : Number.MAX_VALUE;
console.log(checkedCategories, minPrice,products)
// Filter by price range
// Filter by price range
if( minPrice !== ''|| maxPrice !== ''){
filteredProducts = filteredProducts.filter(function(product) {
// Check if product has a sale price
var salePrice = parseInt(product.sale_price);
var regularPrice = parseInt(product.regular_price);
// Check if salePrice and regularPrice are valid numbers
// if (isNaN(salePrice) || isNaN(regularPrice)) {
// // One of the prices is not a valid number, use 0 instead
// salePrice = salePrice || 0;
// regularPrice = regularPrice || 0;
// }
var priceToCheck = salePrice > 0 ? salePrice : regularPrice;
// console.log(priceToCheck);
return priceToCheck >= minPriceFinal && priceToCheck <= maxPriceFinal;
});
}
console.log({results:filteredProducts});
// Final filtered products
// console.log({results:filteredProducts});
let final = filteredProducts
return final;
}
function loadProducts(page,isFilter) {
// Make AJAX request to fetch products for given page
let xhr = new XMLHttpRequest();
xhr.open("GET", "https://<?php echo htmlspecialchars($_SESSION["data_endpoint"]); ?>/api/v1/products", true);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4 && xhr.status == 200) {
// Parse JSON response
let products1 = JSON.parse(xhr.responseText);
let products = products1.filter((e) => {
return e.promo[0]?.['next-day-delivery'] === "Yes" && (e.product_type === '' || e.product_type === 'simple' || e.product_type === 'variable');
});
console.log(products)
// if(isFilter===true){
var checkedCategories = getCheckedCheckboxes();
var prices = getMinMaxPrices();
// Pass the values to your filter function
products= filterFunction(checkedCategories, prices.minPrice, prices.maxPrice,products);
// }
// Construct HTML for product cards
let productContainer = document.getElementById("product-container2");
productContainer.innerHTML = ""; // Clear previous content
console.log(products)
let startIndex = (page - 1) * productsPerPage;
let endIndex = startIndex + productsPerPage - 1;
// Filter products for current page
if(products.length>0){
let productsForPage = products.slice(startIndex, endIndex + 1);
productsForPage.forEach(function(prod) {
let product = prod;
// let vendor = prod.vendor;
2024-05-03 16:31:55 +08:00
let vendorOfProduct = prod;
// let card = document.createElement("div");
let token ="<?php echo $_SESSION['token'] ?>";
let email ="<?php echo $_SESSION['email'] ?>";
let password ="<?php echo $_SESSION['password'] ?>";
let customer_data ='<?php echo json_encode($customer_data) ?>';
// Load product images dynamically
let imageContainer = document.createElement("div");
if (product.images && product.images.length > 0) {
let imageUrls = product.images.split(',');
let firstImageUrl = imageUrls[0].trim();
let img = document.createElement("img");
2024-05-03 16:31:55 +08:00
img.setAttribute("style", "border: 1px solid #eeeeee; height: 330px; object-fit: cover;");
img.setAttribute("class", "main-image");
2024-04-30 14:25:28 +08:00
img.setAttribute("loading", "lazy");
img.setAttribute("src", firstImageUrl);
img.setAttribute("alt", "Product");
img.className = "main-image";
imageContainer.appendChild(img);
} else {
let img = document.createElement("img");
img.className = "main-image";
2024-05-03 16:31:55 +08:00
img.setAttribute("style", "border: 1px solid #eeeeee; height: 330px; object-fit: cover;");
2024-04-30 14:25:28 +08:00
img.setAttribute("loading", "lazy");
img.setAttribute("class", "main-image");
img.setAttribute("src", "https://api.obanana.com/images/storage/web_images/1709002636671-viber_image_2024-02-22_15-54-42-498.png");
img.setAttribute("alt", "Product");
imageContainer.appendChild(img);
}
// Create product card
let card = document.createElement("div");
card.classList.add("col-lg-3", "col-md-6", "col-sm-6", "col-xs-6", "mb-6", "pro-gl-content", "width-100");
card.innerHTML = `
<div class="ec-product-inner">
2024-05-03 16:31:55 +08:00
<div class="ec-pro-image-outer" style="max-width: 290px; height: 350px;">
<div class="ec-pro-image">
<a href="product-left-sidebar.php?id=${product._id}">
${imageContainer.innerHTML} <!-- Include the dynamically loaded image here -->
</a>
<div class="ec-pro-actions" style="bottom: -36px;">
2024-05-03 16:31:55 +08:00
${
(product["sale_price"] && product["sale_price"] > 0) ?
`<button title="Add To Cart" onclick="popupAddToCart('${encodeURIComponent(JSON.stringify(product))}','${encodeURIComponent(JSON.stringify(vendorOfProduct))}', '${token}', '${email}', '${password}', '${encodeURIComponent(JSON.stringify(customer_data))}');" class="add-to-cart"><i class="fi-rr-shopping-basket"></i> Add To Cart</button>
<a class="ec-btn-group wishlist" title="Wishlist" onclick="popupWishlist('${encodeURIComponent(JSON.stringify(product))}', '${encodeURIComponent(JSON.stringify(customer_data))}');"><i class="fi-rr-heart"></i></a>` :
(product["regular_price"] && product["regular_price"] != "") ?
`<button title="Add To Cart" onclick="popupAddToCart('${encodeURIComponent(JSON.stringify(product))}','${encodeURIComponent(JSON.stringify(vendorOfProduct))}', '${token}', '${email}', '${password}', '${encodeURIComponent(JSON.stringify(customer_data))}');" class="add-to-cart"><i class="fi-rr-shopping-basket"></i> Add To Cart</button>
<a class="ec-btn-group wishlist" title="Wishlist" onclick="popupWishlist('${encodeURIComponent(JSON.stringify(product))}', '${encodeURIComponent(JSON.stringify(customer_data))}');"><i class="fi-rr-heart"></i></a>` :
`<a class="ec-btn-group wishlist" title="Wishlist" onclick="popupWishlist('${encodeURIComponent(JSON.stringify(product))}', '${encodeURIComponent(JSON.stringify(customer_data))}');"><i class="fi-rr-heart"></i></a>`
}
</div>
</div>
</div>
<div class="ec-pro-content">
<h5 class="ec-pro-title"><a href="product-left-sidebar.php?id=${product._id}" style="width: 90%; text-wrap: wrap;">${product.product_name}</a></h5>
<div class="ec-pro-list-desc">${product.product_description ??""}</div>
<span class="ec-price">
${(product.sale_price && product.sale_price > 0) ?
`<span class="old-price">&#8369;${product?.regular_price}</span>
<span class="new-price">&#8369;${product?.sale_price}</span>` : product.regular_price ?
`<span class="new-price">&#8369;${product?.regular_price}</span>`: 'inquire'
}
</span>
</div>
</div>`;
productContainer.appendChild(card);
updatePaginationUI(page, products?.length);
});
gridList()
}else{
document.getElementById("product-container2").innerHTML=`
<h6>No products available</h6>
`;
}
}
else{
document.getElementById("product-container2").innerHTML=`
<h6>No products available</h6>
`;
}
};
xhr.send();
}
function updatePaginationUI(page, totalProducts) {
let totalPages = Math.ceil(totalProducts / productsPerPage);
let paginationInner = document.getElementById("prod-search-pagination");
let paginationIndicator = document.querySelector(".page-indicator");
paginationInner.innerHTML = ""; // Clear previous pagination
let startPage = 1;
let endPage = totalPages;
const visiblePages = 5; // Number of visible page links excluding ellipses
if (totalPages > visiblePages) {
if (page <= Math.ceil(visiblePages / 2)) {
endPage = visiblePages;
} else if (page >= totalPages - Math.floor(visiblePages / 2)) {
startPage = totalPages - visiblePages + 1;
} else {
startPage = page - Math.floor(visiblePages / 2);
endPage = page + Math.ceil(visiblePages / 2) - 1;
}
}
// Display ellipsis at the beginning if necessary
if (startPage > 1) {
let li = document.createElement("li");
li.textContent = "...";
paginationInner.appendChild(li);
}
for (let i = startPage; i <= endPage; i++) {
let li = document.createElement("li");
let a = document.createElement("a");
a.setAttribute("href", "#");
a.setAttribute("data-page", i);
a.textContent = i;
if (i === page) {
a.classList.add("active");
}
li.appendChild(a);
paginationInner.appendChild(li);
}
// Display ellipsis at the end if necessary
if (endPage < totalPages) {
let li = document.createElement("li");
li.textContent = "...";
paginationInner.appendChild(li);
}
// Update pagination indicator
let startIndex = (page - 1) * productsPerPage + 1;
let endIndex = Math.min(startIndex + productsPerPage - 1, totalProducts);
paginationIndicator.textContent = " Showing " + startIndex + " to " + endIndex + " of " + totalProducts + " item(s)";
}
function getCheckedCheckboxes() {
var checkboxes = document.querySelectorAll('input[name="category[]"]:checked');
var values = [];
checkboxes.forEach(function(checkbox) {
values.push(checkbox.value.toLowerCase().trim());
});
return values;
}
// Function to get min and max prices
function getMinMaxPrices() {
var minPrice = document.getElementById('minPrice').value;
var maxPrice = document.getElementById('maxPrice').value;
return {
minPrice: minPrice,
maxPrice: maxPrice
};
}
// Function to handle form submission
function applyFilters() {
var checkedCategories = getCheckedCheckboxes();
var prices = getMinMaxPrices();
// Pass the values to your filter function
filterFunction(checkedCategories, prices.minPrice, prices.maxPrice);
}
var checkboxes = document.querySelectorAll('input[name="category[]"]');
checkboxes.forEach(function(checkbox) {
checkbox.addEventListener('change', function() {
loadProducts(1, true);
});
});
function gridList(e) {
console.log("hereeeee")
var $gridCont = $('.shop-pro-inner');
var $gridView = $('.pro-gl-content');
// e.preventDefault();
$gridCont.removeClass('list-view');
$gridView.removeClass('width-100');
}
// Listen for changes in min and max price inputs
var minPriceInput = document.getElementById('minPrice');
minPriceInput.addEventListener('input', function() {
loadProducts(1, true);
});
var maxPriceInput = document.getElementById('maxPrice');
maxPriceInput.addEventListener('input', function() {
loadProducts(1, true);
});
document.getElementById("prod-search-pagination").addEventListener("click", function(event) {
if (event.target.tagName.toLowerCase() === "a") {
event.preventDefault(); // Prevent default link behavior
let page = parseInt(event.target.getAttribute("data-page"));
currentPage = page;
loadProducts(page,false);
// Scroll to top
window.scrollTo({
top: 0,
behavior: "smooth" // Optional smooth scrolling behavior
});
}
});
// Load initial products on page load
loadProducts(currentPage);
// Attach click event listeners to pagination links
// document.getElementById("pagination-container").addEventListener("click", function(event) {
// if (event.target.tagName.toLowerCase() === "a") {
// event.preventDefault(); // Prevent default link behavior
// let page = event.target.getAttribute("data-page");
// loadProducts(page); // Load products for the clicked page
// }
// });
// // Attach event listener to search form or button
// document.getElementById("search-form").addEventListener("submit", function(event) {
// event.preventDefault(); // Prevent default form submission
// let searchQuery = document.getElementById("search-input").value;
// console.log(searchQuery + " search clicked");
// // Make AJAX request to fetch products based on search query
// // You need to implement this part in a similar way to loading products
// });
});
</script>
2024-02-19 11:01:44 +08:00
<!-- Sidebar Area Start -->
<div class="filter-sidebar-overlay"></div>
<div class="ec-shop-leftside filter-sidebar">
<div class="ec-sidebar-heading">
<h1>Filter Products By</h1>
<a class="filter-cls-btn" href="javascript:void(0)">×</a>
</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">
2024-02-19 11:01:44 +08:00
<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>
2024-02-19 11:01:44 +08:00
</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>
2024-02-19 11:01:44 +08:00
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" name="category[]" value="E-vehicle" <?php echo (isset($_POST['category']) && in_array('E-vehicle', $_POST['category'])) || (isset($_GET['category']) && in_array('E-vehicle', $_GET['category'])) ? 'checked' : ''; ?> /> <a>E-vehicle</a><span class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" name="category[]" value="Appliance" <?php echo (isset($_POST['category']) && in_array('Appliance', $_POST['category'])) || (isset($_GET['category']) && in_array('Appliance', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Appliance</a><span class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" name="category[]" value="Smart Home" <?php echo (isset($_POST['category']) && in_array('Smart Home', $_POST['category'])) || (isset($_GET['category']) && in_array('Smart Home', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Smart Home</a><span class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" name="category[]" value="Home" <?php echo (isset($_POST['category']) && in_array('Home', $_POST['category'])) || (isset($_GET['category']) && in_array('Home', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Home</a><span class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" name="category[]" value="Apparel" <?php echo (isset($_POST['category']) && in_array('Apparel', $_POST['category'])) || (isset($_GET['category']) && in_array('Apparel', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Apparel</a><span class="checked"></span>
</div>
</li>
<li>
<div class="ec-sidebar-block-item">
<input type="checkbox" name="category[]" value="Heavy Equipment" <?php echo (isset($_POST['category']) && in_array('Heavy Equipment', $_POST['category'])) || (isset($_GET['category']) && in_array('Heavy Equipment', $_GET['category'])) ? 'checked' : ''; ?> /> <a>Heavy Equipment</a><span class="checked"></span>
</div>
</li>
<li>
<div style="padding-top:10px;">
<label for="minPrice" style="margin-bottom:-5px;">Min Price:</label>
<input style="height:40px" type="number" name="minPrice" id="minPrice" />
<!-- <input style="height:40px" type="number" name="minPrice" id="minPrice" value="<?php echo isset($_POST['minPrice']) ? $_POST['minPrice'] : (isset($_GET['minPrice']) ? $_GET['minPrice'] : ''); ?>" /> -->
</div>
</li>
<li>
<div>
<label for="maxPrice" style="margin-bottom:-5px;">Max Price:</label>
<input style="height:40px" type="number" name="maxPrice" id="maxPrice" />
<!-- <input style="height:40px" type="number" name="maxPrice" id="maxPrice" value="<?php echo isset($_POST['maxPrice']) ? $_POST['maxPrice'] : (isset($_GET['maxPrice']) ? $_GET['maxPrice'] : ''); ?>" /> -->
</div>
</li>
<!-- <li>
<div style="padding-top:10px;">
<button style="font-size:12px; height:30px; width:60px;" class="btn-primary" type="submit">Apply</button>
</div>
</li> -->
2024-02-19 11:01:44 +08:00
</ul>
<!-- <button type="submit">Apply</button> -->
</form>
<!-- <form method="POST" action="<?php echo $_SERVER['PHP_SELF'] . '?' . http_build_query(array_merge($_GET, $_POST)); ?>">
2024-02-19 11:01:44 +08:00
<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>
2024-02-12 10:35:09 +08:00
</div>
2024-02-19 11:01:44 +08:00
<!-- Sidebar Size Block -->
<!-- <div class="ec-sidebar-block">
2024-02-19 11:01:44 +08:00
<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> -->
2024-02-19 11:01:44 +08:00
<!-- Sidebar Color item -->
<!-- <div class="ec-sidebar-block ec-sidebar-block-clr">
2024-02-19 11:01:44 +08:00
<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> -->
2024-02-19 11:01:44 +08:00
<!-- Sidebar Price Block -->
<!-- <div class="ec-sidebar-block">
2024-02-19 11:01:44 +08:00
<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>
</div>
</div>
</div> -->
2024-02-12 10:35:09 +08:00
</div>
</div>
2024-02-19 11:01:44 +08:00
2024-02-12 10:35:09 +08:00
</div>
</div>
2024-02-19 11:01:44 +08:00
</section>
<!-- End Shop -->
2024-02-12 10:35:09 +08:00
2024-02-19 11:01:44 +08:00
<?php include "footer.php" ?>
<!-- Modal -->
<div class="modal fade" id="ec_quickview_modal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<button type="button" class="btn-close qty_close" data-bs-dismiss="modal" aria-label="Close"></button>
<div class="modal-body">
<div class="row">
<div class="col-md-5 col-sm-12 col-xs-12">
<!-- Swiper -->
<div class="qty-product-cover">
<div class="qty-slide">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
2024-02-19 11:01:44 +08:00
</div>
<div class="qty-slide">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
2024-02-19 11:01:44 +08:00
</div>
<div class="qty-slide">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
2024-02-19 11:01:44 +08:00
</div>
<div class="qty-slide">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
2024-02-19 11:01:44 +08:00
</div>
<div class="qty-slide">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
2024-02-19 11:01:44 +08:00
</div>
</div>
<div class="qty-nav-thumb">
<div class="qty-slide">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_1.jpg" alt="">
2024-02-19 11:01:44 +08:00
</div>
<div class="qty-slide">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_2.jpg" alt="">
2024-02-19 11:01:44 +08:00
</div>
<div class="qty-slide">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_3.jpg" alt="">
2024-02-19 11:01:44 +08:00
</div>
<div class="qty-slide">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_4.jpg" alt="">
2024-02-19 11:01:44 +08:00
</div>
<div class="qty-slide">
<img loading="lazy" class="img-responsive" src="assets/images/product-image/3_5.jpg" alt="">
2024-02-19 11:01:44 +08:00
</div>
</div>
</div>
<div class="col-md-7 col-sm-12 col-xs-12">
<div class="quickview-pro-content">
<h5 class="ec-quick-title"><a href="shop-left-sidebar-col-4.php">Handbag leather purse for
women</a>
</h5>
<div class="ec-quickview-rating">
<i class="ecicon eci-star fill"></i>
<i class="ecicon eci-star fill"></i>
<i class="ecicon eci-star fill"></i>
<i class="ecicon eci-star fill"></i>
<i class="ecicon eci-star"></i>
</div>
<div class="ec-quickview-desc">Lorem Ipsum is simply dummy text of the printing and
typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever
since the 1500s,</div>
<div class="ec-quickview-price">
<span class="old-price">$100.00</span>
<span class="new-price">$80.00</span>
</div>
<div class="ec-pro-variation">
<div class="ec-pro-variation-inner ec-pro-variation-color">
<span>Color</span>
<div class="ec-pro-color">
<ul class="ec-opt-swatch">
<li><span style="background-color:#696d62;"></span></li>
<li><span style="background-color:#d73808;"></span></li>
<li><span style="background-color:#577023;"></span></li>
<li><span style="background-color:#2ea1cd;"></span></li>
</ul>
</div>
</div>
<div class="ec-pro-variation-inner ec-pro-variation-size ec-pro-size">
<span>Size</span>
<div class="ec-pro-variation-content">
<ul class="ec-opt-size">
<li class="active"><a href="#" class="ec-opt-sz"
data-tooltip="Small">S</a></li>
<li><a href="#" class="ec-opt-sz" data-tooltip="Medium">M</a></li>
<li><a href="#" class="ec-opt-sz" data-tooltip="Large">X</a></li>
<li><a href="#" class="ec-opt-sz" data-tooltip="Extra Large">XL</a></li>
</ul>
</div>
</div>
</div>
<div class="ec-quickview-qty">
<div class="qty-plus-minus">
<input class="qty-input" type="text" name="ec_qtybtn" value="1" />
</div>
<div class="ec-quickview-cart ">
<button class="btn btn-primary"><i class="fi-rr-shopping-basket"></i>> Add To Cart</button>
</div>
</div>
2024-02-12 10:35:09 +08:00
</div>
</div>
</div>
</div>
</div>
</div>
2024-02-19 11:01:44 +08:00
</div>
<!-- Modal end -->
2024-02-12 10:35:09 +08:00
<!-- Footer navigation panel for responsive display -->
2024-05-03 16:31:55 +08:00
<!-- <div class="ec-nav-toolbar">
2024-02-12 10:35:09 +08:00
<div class="container">
<div class="ec-nav-panel">
<div class="ec-nav-panel-icons">
2024-02-19 11:01:44 +08:00
<a href="#ec-mobile-menu" class="navbar-toggler-btn ec-header-btn ec-side-toggle"><i
class="fi-rr-menu-burger"></i></a>
2024-02-12 10:35:09 +08:00
</div>
<div class="ec-nav-panel-icons">
2024-02-19 11:01:44 +08:00
<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>
2024-02-12 10:35:09 +08:00
</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">
2024-02-19 11:01:44 +08:00
<a href="wishlist.html" class="ec-header-btn"><i class="fi-rr-heart"></i><span
class="ec-cart-noti">4</span></a>
2024-02-12 10:35:09 +08:00
</div>
<div class="ec-nav-panel-icons">
<a href="login.php" class="ec-header-btn"><i class="fi-rr-user"></i></a>
</div>
</div>
</div>
2024-05-03 16:31:55 +08:00
</div> -->
2024-02-12 10:35:09 +08:00
<!-- Footer navigation panel for responsive display end -->
<!-- Recent Purchase Popup -->
2024-02-20 09:23:54 +08:00
<!-- <div class="recent-purchase">
<img loading="lazy" src="assets/images/product-image/1.jpg" alt="payment image">
2024-02-12 10:35:09 +08:00
<div class="detail">
<p>Someone in new just bought</p>
<h6>stylish baby shoes</h6>
<p>10 Minutes ago</p>
</div>
<a href="javascript:void(0)" class="icon-btn recent-close">×</a>
2024-02-20 09:23:54 +08:00
</div> -->
2024-02-12 10:35:09 +08:00
<!-- Recent Purchase Popup end -->
<!-- Cart Floating Button -->
<div class="ec-cart-float">
<a href="#ec-side-cart" class="ec-header-btn ec-side-toggle">
<div class="header-icon"><i class="fi-rr-shopping-basket"></i>
</div>
<span class="ec-cart-count cart-count-lable">3</span>
</a>
</div>
<!-- Cart Floating Button end -->
2024-05-21 09:18:10 +08:00
2024-02-12 10:35:09 +08:00
<!-- Feature tools -->
<div class="ec-tools-sidebar-overlay"></div>
<div class="ec-tools-sidebar">
<div class="tool-title">
<h3>Features</h3>
</div>
<a href="#" class="ec-tools-sidebar-toggle in-out">
<img loading="lazy" alt="icon" src="assets/images/common/settings.png" />
2024-02-12 10:35:09 +08:00
</a>
<div class="ec-tools-detail">
<div class="ec-tools-sidebar-content ec-change-color ec-color-desc">
<h3>Color Scheme</h3>
<ul class="bg-panel">
<li class="active" data-color="01"><a href="#" class="colorcode1"></a></li>
<li data-color="02"><a href="#" class="colorcode2"></a></li>
<li data-color="03"><a href="#" class="colorcode3"></a></li>
<li data-color="04"><a href="#" class="colorcode4"></a></li>
<li data-color="05"><a href="#" class="colorcode5"></a></li>
</ul>
</div>
<div class="ec-tools-sidebar-content">
<h3>Backgrounds</h3>
<ul class="bg-panel">
<li class="bg"><a class="back-bg-1" id="bg-1">Background-1</a></li>
<li class="bg"><a class="back-bg-2" id="bg-2">Background-2</a></li>
<li class="bg"><a class="back-bg-3" id="bg-3">Background-3</a></li>
<li class="bg"><a class="back-bg-4" id="bg-4">Default</a></li>
</ul>
</div>
<div class="ec-tools-sidebar-content">
<h3>Full Screen mode</h3>
<div class="ec-fullscreen-mode">
<div class="ec-fullscreen-switch">
<div class="ec-fullscreen-btn">Mode</div>
<div class="ec-fullscreen-on">On</div>
<div class="ec-fullscreen-off">Off</div>
</div>
</div>
</div>
<div class="ec-tools-sidebar-content">
<h3>Dark mode</h3>
<div class="ec-change-mode">
<div class="ec-mode-switch">
<div class="ec-mode-btn">Mode</div>
<div class="ec-mode-on">On</div>
<div class="ec-mode-off">Off</div>
</div>
</div>
</div>
<div class="ec-tools-sidebar-content">
<h3>RTL mode</h3>
<div class="ec-change-rtl">
<div class="ec-rtl-switch">
<div class="ec-rtl-btn">Rtl</div>
<div class="ec-rtl-on">On</div>
<div class="ec-rtl-off">Off</div>
</div>
</div>
</div>
<div class="ec-tools-sidebar-content">
<h3>Clear local storage</h3>
<a class="clear-cach" href="javascript:void(0)">Clear Cache & Default</a>
</div>
</div>
</div>
<!-- Feature tools end -->
<!-- Vendor JS -->
<script src="assets/js/vendor/jquery-3.5.1.min.js"></script>
<script src="assets/js/vendor/popper.min.js"></script>
<script src="assets/js/vendor/bootstrap.min.js"></script>
<script src="assets/js/vendor/jquery-migrate-3.3.0.min.js"></script>
<script src="assets/js/vendor/modernizr-3.11.2.min.js"></script>
<!--Plugins JS-->
<script src="assets/js/plugins/swiper-bundle.min.js"></script>
<script src="assets/js/plugins/countdownTimer.min.js"></script>
<script src="assets/js/plugins/scrollup.js"></script>
<script src="assets/js/plugins/jquery.zoom.min.js"></script>
<script src="assets/js/plugins/slick.min.js"></script>
<script src="assets/js/plugins/infiniteslidev2.js"></script>
<script src="assets/js/vendor/jquery.magnific-popup.min.js"></script>
<script src="assets/js/plugins/jquery.sticky-sidebar.js"></script>
2024-02-19 11:01:44 +08:00
<script src="assets/js/plugins/nouislider.js"></script>
2024-02-12 10:35:09 +08:00
<!-- Main Js -->
<script src="assets/js/vendor/index.js"></script>
<script src="assets/js/main.js"></script>
2024-02-20 09:23:54 +08:00
<?php
if ($_SESSION["is_test"]==true) {
echo '<script src="assets/js/tester11.js"></script>';
2024-02-20 09:23:54 +08:00
} else {
echo '<script src="assets/js/produc3.js"></script>';
}
?>
2024-02-12 10:35:09 +08:00
</body>
</html>