/home/hdwebsolution/www/sareenn/application/views/products_by_category.php
<!-- Start Page Title Area -->
<section class="page-title-area" style="background-image:url('<?php echo base_url(); ?>assets/img/category.jpg')">
    <div class="container">
        <div class="page-title-content">
            <p style="font-size:25px; color:#f2f2f2;">Products By Category</p>
            <ul>
                <li><a href="#">Home</a></li>
                <li>Products By Category</li>
            </ul>
        </div>
    </div>
</section>
<!-- End Page Title Area -->

<!-- Start Products Area -->
<section class="products-area products-collections-area ptb-70">
    <div class="container-fluid">
        <div class="row">
            <div class="col-lg-3 col-md-12">
                <div class="woocommerce-widget-area">
                    <!-- <div class="woocommerce-widget price-list-widget">
                        <h3 class="woocommerce-widget-title">Filter By Price</h3>

                        <div class="collection-filter-by-price">
                            <input class="js-range-of-price" type="text" data-min="0" data-max="1055" name="filter_by_price" data-step="10">
                        </div>
                    </div> -->

                    <!--<div class="woocommerce-widget color-list-widget">
                                <h3 class="woocommerce-widget-title">Color</h3>

                                <ul class="color-list-row">
                                    <li class="active"><a href="#" title="Black" class="color-black"></a></li>
                                    <li><a href="#" title="Red" class="color-red"></a></li>
                                    <li><a href="#" title="Yellow" class="color-yellow"></a></li>
                                    <li><a href="#" title="White" class="color-white"></a></li>
                                    <li><a href="#" title="Blue" class="color-blue"></a></li>
                                    <li><a href="#" title="Green" class="color-green"></a></li>
                                    <li><a href="#" title="Yellow Green" class="color-yellowgreen"></a></li>
                                    <li><a href="#" title="Pink" class="color-pink"></a></li>
                                    <li><a href="#" title="Violet" class="color-violet"></a></li>
                                    <li><a href="#" title="Blue Violet" class="color-blueviolet"></a></li>
                                    <li><a href="#" title="Lime" class="color-lime"></a></li>
                                    <li><a href="#" title="Plum" class="color-plum"></a></li>
                                    <li><a href="#" title="Teal" class="color-teal"></a></li>
                                </ul>
                            </div> -->

                    <div class="woocommerce-widget brands-list-widget">
                        <h3 class="woocommerce-widget-title">Categories</h3>

                        <ul class="brands-list-row">
                            <?php $categories = get_active_categories();

                            foreach ($categories as $c) : ?>

                                <li class="<?php echo ($c['id'] == $category->id) ? 'active' : ''; ?>"><a href="<?php echo base_url(); ?>category/<?php echo $c['id']; ?>/<?php echo $c['category_slug']; ?>"><?php echo $c['category_name']; ?></a></li>
                            <?php endforeach; ?>
                        </ul>
                    </div>

                    <!-- <div class=" woocommerce-widget woocommerce-ads-widget">
                        <img src="assets/img/ads.jpg" alt="image">

                        <div class="content">
                            <span>New Arrivals</span>
                            <h3>Modern Electronic Thermometer</h3>
                            <a href="#" class="default-btn"><i class="flaticon-trolley"></i> Shop Now</a>
                        </div>

                        <a href="#" class="link-btn"></a>
                    </div> -->

                    <?php $best_selling_products = get_active_best_selling_limited_products('3');
                    if ($best_selling_products) :
                    ?>

                        <div class="woocommerce-widget best-seller-widget">
                            <h3 class="woocommerce-widget-title">Best Seller</h3>

                            <?php foreach ($best_selling_products as $bs) : ?>

                                <article class="item">
                                    <a href="<?php echo base_url(); ?>product/<?php echo $bs['id']; ?>/<?php echo $bs['product_slug']; ?>" class="thumb">
                                        <span class="fullimage cover bg1" role="img"></span>
                                    </a>

                                    <div class="info">
                                        <h4 class="title usmall"><a href="<?php echo base_url(); ?>product/<?php echo $bs['id']; ?>/<?php echo $bs['product_slug']; ?>"><?php echo $bs['product_name']; ?></a></h4>
                                        <!-- <span>$99.00</span> -->
                                        <!-- <div class="rating">
                                            <i class='bx bxs-star'></i>
                                            <i class='bx bxs-star'></i>
                                            <i class='bx bxs-star'></i>
                                            <i class='bx bxs-star'></i>
                                            <i class='bx bxs-star'></i>
                                        </div> -->
                                    </div>
                                    <div class="clear"></div>
                                </article>

                            <?php endforeach; ?>
                        </div>

                    <?php endif; ?>
                </div>
            </div>

            <div class="col-lg-9 col-md-12">
                <div class="row">
                    <div class="col-lg-12 col-md-12 product-category-heading">
                        <h1 class=""><?php echo $category->category_name; ?></h1>
                        <div class="category-line"></div>
                        <p><?php echo $category->category_description; ?></p>
                    </div>
                    <div class="drodo-grid-sorting col-lg-12 col-md-12 result-count align-items-center">
                        <div class="#">
                            <p>We found <span class="count"><?php echo count($products); ?></span> products available for you</p>

                            <span class="sub-title d-lg-none"><a href="#" data-toggle="modal" data-target="#productsFilterModal"><i class='bx bx-filter-alt'></i> Filter</a></span>
                        </div>

                        <!-- <div class="col-lg-6 col-md-6 ordering">
							<div class="select-box">
								<label>Sort By:</label>
								<select>
									<option>Default</option>
									<option>Popularity</option>
									<option>Latest</option>
									<option>Price: low to high</option>
									<option>Price: high to low</option>
								</select>
							</div>
						</div> -->
                    </div>
                    <div class="col-lg-12 col-md-12">

                        <div class="row ">

                            <?php foreach ($products as $product) : ?>

                                <div class="col-lg-3 col-md-4 col-sm-6 mb-30">
                                    <div class="single-products-box ">
                                        <div class="image lc_product_image_fixed">
                                            <!-- <a href="<?php echo base_url(); ?>product/<?php echo $product['id']; ?>/<?php echo $product['product_slug']; ?>" class="d-block"><img src="https://via.placeholder.com/300x500" alt="image"></a> -->
                                            <a href="<?php echo base_url(); ?>product/<?php echo $product['id']; ?>/<?php echo $product['product_slug']; ?>" class="d-block"><img src="<?php echo base_url(); ?>assets/images/products/<?php echo $product['product_image']; ?>" alt="image"></a>

                                            <div class="buttons-list">
                                                <ul>
                                                    <li>
                                                        <div class="cart-btn">
                                                            <a href="tel:+919911199258">
                                                                <i class='bx bx-phone'></i>
                                                                <span class="tooltip-label">Call Now</span>
                                                            </a>
                                                        </div>
                                                    </li>
                                                    <li>
                                                        <div class="wishlist-btn">
                                                            <a href="https://wa.me/919911199258?text=I want to order" target="_blank">
                                                                <i class='bx bxl-whatsapp'></i>
                                                                <span class="tooltip-label">Whatsapp Now</span>
                                                            </a>
                                                        </div>
                                                    </li>
                                                    <li>
                                                        <!-- data-toggle="modal" data-target="#productsQuickView"  -->
                                                        <div class="quick-view-btn">
                                                            <a href="#" id="lc_product_quick_view" onclick="lc_product_quick_view(<?php echo $product['id']; ?>, event)">
                                                                <i class='bx bx-search-alt'></i>
                                                                <span class="tooltip-label">Quick View</span>
                                                            </a>
                                                        </div>
                                                    </li>
                                                </ul>
                                            </div>
                                        </div>

                                        <div class="content ">
                                            <h6 style="text-align:center; font-weight: 600;"><a href="<?php echo base_url(); ?>product/<?php echo $product['id']; ?>/<?php echo $product['product_slug']; ?>"><?php echo $product['product_name']; ?></a></h6>
                                            <!-- <div class="price">
												<span class="new-price">$139.00</span>
											</div> -->
                                        </div>
                                    </div>
                                </div>


                            <?php endforeach;
                            ?>

                            <!-- <div class="col-lg-12 col-md-12">
								<div class="pagination-area text-center">
									<a href="#" class="prev page-numbers"><i class='bx bx-chevrons-left'></i></a>
									<span class="page-numbers current" aria-current="page">1</span>
									<a href="#" class="page-numbers">2</a>
									<a href="#" class="page-numbers">3</a>
									<a href="#" class="page-numbers">4</a>
									<a href="#" class="next page-numbers"><i class='bx bx-chevrons-right'></i></a>
								</div>
							</div> -->
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<!-- End Products Area -->