<?php $__env->startSection('body'); ?>
<h3><?php echo $category_name->name; ?></h3>
<hr>
<div class="row">
  <div class="col-sm-2 visible-sm visible-md visible-lg" style="padding-right:0px">
    <div class="panel panel-default">
      <div class="panel-heading"><b>Refine Search</b></div>
      <div class="panel-body">
        <div style="padding:5px">
          <b>Price Range (RM)</b>
          <form method="post" action="/category">
            <input type="hidden" name="category_id" value="<?php echo $category_name->id; ?>">
            <input type="number" name="price_min" class="form-control">to
            <input type="number" name="price_max" class="form-control"><br>
            <button type="submit" class="btn btn-sm btn-warning">Search</button>
          </form>
        </div>
      </div>
    </div>
  </div>
  <div class="col-sm-10 col-xs-12">
    <div class="panel panel-default">
      <div class="panel-heading"><b>All Product</b>
        <a class="pull-right fa fa-2x fa-arrow-circle-right" href="#category_product" data-slide="prev"></a>
        <span class="pull-right">&nbsp;&nbsp;</span>
        <a class="pull-right fa fa-2x fa-arrow-circle-left" href="#category_product" data-slide="next"></a>
      </div>
      <div class="panel-body">
        <?php if(count($category_products)==0): ?>
        <div class="col-sm-2">
          <h5>Product not found.</h5>
        </div>
        <?php endif; ?>
        <div id="category_product" class="carousel slide" data-interval="false">
          <!-- Carousel items -->
          <div class="carousel-inner">
            <?php $count=1; ?>
            <?php foreach($category_products as $category_product): ?>
            <?php if($count%24 == 1): ?>
            <div class="item <?php echo ($count==1)?'active':''; ?>">
              <?php endif; ?>
              <div class="col-sm-3 col-xs-6">
                <div class="thumbnail">
                  <a href="/product/<?php echo $category_product->id; ?>/<?php echo Str::slug($category_product->name); ?>"><img src="/img-product/<?php echo $category_product->imageThumbnail['name']; ?>" alt="<?php echo $category_product->name; ?>" width="199px"></a>
                  <div class="caption">
                    <div class="product-title">
                      <a href="/product/<?php echo $category_product->id; ?>/<?php echo Str::slug($category_product->name); ?>"><?php echo $category_product->subName(); ?></a>
                    </div>
                    <div class="product-title">
                      <a href="/store/<?php echo $category_product->profile_id; ?>/<?php echo Str::slug($category_product->profile->shop_name); ?>" class="shop-name"><?php echo $category_product->profile->shop_name; ?></a>
                    </div>
                    <div class="product-price center">RM <?php echo $category_product->sale_price; ?></div>
                  </div>
                </div>
              </div>
              <?php if ($count%24 == 0): ?></div><?php endif; ?>
              <?php $count++ ?>
              <?php endforeach; ?>
              <?php if ($count%24 != 1): ?> </div> <?php endif; ?>
            </div>
          </div>
        </div>
      </div>

      <!-- END PRODUCT -->

    </div>
  </div>
  <?php $__env->stopSection(); ?>
<?php echo $__env->make('template', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>