ok

Mini Shell

Direktori : /home2/selectio/www/ramali.in/
Upload File :
Current File : /home2/selectio/www/ramali.in/category.php

<?php include "header.php";
 $category_id = "";
 if($_GET['sub_category']){
     $category_id = $_GET['sub_category'];
 }else{
     $category_id = $_GET['category'];
 }
 
 
   			$statement = $pdo->prepare("SELECT * FROM category");
            $statement->execute();
            $result = $statement->fetchAll(PDO::FETCH_ASSOC);
                
            if($_GET['category']){
                $category_res = $pdo->prepare("SELECT * FROM category WHERE id=".$category_id);
                $category_res->execute();
                $result_cate = $category_res->fetchAll(PDO::FETCH_ASSOC);
            }
            
            
 ?>
 
 


<style>
    .product-action-horizontal .btn-product-icon:hover, .product-action-horizontal .btn-product-icon:active, .product-action-horizontal 
    .btn-product-icon:focus, .product-hidden-details .btn-product-icon:hover, .product-hidden-details .btn-product-icon:active, 
    .product-hidden-details .btn-product-icon:focus, .product-list .product-details .btn-product-icon:hover, .product-list .product-details 
    .btn-product-icon:active, .product-list .product-details .btn-product-icon:focus{
        background-color: #ff0000;
        color: #ffffff;
    }
    
    
    
</style>


        <style>
                        #scroll-top.show {
                bottom: 40px !important;
            }
            
            .product-action-vertical {
                    display: none;
                }
                
        .intro-wrapper {
    margin-top: 2.2rem;
    padding-left: 0px;
}                



    @media (min-width: 340px) and (max-width: 479px) {

        figure.product-media img {
            height: 250px !important;
        }
                h2.title.text-left.appear-animate.mb-5.fadeIn.appear-animation-visible {
            margin-bottom: 0px !important;
        }
        h2.title.text-left.pt-1.mb-5.appear-animate.fadeIn.appear-animation-visible {
        margin-bottom: 25px !important;
        }
        
        
                        figure.category-media {
                width: 100px;
                height: 100px;
            }
            .swiper-slide.category.category-ellipse.swiper-slide-active {
                width: 100px !important;
            }
            .swiper-slide.category.category-ellipse.swiper-slide-next {
            width: 100px !important;
            }

            .swiper-slide.category.category-ellipse {
                width: 100px !important;
            }
            .swiper-container.swiper-theme.icon-box-wrapper.appear-animate.br-sm.mt-6.mb-10.swiper-container-initialized.swiper-container-horizontal.fadeIn.appear-animation-visible {
                margin-bottom: 20px !important;
                margin-top: 15px !important;
            }

            .swiper-container.category-wrapper.swiper-theme.appear-animate.swiper-container-initialized.swiper-container-horizontal.fadeIn.appear-animation-visible {
                margin-bottom: 0px !important;
                margin-top: 0px !important;
                padding-top: 0px !important;
            }
            .swiper-pagination.swiper-pagination-clickable.swiper-pagination-bullets {
                    margin-top: 10px !important;
                }
                .row.banner-product-wrapper.appear-animate.mb-10.fadeIn.appear-animation-visible {
                    margin-bottom: 0px !important;
                }

    }
