<?php
$this->load->view('wpstemplate/top_header');
$compDets = comp_contact();
$messurement = $this->config->item('unit_measurement');
?>
<!-- Heading Banner--->
<section class="heading_banner" style="background-image: url(<?php echo theme_url(); ?>designer/images/products/products.jpg)">
  <div class="container">
    <div class="row">
      <div class="col-lg-12 text-center">
        <div class="cat_title"><?php echo $cat_res['category_name']; ?></div>
        <div class="clearfix"></div>
        <div class="cat_title2">We Are Available For You</div>
      </div>
    </div>
  </div>
</section>

<!-- Breadcrumb--->
<section class="inner_breadcrumb hidden-xs">
  <div class="container">
    <div class="row">
      <div class="col-lg-12">
        <ul class="breadcrumb">
          <li><a href="<?php echo comp_url(); ?>" title="Home">Home</a></li>
          <li><a href="<?php echo comp_url(); ?>product-listing" title="Our Products">Our Products</a></li>
          <li class="active"><?php echo $cat_res['category_name']; ?></li>
        </ul>
      </div>
    </div>
  </div>
</section>


<!-- Home About--->
<section class="about_page">
  <div class="container">
    <div class="row">
      <div class="col-md-9 col-md-push-3">
        <div class="right_side">
          <h1><?php echo $cat_res['category_name']; ?></h1>
          <div class="wps_right">
            <div class="product_right_image">
              <a href="javascript:void()" data-toggle="modal" data-target="#productID" title="<?php echo $cat_res['category_name']; ?>">
                <div class="product_dimage">
                  <div class="detail_image">
                    <img src="<?php echo get_image('category', $cat_res['category_image'], '250', '250', 'R'); ?>" alt="<?php echo $cat_res['category_name']; ?>" >
                  </div>
                </div>
                <a class="detail_enq_btn getQuote" href="javascript:void()" data-toggle="modal" data-target="#productID" title="<?php echo $cat_res['category_name']; ?>" data-productID="<?php echo $cat_res['category_id']; ?>" data-companyID="<?php echo $compDets['customers_id']; ?>" data-productName="<?php echo $cat_res['category_name']; ?>" data-companyName="<?php echo $compDets['company_name']; ?>" data-ProductDesc="<?php echo char_limiter($cat_res['category_description'], 150); ?>" data-productImage="<?php echo get_image('category', $cat_res['category_image'], '400', '600', 'R'); ?>" data-type='category' data-unit="">Send Enquiry</a>
                <!--<button class="detail_enq_btn" title="Send Enquiry">Send Enquiry</button></a>-->
            </div>
            <?php echo $cat_res['category_description']; ?>

            <div class="clearfix"></div>
            <!-- Products Listing -->
            <?php
            if (is_array($res) && !empty($res)) {
              foreach ($res as $pageVal) {
                ?>
                <div class="product_listing">
                  <div class="col-sm-4 col-xs-12">
                    <div class="product">
                      <a href="<?php echo comp_url() . $pageVal['friendly_url']; ?>" title="<?php echo $pageVal['product_name']; ?>">
                        <div class="image1">
                          <img src="<?php echo get_image('product_images', $pageVal['media'], '200', '200', 'R'); ?>" alt="<?php echo $pageVal['product_name']; ?>" title="<?php echo $pageVal['product_name']; ?>" class="img-responsive">
                        </div>
                      </a>
                    </div>
                  </div>

                  <div class="col-sm-8 col-xs-12">
                    <div class="right-content">
                      <h3><a href="<?php echo comp_url() . $pageVal['friendly_url']; ?>" title="<?php echo $pageVal['product_name']; ?>"><?php echo $pageVal['product_name']; ?></a></h3>
                      <div class="blue-line1"></div>
                      <p><?php echo char_limiter($pageVal['products_description'], 150); ?></p>
                      <a href="<?php echo comp_url() . $pageVal['friendly_url']; ?>" class="read_more_product" title="">Read More <i class="fa fa-long-arrow-right fa-1x"></i></a>
                      <a class="read_more_product getQuote" href="javascript:void()" data-toggle="modal" data-target="#productID" title="<?php echo $pageVal['product_name']; ?>" data-productID="<?php echo $pageVal['products_id']; ?>" data-companyID="<?php echo $pageVal['customers_id']; ?>" data-productName="<?php echo $pageVal['product_name']; ?>" data-companyName="<?php echo $compDets['company_name']; ?>" data-ProductDesc="<?php echo char_limiter($pageVal['products_description'], 150); ?>" data-productImage="<?php echo get_image('product_images', $pageVal['media'], '400', '600', 'R'); ?>" data-type='product' data-unit="<?php echo $messurement[$pageVal['unit_measurement']]; ?>">Send Enquiry</a>

                    </div>
                  </div>
                </div>
                <?php
              }
            }
            ?>
          </div>
        </div>
      </div>

      <div class="col-md-3 col-md-pull-9">
        <?php
        if (is_array($resLeft) && !empty($resLeft)) {
          ?>
          <div class="left_sidebar">
            <div class="left_title">Our Range</div>
            <ul>
              <?php
              foreach ($resLeft as $ck => $pageVal) {
                ?>
                <li><a href="<?php echo site_url() . $pageVal['friendly_url']; ?>" title="<?php echo $pageVal['category_name']; ?>"><?php echo $pageVal['category_name']; ?></a></li>
                <?php
              }
              ?>
            </ul>
          </div>
          <?php
        }
        ?>

        <div id="sticky-anchor"></div>
        <div class="left_sidebar" id="sidebar">
          <div class="left_title">Quick Contact</div>
          <div class="alert alert-warning EmessageBox1" style="display: none;">
            <span class="Emessage1"></span>
          </div>
          <div class="alert alert-success SmessageBox1" style="display: none;">
            <span class="Smessage1"></span>
          </div>
          <form role="form" name="contact-form" method="post" class="quick_form">
            <div class="form-group">
              <input tabindex="101" class="form-control" type="text" name="name" id="name" placeholder="Your Name*" value="" pattern="[a-z A-Z]+" required />
            </div>

            <div class="form-group">
              <input tabindex="102" class="form-control" type="email"  name="email" id="email" placeholder="Your Email ID*" value="" required />
            </div>

            <div class="form-group">
              <input tabindex="103" class="form-control" type="tel" name="mobile" id="mobile" placeholder="Your Phone No*"  maxlength="20" minilength="10" value="" required />
            </div>

            <div class="form-group">
              <input tabindex="104" class="form-control locationLeft" type="text"  name="location" placeholder="Your Location*" id="autocomplete" onfocus="geolocate()" value="" pattern="[a-z A-Z]+" autocomplete="off" required />
            </div>

            <div class="form-group">
              <textarea tabindex="105" class="form-control" name="message" id="message" placeholder="Your Message*" required></textarea>
            </div>

            <div class="form-group" style="margin-bottom: 0;">

            </div>

            <div class="form-group">
              <input type="hidden" name="productId" id="proId" value="<?php echo $cat_res['category_id']; ?>" />
              <input type="hidden" name="productCompID" id="compId" value="<?php echo $compDets['customers_id']; ?>" />
              <input type="hidden" name="type" id="typeId" value="category" />
              <input type="hidden" name="post_url" id="postedUrl" value="<?php echo current_url(); ?>" />
              <button tabindex="107" class="modal_btn" type="submit" name="submit" value="Submit" data-submit="...Sending">Submit</button>
            </div>
          </form>                
        </div>

      </div>

    </div>
  </div>
</section>
<!-- Home Clients -->
<?php echo comp_clients(); ?>
<!-- Footer -->
<?php $this->load->view('wpstemplate/bottom_footer'); ?>
<!-- Product Popup -->