📁 File Manager
Editing:
/home/u882412079/domains/expodivine.com/public_html/category.php
<?php include 'header.php'; if ((isset($_GET['cid'])) && (!empty($_GET['cid']))) { $cat_id = $_GET['cid']; }else{ die(); } $query = $conn->prepare("SELECT * FROM category where id = :cat_id order by id desc"); $query->bindParam(':cat_id',$cat_id); $query->execute(); $cat_result = $query->fetch(); $cat_row = count($cat_result); if (isset($cat_row)) { if ($cat_row>0) { $category_name = $cat_result['category_name']; } } ?> <div class="breadcrumb-area hm-4-padding border-top-2" style="background-image: url(assets/img/product/breadcrumb.jpg);"> <div class="container-fluid"> <div class="breadcrumb-content text-center "> <h2><?php if(!empty($category_name)){echo $category_name; } ?></h2> <ul> <li> <a href="#">home</a> </li> <li><?php if(!empty($category_name)){echo $category_name; } ?></li> </ul> </div> </div> </div> <?php $query = $conn->prepare("SELECT * FROM product where cat_id = :cat_id order by id desc"); $query->bindParam(':cat_id',$cat_id); $query->execute(); $product_result = $query->fetchAll(); $product_row = count($product_result); if (isset($product_row)) { if ($product_row>0) { ?> <div class="product-area pb-80 pt-80"> <div class="container"> <div class="row mt-4"> <?php foreach ($product_result as $value) { $product_id = $value['id']; $img = $value['img']; $hsn = $value['hsn']; $product_name = $value['product_name']; $description = $value['description']; $min_quantity = $value['min_quantity']; $cat_id = $value['cat_id']; ?> <div class="col-md-6 col-lg-4 col-xl-3 mb-4"> <div class="card"> <div class="product-wrapper mb-45"> <div class="product-img"> <a href="product-details.php?pid=<?php echo $product_id; ?>"> <img src="bb-admin/upload/product/<?php echo $img; ?>" alt=""> </a> <!-- <span>Deal of the Day</span> --> </div> <div class="product-content text-center pb-2"> <h4><a href="product-details.php?pid=<?php echo $product_id; ?>" class="font-weight-bold"><?php if (!empty($product_name)) { echo $product_name;} ?></a></h4> <div class="product-price-2"> <span><?php if(!empty($min_quantity)){echo "Min Qty: ".$min_quantity." (Ton)"; } ?></span> </div> </div> </div> </div> </div> <?php } ?> </div> </div> </div> <?php }else{ ?> <div class="product-area pb-80 pt-80"> <div class="container"> <h4>No Product available ...</h4> </div> </div> <?php } } ?> <?php include 'footer.php'; ?>
Save
Cancel