</style>


 <!-- Start of Main -->
        <main class="main">
            <!-- Start of Breadcrumb -->
            <nav class="breadcrumb-nav">
                <div class="container">
                    <ul class="breadcrumb bb-no">
                        <li><a href="index.php">Home</a></li>
                        <li>Shop</li>
                    </ul>
                </div>
            </nav>
            <!-- End of Breadcrumb -->

            <!-- Start of Page Content -->
            <div class="page-content">
                <div class="container">
                    <!-- Start of Shop Banner -->
                    <div class="shop-default-banner banner d-flex align-items-center mb-5 br-xs"
                        style="<?php  if($result_cate[0]['banner']==""){  ?> background-image: url(images/banner/category-banner.jpg);height: 295px; <?php }else{ ?> background-image: url(images/banner/<?=$result_cate[0]['banner']?>);height: 295px;" <?php } ?> >
                        <div class="banner-content">
                            <!--<h4 class="banner-subtitle font-weight-bold">Accessories Collection</h4>
                            <h3 class="banner-title text-white text-uppercase font-weight-bolder ls-normal">Smart Wrist
                                Watches</h3>
                            <a href="shop-banner-sidebar.html" class="btn btn-dark btn-rounded btn-icon-right">Discover
                                Now<i class="w-icon-long-arrow-right"></i></a>-->
                        </div>
                    </div>
                    <!-- End of Shop Banner -->

                    <!-- Start of Shop Content -->
                    <div class="shop-content row gutter-lg mb-10" style="height: auto;">
                        <!-- Start of Sidebar, Shop Sidebar -->
                        <aside class="sidebar shop-sidebar sticky-sidebar-wrapper sidebar-fixed">
                            <!-- Start of Sidebar Overlay -->
                            <div class="sidebar-overlay"></div>
                            <a class="sidebar-close" href="#"><i class="close-icon"></i></a>

                            <!-- Start of Sidebar Content -->
                            <div class="sidebar-content scrollable">
                                <!-- Start of Sticky Sidebar -->
                                <div class="sticky-sidebar">
                                    <div class="filter-actions">
                                        <label>Filter :</label>
                                        <a href="#" class="btn btn-dark btn-link filter-clean">Clean All</a>
                                    </div>
                                    <!-- Start of Collapsible widget -->
                                    <div class="widget widget-collapsible">
                                        <h3 class="widget-title"><label>All Categories</label></h3>
                                        <ul class="widget-body filter-items search-ul">
                                            
                                            <?php
                                  
                                    			foreach ($result as $row) {
                                            ?>
                                            
                                            <li>
                                                <a href="category.php?category=<?=$row['id']?>">
                                                    <?=$row['name']?>
                                                </a>
                                            </li>
                                            
                                            
                                            <?php } ?>
                                        </ul>
                                    </div>
                                   
                                    <div class="widget widget-collapsible">
                                        <h3 class="widget-title"><label>Size</label></h3>
                                        <ul class="widget-body filter-items item-check mt-1">
                                            <li><a href="#">Extra Large</a></li>
                                            <li><a href="#">Large</a></li>
                                            <li><a href="#">Medium</a></li>
                                            <li><a href="#">Small</a></li>
                                        </ul>
                                    </div>
                                    <!-- End of Collapsible Widget -->
                                </div>
                                <!-- End of Sidebar Content -->
                            </div>
                            <!-- End of Sidebar Content -->
                        </aside>
                        <!-- End of Shop Sidebar -->

                        <!-- Start of Shop Main Content -->
                        <div class="main-content">
                            <nav class="toolbox sticky-toolbox sticky-content fix-top">
                                <div class="toolbox-left">
                                    <a href="#" class="btn btn-primary btn-outline btn-rounded left-sidebar-toggle 
                                        btn-icon-left d-block d-lg-none"><i class="w-icon-category"></i><span>Filters</span></a>
                                </div>
                                <!--<div class="toolbox-right">
                                    <div class="toolbox-item toolbox-show select-box">
                                        <select name="count" class="form-control">
                                            <option value="9">Show 9</option>
                                            <option value="12" selected="selected">Show 12</option>
                                            <option value="24">Show 24</option>
                                            <option value="36">Show 36</option>
                                        </select>
                                    </div>
                                </div>-->
                            </nav>
                            <div class="product-wrapper row cols-md-3 cols-sm-2 cols-2">
                                
                                <?php
                                   
                                    $statement = $pdo->prepare("SELECT products.*,product_variant.price FROM products LEFT JOIN product_variant ON product_variant.product_id=products.id where category_id=$category_id GROUP by product_variant.product_id");
                                    $statement->execute();
                                    $products = $statement->fetchAll(PDO::FETCH_ASSOC);
                                    $totalData = $statement->rowCount();
                                    if($totalData>0){
                                    foreach ($products as $row) {
                                    ?>
                                
                                <div class="product-wrap">
                                    <div class="product text-center">
                                        <figure class="product-media">
                                            <a href="product-details.php?products=<?=$row['id']?>">
                                                <img src="dashboard/<?=$row['image'] ?>" alt="Product" width="300"
                                                    height="338" style="height: 378px;">
                                            </a>
                                            <div class="product-action-horizontal" style="background: none !important;">
                                                <span href="#" id="items_<?=$row['id']?>" onclick="Quick_AddToCart('<?=$row['id']?>')" class="btn-product-icon btn-cart w-icon-cart" title="Add to cart" style="border-radius: 20px;"></span>
                                            </div>
                                        </figure>
                                        <div class="product-details">
                                            <!--<div class="product-cat">
                                                <a href="shop-banner-sidebar.html">Electronics</a>
                                            </div>-->
                                            <h3 class="product-name">
                                                <a href="#"><?=$row['name']?></a>
                                            </h3>
                                            <div class="ratings-container">
                                                <div class="ratings-full">
                                                    <span class="ratings" style="width: 100%;"></span>
                                                    <span class="tooltiptext tooltip-top"></span>
                                                </div>
                                                <a href="#" class="rating-reviews">(3 reviews)</a>
                                            </div>
                                            <div class="product-pa-wrapper">
                                                <div class="product-price">
                                                    <i class="bi bi-currency-rupee"></i>
                                                    <?=$row['price']?>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                
                                <?php } ?>
                                
                               </div> 
                                
                                    <div class="toolbox toolbox-pagination justify-content-between">
                                <p class="showing-info mb-2 mb-sm-0">
                                    Showing<span>1-12 of 60</span>Products
                                </p>
                                <ul class="pagination">
                                    <li class="prev disabled">
                                        <a href="#" aria-label="Previous" tabindex="-1" aria-disabled="true">
                                            <i class="w-icon-long-arrow-left"></i>Prev
                                        </a>
                                    </li>
                                    <li class="page-item active">
                                        <a class="page-link" href="#">1</a>
                                    </li>
                                    <li class="page-item">
                                        <a class="page-link" href="#">2</a>
                                    </li>
                                    <li class="next">
                                        <a href="#" aria-label="Next">
                                            Next<i class="w-icon-long-arrow-right"></i>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                            
                            
                                <?php }else {?>
                                <div class="col=lg-12">
                                    <img src="images/product/no-products.png" style="margin-left: 90%;margin-top: 50%;">
                                </div>
                                
                                <?php } ?>
                            

                        
                        </div>
                        <!-- End of Shop Main Content -->
                    </div>
                    <!-- End of Shop Content -->
                </div>
            </div>
            <!-- End of Page Content -->
        </main>
        <!-- End of Main -->

<?php include "footer.php"?>

Zerion Mini Shell 1.0