<?xml version="1.0" encoding="utf-8"?>
<modification>
  <code>BigshopTheme</code>
  <name>default</name>
  <version>1.0</version>
  <author>HarnishDesign</author>
  <link>http://www.harnishdesign.net</link>
  <file path="catalog/controller/common/header.php">
    <operation info="For Top Menu Brands">
      <search>
        <![CDATA[public function index() {]]>
      </search>
      <add position="after">
        <![CDATA[$this->load->model('catalog/manufacturer');
          $this->load->model('tool/image');
          $results = $this->model_catalog_manufacturer->getManufacturers();
          foreach ($results as $result) {	
          if ($result['image']) {
          $image = $result['image'];
          } else {
          $image = 'no_image.jpg';
          }			
          $data['manufacturers'][] = array(
          'name' => $result['name'],
          'image' => $this->model_tool_image->resize($image, 60, 60),
          'href' => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $result['manufacturer_id'])
          );
          }]]>
      </add>
    </operation>
    <operation info="For Top Menu 3rd Categories">
      <search>
        <![CDATA[$children_data[] = array(]]>
      </search>
      <add position="before">
        <![CDATA[$children_level2 = $this->model_catalog_category->getCategories($child['category_id']);
          $children_data_level2 = array();
          foreach ($children_level2 as $child_level2) {
          $data_level2 = array(
          'filter_category_id'  => $child_level2['category_id'],
          'filter_sub_category' => true
          );
          $product_total_level2 = '';
          //if ($this->config->get('config_product_count')) {
          //		$product_total_level2 = ' (' . $this->model_catalog_product->getTotalProducts($data_level2) . ')';
          //}
          
          $children_data_level2[] = array(
          'name'  =>  $child_level2['name'] . $product_total_level2,
          'href'  => $this->url->link('product/category', 'path=' . $category['category_id']. '_' . $child['category_id'] . '_' . $child_level2['category_id']),
          'id' => $category['category_id']. '_' . $child['category_id']. '_' . $child_level2['category_id']
          );
          }]]>
      </add>
    </operation>
    <operation info="For Top Menu 3rd Categories">
      <search>
        <![CDATA['name'  => $child['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''),]]>
      </search>
      <add position="replace">
        <![CDATA['name'  => $child['name'],]]>
      </add>
    </operation>
    <operation info="For Top Menu 3rd Categories">
      <search>
        <![CDATA['href'  => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'])]]>
      </search>
      <add position="replace">
        <![CDATA['href'  => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']),
          'id' => $category['category_id']. '_' . $child['category_id'],
          'children_level2' => $children_data_level2,]]>
      </add>
    </operation>
    <operation>
      <search>
        <![CDATA[$data['text_checkout'] = $this->language->get('text_checkout');]]>
      </search>
      <add position="after">
        <![CDATA[$data['text_information'] = $this->language->get('text_information');
          $data['text_contact'] = $this->language->get('text_contact');
          $data['text_newsletter'] = $this->language->get('text_newsletter');]]>
      </add>
    </operation>
    <operation>
      <search>
        <![CDATA[$data['checkout'] = $this->url->link('checkout/checkout', '', 'SSL');]]>
      </search>
      <add position="after">
        <![CDATA[$this->load->model('catalog/information');
          $data['informations'] = array();
          foreach ($this->model_catalog_information->getInformations() as $result) {
          if ($result['bottom']) {
          $data['informations'][] = array(
          'title' => $result['title'],
          'href'  => $this->url->link('information/information', 'information_id=' . $result['information_id'])
          );
          }
          }
          
          $data['manufacturer'] = $this->url->link('product/manufacturer');
          $data['newsletter'] = $this->url->link('account/newsletter', '', 'SSL');]]>
      </add>
    </operation>
    <operation info="For Remove autocomplet js from affiliate page">
      <search>
        <![CDATA[$data['name'] = $this->config->get('config_name');]]>
      </search>
      <add position="after">
        <![CDATA[$data['route'] = isset($this->request->get['route']) ? $this->request->get['route'] : 'common/home';]]>
      </add>
    </operation>
    <operation info="For Display Feature box in Only HomePage Header">
      <search>
        <![CDATA[$data['name'] = $this->config->get('config_name');]]>
      </search>
      <add position="after">
        <![CDATA[if (!isset($this->request->get['route']) || $this->request->get['route'] == 'common/home'){
          $data['ishome']=1;
          }]]>
      </add>
    </operation>
  </file>
  <file path="catalog/controller/common/footer.php">
    <operation info="For Display Feature box in Only HomePage footer">
      <search>
        <![CDATA[$this->load->model('catalog/information');]]>
      </search>
      <add position="after">
        <![CDATA[if (!isset($this->request->get['route']) || $this->request->get['route'] == 'common/home'){
          $data['ishome']=1;
          }]]>
      </add>
    </operation>
  </file>
  <file path="catalog/controller/product/category.php">
    <operation info="For Refine Search Category page">
      <search>
        <![CDATA[$data['categories'][] = array(]]>
      </search>
      <add position="before">
        <![CDATA[if(isset($result)){
          $image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_category_width'), $this->config->get('config_image_category_height'));
          }]]>
      </add>
    </operation>
    <operation>
      <search>
        <![CDATA['href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url)]]>
      </search>
      <add position="replace">
        <![CDATA['href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url), 'thumb' => $image]]>
      </add>
    </operation>
  </file>
  <!-- Product Saving in Percentage -->
  <file path="catalog/controller/module/featured.php">
    <operation>
      <search>
        <![CDATA['href'        => $this->url->link('product/product', 'product_id=' . $product_info['product_id'])]]>
      </search>
      <add position="replace">
        <![CDATA['href'    	 => $this->url->link('product/product', 'product_id=' . $product_info['product_id']),
          'saving' => $product_info['price'] == 0 ? 100 : round((($product_info['price'] - $product_info['special'])/$product_info['price'])*100, 0)]]>
      </add>
    </operation>
  </file>
  <file path="catalog/controller/module/bestseller.php">
    <operation>
      <search>
        <![CDATA['href'        => $this->url->link('product/product', 'product_id=' . $result['product_id'])]]>
      </search>
      <add position="replace">
        <![CDATA['href'    	 => $this->url->link('product/product', 'product_id=' . $result['product_id']),
          'saving' => $result['price'] == 0 ? 100 : round((($result['price'] - $result['special'])/$result['price'])*100, 0)]]>
      </add>
    </operation>
  </file>
  <file path="catalog/controller/module/latest.php">
    <operation>
      <search>
        <![CDATA['href'        => $this->url->link('product/product', 'product_id=' . $result['product_id'])]]>
      </search>
      <add position="replace">
        <![CDATA['href'    	 => $this->url->link('product/product', 'product_id=' . $result['product_id']),
          'saving' => $result['price'] == 0 ? 100 : round((($result['price'] - $result['special'])/$result['price'])*100, 0)]]>
      </add>
    </operation>
  </file>
  <file path="catalog/controller/module/special.php">
    <operation>
      <search>
        <![CDATA['href'        => $this->url->link('product/product', 'product_id=' . $result['product_id'])]]>
      </search>
      <add position="replace">
        <![CDATA['href'    	 => $this->url->link('product/product', 'product_id=' . $result['product_id']),
          'saving' => $result['price'] == 0 ? 100 : round((($result['price'] - $result['special'])/$result['price'])*100, 0)]]>
      </add>
    </operation>
  </file>
  <file path="catalog/controller/product/category.php">
    <operation>
      <search>
        <![CDATA['href'        => $this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'] . $url)]]>
      </search>
      <add position="replace">
        <![CDATA['href'        => $this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'] . $url),
          'saving' => $result['price'] == 0 ? 100 : round((($result['price'] - $result['special'])/$result['price'])*100, 0)]]>
      </add>
    </operation>
  </file>
  <file path="catalog/controller/product/manufacturer.php">
    <operation>
      <search>
        <![CDATA['href'        => $this->url->link('product/product', 'manufacturer_id=' . $result['manufacturer_id'] . '&product_id=' . $result['product_id'] . $url)]]>
      </search>
      <add position="replace">
        <![CDATA['href'        => $this->url->link('product/product', 'manufacturer_id=' . $result['manufacturer_id'] . '&product_id=' . $result['product_id'] . $url),
          'saving' => $result['price'] == 0 ? 100 : round((($result['price'] - $result['special'])/$result['price'])*100, 0)]]>
      </add>
    </operation>
  </file>
  <file path="catalog/controller/product/product.php">
    <operation>
      <search>
        <![CDATA['href'        => $this->url->link('product/product', 'product_id=' . $result['product_id'])]]>
      </search>
      <add position="replace">
        <![CDATA['href'        => $this->url->link('product/product', 'product_id=' . $result['product_id']),
          'saving' => $result['price'] == 0 ? 100 : round((($result['price'] - $result['special'])/$result['price'])*100, 0)]]>
      </add>
    </operation>
  </file>
  <file path="catalog/controller/product/search.php">
    <operation>
      <search>
        <![CDATA['href'        => $this->url->link('product/product', 'product_id=' . $result['product_id'] . $url)]]>
      </search>
      <add position="replace">
        <![CDATA['href'        => $this->url->link('product/product', 'product_id=' . $result['product_id'] . $url),
          'saving' => $result['price'] == 0 ? 100 : round((($result['price'] - $result['special'])/$result['price'])*100, 0)]]>
      </add>
    </operation>
  </file>
  <file path="catalog/controller/product/special.php">
    <operation>
      <search>
        <![CDATA['href'        => $this->url->link('product/product', 'product_id=' . $result['product_id'] . $url)]]>
      </search>
      <add position="replace">
        <![CDATA['href'        => $this->url->link('product/product', 'product_id=' . $result['product_id'] . $url),
          'saving' => $result['price'] == 0 ? 100 : round((($result['price'] - $result['special'])/$result['price'])*100, 0)]]>
      </add>
    </operation>
  </file>
  <!-- OwlCarousel CSS & JS -->
  <file path="catalog/controller/module/carousel.php,catalog/controller/module/banner.php">
    <operation>
      <search>
        <![CDATA[$this->document->addStyle('catalog/view/javascript/jquery/owl-carousel/owl.carousel.css');]]>
      </search>
      <add position="replace">
        <![CDATA[$this->document->addStyle('catalog/view/theme/bigshop/stylesheet/owl.carousel.css');]]>
      </add>
    </operation>
  </file>
  <file path="catalog/controller/module/featured.php,catalog/controller/module/latest.php,catalog/controller/module/bestseller.php,catalog/controller/module/special.php">
    <operation>
      <search>
        <![CDATA[$this->load->model('catalog/product');]]>
      </search>
      <add position="before">
        <![CDATA[$this->document->addStyle('catalog/view/theme/bigshop/stylesheet/owl.carousel.css');
          $this->document->addScript('catalog/view/javascript/jquery/owl-carousel/owl.carousel.min.js');]]>
      </add>
    </operation>
  </file>
  <file path="catalog/controller/module/slideshow.php">
    <operation>
      <search>
        <![CDATA[$this->document->addStyle('catalog/view/javascript/jquery/owl-carousel/owl.carousel.css');]]>
      </search>
      <add position="replace">
        <![CDATA[$this->document->addStyle('catalog/view/theme/bigshop/stylesheet/owl.carousel.css');
          $this->document->addScript('catalog/view/javascript/jquery/owl-carousel/owl.carousel.min.js');
          $this->document->addStyle('catalog/view/theme/bigshop/stylesheet/slideshow.min.css');
          $this->document->addScript('catalog/view/theme/bigshop/js/jquery.nivo.slider.pack.js');]]>
      </add>
    </operation>
  </file>
  <file path="catalog/controller/product/product.php">
    <operation>
      <search>
        <![CDATA[foreach ($results as $result) {]]>
      </search>
      <add position="after" index="2">
        <![CDATA[if ($result) {
          $this->document->addStyle('catalog/view/theme/bigshop/stylesheet/owl.carousel.css');
          $this->document->addScript('catalog/view/javascript/jquery/owl-carousel/owl.carousel.min.js');
          }]]>
      </add>
    </operation>
    <operation>
      <search>
        <![CDATA[$data['text_manufacturer'] = $this->language->get('text_manufacturer');]]>
      </search>
      <add position="before">
        <![CDATA[$data['direction'] = $this->language->get('direction');]]>
      </add>
    </operation>
  </file>
  <!--For Stock Color in Product Page-->
  <file path="catalog/view/theme/bigshop/template/product/product.tpl">
    <operation>
      <search>
        <![CDATA[<li><b><?php echo $text_stock; ?></b> <?php echo $stock; ?></li>]]>
      </search>
      <add position="replace">
        <![CDATA[<?php if ($product_info['quantity']<= 0) { ?>
          <li><b><?php echo $text_stock; ?></b> <span style="color:#f00; font-weight:bold;"><?php echo $stock; ?></span></li>
          <?php } else { ?>
          <li><b><?php echo $text_stock; ?></b> <span style="color:#53af2e; font-weight:bold;"><?php echo $stock; ?></span></li>
          <?php } ?>]]>
      </add>
    </operation>
  </file>
  <file path="catalog/controller/product/product.php">
    <operation>
      <search>
        <![CDATA[if ($product_info['quantity'] <= 0) {]]>
      </search>
      <add position="after">
        <![CDATA[$data['product'] = $product_info['quantity'];]]>
      </add>
    </operation>
    <operation>
      <search>
        <![CDATA[$product_info = $this->model_catalog_product->getProduct($product_id);]]>
      </search>
      <add position="after">
        <![CDATA[$data['product_info'] = $product_info;]]>
      </add>
    </operation>
  </file>
  <!-- Rich Snippets -->
  <file path="catalog/language/*/*.php">
    <operation>
      <search>
        <![CDATA[<i class="fa fa-home"></i>]]>
      </search>
      <add position="replace">
        <![CDATA[<i class="fa fa-home"><dd>Home</dd></i>]]>
      </add>
    </operation>
  </file>
  <!-- Save & Stay button for admin -->
  <file path="admin/language/*/*.php">
    <operation>
      <search>
        <![CDATA[<?php]]>
      </search>
      <add position="after">
        <![CDATA[$_['button_save_stay']                 = 'SAVE &amp; STAY';
          $_['result_success']                 = 'Successfully Edited!';]]>
      </add>
    </operation>
  </file>
  <!--Check module position-->
  <file path="catalog/controller/module/special.php,catalog/controller/module/featured.php,catalog/controller/module/bestseller.php,catalog/controller/module/latest.php,catalog/controller/module/bigshop_product_tab.php">
    <operation>
      <search>
        <![CDATA[$this->load->model('tool/image');]]>
      </search>
      <add position="after">
        <![CDATA[$data['module'] = $setting;]]>
      </add>
    </operation>
  </file>
  <file path="catalog/controller/common/content_top.php,catalog/controller/common/content_bottom.php,catalog/controller/common/column_right.php,catalog/controller/common/column_left.php">
    <operation>
      <search>
        <![CDATA[$setting_info = $this->model_extension_module->getModule($part[1]);]]>
      </search>
      <add position="after">
        <![CDATA[$setting_info['position'] = basename(__FILE__, '.php');]]>
      </add>
    </operation>
  </file>
</modification>
