<!DOCTYPE html>
<?php
include './class/include.php';
if (!isset($_SESSION)) {
session_start();
}
$get_cat = null;
$get_brand = null;
$get_subcat = null;
$title = 'All Products';
$products = Product::getAllParentProducts();
if (isset($_GET['cat'])) {
$get_cat = $_GET['cat'];
$CAT = new ProductCategories($_GET['cat']);
$title = $CAT->name;
$products = Product::getProductsByCategory($get_cat);
}
if (isset($_GET['subcat'])) {
$get_subcat = $_GET['subcat'];
$SUBCAT = new SubCategory($_GET['subcat']);
$title = $SUBCAT->name;
$products = Product::getProductsBySubCategory($get_subcat);
}
if (isset($_GET['brand'])) {
$get_brand = $_GET['brand'];
$BRAND = new Brand($_GET['brand']);
$title = $BRAND->name;
$products = Product::getProductsByBrand($get_brand);
}
if (isset($_GET["page"])) {
$page = (int) $_GET["page"];
} else {
$page = 1;
}
$setlimit = 21;
$pagelimit = ($page * $setlimit) - $setlimit;
?>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" type="image/x-icon" href="assets/magnoliya logo.png"/>
<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;500;600;700;800&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Kaushan+Script&display=swap" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/animate.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/chosen.min.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/font-awesome.min.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/pe-icon-7-stroke.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/jquery.scrollbar.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/lightbox.min.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/magnific-popup.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/slick.min.css"/>
<link rel="stylesheet" type="text/css" href="assets/fonts/flaticon.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/megamenu.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/dreaming-attribute.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/style.css"/>
<title>Magnoliya | Products</title>
</head>
<body>
<!-- Start Header -->
<?php include './header.php'; ?>
<!-- End Header -->
<div class="banner-wrapper has_background">
<img src="assets/images/banner-for-all2.jpg"
class="img-responsive attachment-1920x447 size-1920x447" alt="img">
<div class="banner-wrapper-inner">
<h1 class="page-title">Products</h1>
<div role="navigation" aria-label="Breadcrumbs" class="breadcrumb-trail breadcrumbs">
<ul class="trail-items breadcrumb">
<li class="trail-item trail-begin"><a href="index-2.html"><span>Home</span></a></li>
<li class="trail-item trail-end active"><span>Products</span>
</li>
</ul>
</div>
</div>
</div>
<main class="site-main main-container no-sidebar">
<div class="section-001">
<div class="container">
<div class="lynessa-products style-04">
<div class="response-product product-list-grid row auto-clear equal-container better-height ">
<?php
$PRODUCT = new Product(NULL);
foreach ($PRODUCT->all() as $key => $product) {
?>
<div class="product-item best-selling style-04 rows-space-30 col-bg-3 col-xl-3 col-lg-4 col-md-4 col-sm-6 col-ts-6 post-25 product type-product status-publish has-post-thumbnail product_cat-light product_cat-chair product_cat-specials product_tag-light product_tag-sock first instock sale featured shipping-taxable purchasable product-type-simple">
<div class="product-inner tooltip-top tooltip-all-top">
<div class="product-thumb">
<a class="thumb-link" href="view-product.php?id=<?php echo $product['id']; ?>">
<img class="img-responsive"
src="upload/product-categories/sub-category/product/photos/<?php echo $product['image_name']; ?>"
alt="HEM SMOCKING" width="270" height="350">
</a>
<div class="flash">
<span class="onsale"><span class="number">-11%</span></span>
<span class="onnew"><span class="text">New</span></span></div>
<div class="group-button">
<div class="add-to-cart">
<a href="#"
class="button product_type_simple add_to_cart_button ajax_add_to_cart">Add to
cart</a>
</div>
<a href="#" class="button yith-wcqv-button">Quick View</a>
<div class="lynessa product compare-button">
<a href="#" class="compare button">Compare</a></div>
<div class="yith-wcwl-add-to-wishlist">
<div class="yith-wcwl-add-button show">
<a href="#" class="add_to_wishlist">Add to Wishlist</a>
</div>
</div>
</div>
</div>
<div class="product-info">
<h3 class="product-name product_title">
<a href="view-product.php?id=<?php echo $product['id']; ?>"><?php echo $product['name']; ?></a>
</h3>
<span class="price"><span class="lynessa-Price-amount amount"><span
class="lynessa-Price-currencySymbol"></span>89.00</span>LKR<ins><span
class="lynessa-Price-amount amount"><span
class="lynessa-Price-currencySymbol"></span><?php echo $product['price']; ?>.00</span>LKR</ins></span>
<div class="rating-wapper nostar">
<div class="star-rating"><span style="width:0%">Rated <strong
class="rating">0</strong> out of 5</span></div>
<span class="review">(0)</span></div>
</div>
</div>
</div>
<?php
}
?>
</div>
OWL Products
<div class="shop-all">
<a target=" _blank" href="#">Shop All</a>
</div>
</div>
</div>
</div>
</main>
<!-- Start Header -->
<?php include './footer.php'; ?>
<!-- End Header -->
<a href="#" class="backtotop active">
<i class="fa fa-angle-up"></i>
</a>
<script src="assets/js/jquery-1.12.4.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/chosen.min.js"></script>
<script src="assets/js/countdown.min.js"></script>
<script src="assets/js/jquery.scrollbar.min.js"></script>
<script src="assets/js/lightbox.min.js"></script>
<script src="assets/js/magnific-popup.min.js"></script>
<script src="assets/js/slick.js"></script>
<script src="assets/js/jquery.zoom.min.js"></script>
<script src="assets/js/threesixty.min.js"></script>
<script src="assets/js/jquery-ui.min.js"></script>
<script src="assets/js/mobilemenu.js"></script>
<script src="assets/js/functions.js"></script>
<script src="js/add-to-cart.js"></script>
</body>
</html> |