Перейти до вмісту
Пошук в
  • Детальніше...
Шукати результати, які ...
Шукати результати в ...

PHP Notice: Undefined variable: result in


Zapuzin

Recommended Posts

Здравствуйте.

ocStore-1.5.5.1.2. Шаблон OC Default 2.0. Установлено много модулей, в частности и Product Display Settings vqmod. Все они адаптированы, и работают отлично. Ошибок как в системных логах, так и в vqmod не было.

Ошибки начали возникать, связанные с "product-display-settings.xml" когда появился файл "product_statuses.xml" нового модуля "Статусы Товара PRO Speed, автостатусы, стикеры, текстовые статусы". Во время экспериментальных правок "product-display-settings.xml", все ошибки отлавливались, и исправлялись. Кеш после каждой правки чистился весь (системный, vqmod).

Так же установлен и "filterpro_v2.4.4(seo)", который после адаптации нормально работает с "Product Display Settings" , но с одной проблемкой, которую пытаюсь решить в "[Поддержка] filter Pro".

Вот эти неуловимые ошибки )

Спойлер

2019-07-15 0:59:07 - PHP Notice:  Undefined variable: result in /home/teploplc/public_html/vqmod/vqcache/vq2-catalog_controller_product_manufacturer.php on line 386
2019-07-15 0:59:07 - PHP Notice:  Undefined variable: result in /home/teploplc/public_html/vqmod/vqcache/vq2-catalog_controller_product_manufacturer.php on line 387
2019-07-15 10:57:34 - PHP Notice:  Undefined variable: result in /home/teploplc/public_html/vqmod/vqcache/vq2-catalog_controller_product_category.php on line 404
2019-07-15 10:57:34 - PHP Notice:  Undefined variable: result in /home/teploplc/public_html/vqmod/vqcache/vq2-catalog_controller_product_category.php on line 405

 

Вот файлы, которые смотрел для устранения этих ошибок:

       1. Весь "product-display-settings.xml"

Спойлер

<!-- Created using vQmod XML Generator by UKSB - http://www.opencart-extensions.co.uk //-->
<modification>
	<id><![CDATA[Product Display Settings]]></id>
	<version><![CDATA[1.2]]></version>
	<vqmver><![CDATA[2.1.5]]></vqmver>
	<author><![CDATA[Flo from shopencart.com, edited by drbogger]]></author>
	<file name="admin/controller/setting/setting.php">
		<operation>
			<search position="before" error="log"><![CDATA[if (isset($this->request->post['config_logo'])) {]]></search>
			<add><![CDATA[ //product display settings		
		if (isset($this->request->post['config_display_sku'])) {
			$this->data['config_display_sku'] = $this->request->post['config_display_sku'];
		} else {
			$this->data['config_display_sku'] = $this->config->get('config_display_sku');
		}
		if (isset($this->request->post['config_display_pweight'])) {
			$this->data['config_display_pweight'] = $this->request->post['config_display_pweight'];
		} else {
			$this->data['config_display_pweight'] = $this->config->get('config_display_pweight');
		}
        if (isset($this->request->post['config_display_skup'])) {
			$this->data['config_display_skup'] = $this->request->post['config_display_skup'];
		} else {
			$this->data['config_display_skup'] = $this->config->get('config_display_skup');
		}
		if (isset($this->request->post['config_display_model'])) {
			$this->data['config_display_model'] = $this->request->post['config_display_model'];
		} else {
			$this->data['config_display_model'] = $this->config->get('config_display_model');
		}
		if (isset($this->request->post['config_display_modelp'])) {
			$this->data['config_display_modelp'] = $this->request->post['config_display_modelp'];
		} else {
			$this->data['config_display_modelp'] = $this->config->get('config_display_modelp');
		}
		if (isset($this->request->post['config_display_brand'])) {
			$this->data['config_display_brand'] = $this->request->post['config_display_brand'];
		} else {
			$this->data['config_display_brand'] = $this->config->get('config_display_brand');
		}
		if (isset($this->request->post['config_display_brandp'])) {
			$this->data['config_display_brandp'] = $this->request->post['config_display_brandp'];
		} else {
			$this->data['config_display_brandp'] = $this->config->get('config_display_brandp');
		}
		if (isset($this->request->post['config_display_rewardsp'])) {
			$this->data['config_display_rewardsp'] = $this->request->post['config_display_rewardsp'];
		} else {
			$this->data['config_display_rewardsp'] = $this->config->get('config_display_rewardsp');
		}
		if (isset($this->request->post['config_display_location'])) {
			$this->data['config_display_location'] = $this->request->post['config_display_location'];
		} else {
			$this->data['config_display_location'] = $this->config->get('config_display_location');
		}
                if (isset($this->request->post['config_display_locationp'])) {
			$this->data['config_display_locationp'] = $this->request->post['config_display_locationp'];
		} else {
			$this->data['config_display_locationp'] = $this->config->get('config_display_locationp');
		}
		if (isset($this->request->post['config_display_listock'])) {
			$this->data['config_display_listock'] = $this->request->post['config_display_listock'];
		} else {
			$this->data['config_display_listock'] = $this->config->get('config_display_listock');
		}
			if (isset($this->request->post['config_display_upc'])) {
			$this->data['config_display_upc'] = $this->request->post['config_display_upc'];
		} else {
			$this->data['config_display_upc'] = $this->config->get('config_display_upc');
		}
	        if (isset($this->request->post['config_display_upcp'])) {
			$this->data['config_display_upcp'] = $this->request->post['config_display_upcp'];
		} else {
			$this->data['config_display_upcp'] = $this->config->get('config_display_upcp');
		}
		//end of product display options]]></add>
		</operation>
	</file>
	<file name="admin/view/template/setting/setting.tpl">
		<operation>
			<search position="after"><![CDATA[<div id="tab-option">]]></search>
			<add><![CDATA[<table class="form">
			<tr>
              <td>Бонусные баллы на странице товара?</td>
              <td><?php if ($config_display_rewardsp) { ?>
                <input type="radio" name="config_display_rewardsp" value="1" checked="checked" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_rewardsp" value="0" />
                <?php echo $text_no; ?>
                <?php } else { ?>
                <input type="radio" name="config_display_rewardsp" value="1" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_rewardsp" value="0" checked="checked" />
                <?php echo $text_no; ?>
                <?php } ?></td>
            </tr>
			<tr>
              <td>Вес на странице товара?</td>
              <td><?php if ($config_display_pweight) { ?>
                <input type="radio" name="config_display_pweight" value="1" checked="checked" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_pweight" value="0" />
                <?php echo $text_no; ?>
                <?php } else { ?>
                <input type="radio" name="config_display_pweight" value="1" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_pweight" value="0" checked="checked" />
                <?php echo $text_no; ?>
                <?php } ?></td>
            </tr>
			<tr>
              <td>SKU на странице товара?</td>
              <td><?php if ($config_display_sku) { ?>
                <input type="radio" name="config_display_sku" value="1" checked="checked" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_sku" value="0" />
                <?php echo $text_no; ?>
                <?php } else { ?>
                <input type="radio" name="config_display_sku" value="1" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_sku" value="0" checked="checked" />
                <?php echo $text_no; ?>
                <?php } ?></td>
            </tr>
			<tr>
              <td>SKU на странице категории?</td>
              <td><?php if ($config_display_skup) { ?>
                <input type="radio" name="config_display_skup" value="1" checked="checked" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_skup" value="0" />
                <?php echo $text_no; ?>
                <?php } else { ?>
                <input type="radio" name="config_display_skup" value="1" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_skup" value="0" checked="checked" />
                <?php echo $text_no; ?>
                <?php } ?></td>
            </tr>
			<tr>
              <td>Код товара на странице категории?</td>
              <td><?php if ($config_display_model) { ?>
                <input type="radio" name="config_display_model" value="1" checked="checked" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_model" value="0" />
                <?php echo $text_no; ?>
                <?php } else { ?>
                <input type="radio" name="config_display_model" value="1" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_model" value="0" checked="checked" />
                <?php echo $text_no; ?>
                <?php } ?></td>
            </tr>
			<tr>
              <td>Код товара на странице товара?</td>
              <td><?php if ($config_display_modelp) { ?>
                <input type="radio" name="config_display_modelp" value="1" checked="checked" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_modelp" value="0" />
                <?php echo $text_no; ?>
                <?php } else { ?>
                <input type="radio" name="config_display_modelp" value="1" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_modelp" value="0" checked="checked" />
                <?php echo $text_no; ?>
                <?php } ?></td>
            </tr>
			<tr>
              <td>Бренд на странице категории?</td>
              <td><?php if ($config_display_brand) { ?>
                <input type="radio" name="config_display_brand" value="1" checked="checked" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_brand" value="0" />
                <?php echo $text_no; ?>
                <?php } else { ?>
                <input type="radio" name="config_display_brand" value="1" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_brand" value="0" checked="checked" />
                <?php echo $text_no; ?>
                <?php } ?></td>
            </tr>
			<tr>
              <td>Бренд на странице товара?</td>
              <td><?php if ($config_display_brandp) { ?>
                <input type="radio" name="config_display_brandp" value="1" checked="checked" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_brandp" value="0" />
                <?php echo $text_no; ?>
                <?php } else { ?>
                <input type="radio" name="config_display_brandp" value="1" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_brandp" value="0" checked="checked" />
                <?php echo $text_no; ?>
                <?php } ?></td>
            </tr>
			<tr>
              <td>Гарантия на странице категории?</td>
              <td><?php if ($config_display_location) { ?>
                <input type="radio" name="config_display_location" value="1" checked="checked" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_location" value="0" />
                <?php echo $text_no; ?>
                <?php } else { ?>
                <input type="radio" name="config_display_location" value="1" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_location" value="0" checked="checked" />
                <?php echo $text_no; ?>
                <?php } ?></td>
            </tr><tr>
              <td>Гарантия на странице товара?</td>
              <td><?php if ($config_display_locationp) { ?>
                <input type="radio" name="config_display_locationp" value="1" checked="checked" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_locationp" value="0" />
                <?php echo $text_no; ?>
                <?php } else { ?>
                <input type="radio" name="config_display_locationp" value="1" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_locationp" value="0" checked="checked" />
                <?php echo $text_no; ?>
                <?php } ?></td>
            </tr>
			<tr>
              <td>UPC на странице категории?</td>
              <td><?php if ($config_display_upc) { ?>
                <input type="radio" name="config_display_upc" value="1" checked="checked" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_upc" value="0" />
                <?php echo $text_no; ?>
                <?php } else { ?>
                <input type="radio" name="config_display_upc" value="1" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_upc" value="0" checked="checked" />
                <?php echo $text_no; ?>
                <?php } ?></td>
            </tr><tr>
              <td>UPC на странице товара?</td>
              <td><?php if ($config_display_upcp) { ?>
                <input type="radio" name="config_display_upcp" value="1" checked="checked" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_upcp" value="0" />
                <?php echo $text_no; ?>
                <?php } else { ?>
                <input type="radio" name="config_display_upcp" value="1" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_upcp" value="0" checked="checked" />
                <?php echo $text_no; ?>
                <?php } ?></td>
            </tr>
			<tr>
              <td>Наличие товара на странице категории?</td>
              <td><?php if ($config_display_listock) { ?>
                <input type="radio" name="config_display_listock" value="1" checked="checked" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_listock" value="0" />
                <?php echo $text_no; ?>
                <?php } else { ?>
                <input type="radio" name="config_display_listock" value="1" />
                <?php echo $text_yes; ?>
                <input type="radio" name="config_display_listock" value="0" checked="checked" />
                <?php echo $text_no; ?>
                <?php } ?></td>
            </tr></table>]]></add>
		</operation>
	</file>
	<file name="catalog/controller/product/product.php">
		<operation>
			<search position="after"><![CDATA[$this->data['points'] = $product_info['points'];]]></search>
			<add><![CDATA[//product display options
$this->language->load('product/pds');
$this->data['pds_model'] = $this->language->get('pds_model');
$this->data['pds_sku'] = $this->language->get('pds_sku');
$this->data['pds_upc'] = $this->language->get('pds_upc');
$this->data['pds_weight'] = $this->language->get('pds_weight');
$this->data['pds_location'] = $this->language->get('pds_location');
			$this->data['sku'] = $product_info['sku'];
			$this->data['upc'] = $product_info['upc'];
			$this->data['location'] = $product_info['location'];
			if ($product_info['weight']) {
			$this->data['weight'] = $this->weight->format($product_info['weight'], $product_info['weight_class_id'], $this->language->get('decimal_point'), $this->language->get('thousand_point'));
			} else {
				$this->data['weight'] = '';
			}
			]]></add>
		</operation>
	</file>
	<file name="catalog/view/theme/*/template/product/product.tpl">
		<operation>
			<search position="after"><![CDATA[<span><?php echo $text_model; ?></span> <?php echo $model; ?><br />]]></search>
			<add><![CDATA[<?php if ($this->config->get('config_display_skup') && $sku) { ?>
		<span><?php echo $pds_sku; ?> </span> <?php echo $sku; ?><br />
		<?php } ?>
		<?php if ($this->config->get('config_display_upcp') && $upc) { ?>
		<span><?php echo $pds_upc; ?> </span> <?php echo $upc; ?><br />
		<?php } ?>
		<?php if ($this->config->get('config_display_locationp') && $location) { ?>
		<span><?php echo $pds_location; ?> </span> <?php echo $location; ?><br />
		<?php } ?>
		<?php if ($this->config->get('config_display_pweight') && $weight) { ?>
		<span><?php echo $pds_weight; ?> </span> <?php echo $weight; ?><br />
		<?php } ?>
		]]></add>
		</operation>
		<operation>
			<search position="replace"><![CDATA[<?php if ($manufacturer) { ?>]]></search>
			<add><![CDATA[<?php if ($this->config->get('config_display_brandp') && $manufacturer) { ?>]]></add>
		</operation>
		<operation>
			<search position="replace"><![CDATA[<?php if ($reward) { ?>]]></search>
			<add><![CDATA[<?php if ($this->config->get('config_display_rewardsp') && $reward) { ?>]]></add>
		</operation>
		<operation>
			<search position="replace"><![CDATA[<span><?php echo $text_model; ?></span> <?php echo $model; ?><br />]]></search>
			<add><![CDATA[<?php if ($this->config->get('config_display_modelp')) { ?>
			<span><?php echo $pds_model; ?></span> <?php echo $model; ?><br />
			<?php } ?>]]></add>
		</operation>
	</file>
	<file name="catalog/controller/product/category.php">
		<operation>
			<search position="before"><![CDATA[if ($this->config->get('config_review_status')) {]]></search>
			<add><![CDATA[if ($product_total != 0)  {
			if ($result['quantity'] <= 0) {
                $rstock = $result['stock_status'];
                } elseif ($this->config->get('config_stock_display')) {
                $rstock = $result['quantity'];
                } else {
                $rstock = $this->language->get('pds_instock');
                }}]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA['name'        => $result['name'],]]></search>
			<add><![CDATA[//produc display settings
					'sku'         => $result['sku'],
					'model'       => $result['model'],
					'brand'       => $result['manufacturer'],
					'location'    => $result['location'],
					'upc'         => $result['upc'],
					'stock'       => $rstock,
					'brand_url'   => $this->url->link('product/manufacturer/product', 'manufacturer_id=' . $result['manufacturer_id']),
					//end pds]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA[$this->data['text_grid'] = $this->language->get('text_grid');]]></search>
			<add><![CDATA[$this->language->load('product/pds');
$this->data['pds_sku'] = $this->language->get('pds_sku');
$this->data['pds_upc'] = $this->language->get('pds_upc');
$this->data['pds_location'] = $this->language->get('pds_location');
$this->data['pds_model'] = $this->language->get('pds_model');
$this->data['pds_brand'] = $this->language->get('pds_brand');
$this->data['pds_stock'] = $this->language->get('pds_stock');]]></add>
		</operation>
	</file>
	<file name="catalog/controller/product/search.php">
		<operation>
			<search position="before"><![CDATA[if ($this->config->get('config_review_status')) {]]></search>
			<add><![CDATA[if ($product_total != 0)  {
			if ($result['quantity'] <= 0) {
                $rstock = $result['stock_status'];
                } elseif ($this->config->get('config_stock_display')) {
                $rstock = $result['quantity'];
                } else {
                $rstock = $this->language->get('pds_instock');
                }}]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA['name'        => $result['name'],]]></search>
			<add><![CDATA[//produc display settings
					'sku'         => $result['sku'],
					'model'       => $result['model'],
					'brand'       => $result['manufacturer'],
					'location'    => $result['location'],
					'upc'         => $result['upc'],
					'stock'        => $rstock,
					'brand_url'   => $this->url->link('product/manufacturer/product', 'manufacturer_id=' . $result['manufacturer_id']),
					//end pds]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA[$this->data['text_grid'] = $this->language->get('text_grid');]]></search>
			<add><![CDATA[$this->language->load('product/pds');
$this->data['pds_sku'] = $this->language->get('pds_sku');
$this->data['pds_upc'] = $this->language->get('pds_upc');
$this->data['pds_location'] = $this->language->get('pds_location');
$this->data['pds_model'] = $this->language->get('pds_model');
$this->data['pds_brand'] = $this->language->get('pds_brand');
$this->data['pds_stock'] = $this->language->get('pds_stock');]]></add>
		</operation>
	</file>
	<file name="catalog/controller/product/manufacturer.php">
		<operation>
			<search position="before"><![CDATA[if ($this->config->get('config_review_status')) {]]></search>
			<add><![CDATA[if ($product_total != 0)  {
			if ($result['quantity'] <= 0) {
                $rstock = $result['stock_status'];
                } elseif ($this->config->get('config_stock_display')) {
                $rstock = $result['quantity'];
                } else {
                $rstock = $this->language->get('pds_instock');
                }}]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA['name'        => $result['name'],]]></search>
			<add><![CDATA[//produc display settings
					'sku'         => $result['sku'],
					'model'       => $result['model'],
					'brand'       => $result['manufacturer'],
					'location'    => $result['location'],
					'upc'         => $result['upc'],
					'stock'       => $rstock,
					'brand_url'   => $this->url->link('product/manufacturer/product', 'manufacturer_id=' . $result['manufacturer_id']),
					//end pds]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA[$this->data['text_grid'] = $this->language->get('text_grid');]]></search>
			<add><![CDATA[$this->language->load('product/pds');
$this->data['pds_sku'] = $this->language->get('pds_sku');
$this->data['pds_upc'] = $this->language->get('pds_upc');
$this->data['pds_location'] = $this->language->get('pds_location');
$this->data['pds_model'] = $this->language->get('pds_model');
$this->data['pds_brand'] = $this->language->get('pds_brand');
$this->data['pds_stock'] = $this->language->get('pds_stock');]]></add>
		</operation>
	</file>
	<file name="catalog/controller/product/special.php">
		<operation>
			<search position="before"><![CDATA[if ($this->config->get('config_review_status')) {]]></search>
			<add><![CDATA[if ($product_total != 0)  {
			if ($result['quantity'] <= 0) {
                $rstock = $result['stock_status'];
                } elseif ($this->config->get('config_stock_display')) {
                $rstock = $result['quantity'];
                } else {
                $rstock = $this->language->get('pds_instock');
                }}]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA['name'        => $result['name'],]]></search>
			<add><![CDATA[//produc display settings
					'sku'         => $result['sku'],
					'model'       => $result['model'],
					'brand'       => $result['manufacturer'],
					'location'    => $result['location'],
					'upc'         => $result['upc'],
					'stock'        => $rstock,
					'brand_url'   => $this->url->link('product/manufacturer/product', 'manufacturer_id=' . $result['manufacturer_id']),
					//end pds]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA[$this->data['text_grid'] = $this->language->get('text_grid');]]></search>
			<add><![CDATA[$this->language->load('product/pds');
$this->data['pds_sku'] = $this->language->get('pds_sku');
$this->data['pds_upc'] = $this->language->get('pds_upc');
$this->data['pds_location'] = $this->language->get('pds_location');
$this->data['pds_model'] = $this->language->get('pds_model');
$this->data['pds_brand'] = $this->language->get('pds_brand');
$this->data['pds_stock'] = $this->language->get('pds_stock');]]></add>
		</operation>
	</file>
	<file name="catalog/view/theme/*/template/product/search.tpl">
		<operation>
			<search position="after"><![CDATA[<div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>]]></search>
			<add><![CDATA[<div class="extra" style="display: inline-block; color: #444;">

	  <?php if ($this->config->get('config_display_sku') && $product['sku']) { ?> 

	  <span style="color:#38b0e3"><?php echo $pds_sku; ?></span> <?php echo $product['sku']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_model') && $product['model']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_model; ?></span> <?php echo $product['model']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_brand') && $product['brand']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_brand; ?></span> <a href="<?php echo $product['brand_url']; ?>"><?php echo $product['brand']; ?></a> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_location') && $product['location']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_location; ?></span> <?php echo $product['location']; ?> <br />

	  <?php } ?>

	  <?php if ($product['upc'] && $this->config->get('config_display_upc')) { ?> 

	  <span style="color:#38b0e3"><?php echo $pds_upc; ?></span> <?php echo $product['upc']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_listock') && $product['stock']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_stock; ?></span> <?php echo $product['stock']; ?> <br />

	  <?php } ?>

	  </div>]]></add>
		</operation>
		<operation>
			<search position="before"><![CDATA[html += '  <div class="name">' + $(element).find('.name').html() + '</div>';]]></search>
			<add><![CDATA[html += '<div class="extra" style="display: inline-block; color: #444; position: absolute; transform: translate(-165px, 195px); -webkit-transform: translate(-165px, 195px); -o-transform: translate(-165px, 195px); -moz-transform: translate(-165px, 195px); font-size: 14px;">' + $(element).find('.extra').html() + '</div>';]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA[html += '<div class="name">' + $(element).find('.name').html() + '</div>';]]></search>
			<add><![CDATA[html += '<div class="extra" style="display: inline-block; color: #444;">' + $(element).find('.extra').html() + '</div>';]]></add>
		</operation>
	</file>
	<file name="catalog/view/theme/*/template/product/category.tpl">
		<operation>
			<search position="after"><![CDATA[<div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>]]></search>
			<add><![CDATA[<div class="extra" style="display: inline-block; color: #444;">

	  <?php if ($this->config->get('config_display_sku') && $product['sku']) { ?> 

	  <span style="color:#38b0e3"><?php echo $pds_sku; ?></span> <?php echo $product['sku']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_model') && $product['model']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_model; ?></span> <?php echo $product['model']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_brand') && $product['brand']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_brand; ?></span> <a href="<?php echo $product['brand_url']; ?>"><?php echo $product['brand']; ?></a> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_location') && $product['location']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_location; ?></span> <?php echo $product['location']; ?> <br />

	  <?php } ?>

	  <?php if ($product['upc'] && $this->config->get('config_display_upc')) { ?> 

	  <span style="color:#38b0e3"><?php echo $pds_upc; ?></span> <?php echo $product['upc']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_listock') && $product['stock']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_stock; ?></span> <?php echo $product['stock']; ?> <br />

	  <?php } ?>

	  </div>]]></add>
		</operation>
		<operation>
			<search position="before"><![CDATA[html += '  <div class="name">' + $(element).find('.name').html() + '</div>';]]></search>
			<add><![CDATA[html += '<div class="extra" style="display: inline-block; color: #444; position: absolute; transform: translate(-165px, 195px); -webkit-transform: translate(-165px, 195px); -o-transform: translate(-165px, 195px); -moz-transform: translate(-165px, 195px); font-size: 14px;">' + $(element).find('.extra').html() + '</div>';]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA[html += '<div class="name">' + $(element).find('.name').html() + '</div>';]]></search>
			<add><![CDATA[html += '<div class="extra" style="display: inline-block; color: #444;">' + $(element).find('.extra').html() + '</div>';]]></add>
		</operation>
	</file>
	<file name="catalog/view/theme/*/template/product/special.tpl">
		<operation>
			<search position="after"><![CDATA[<div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>]]></search>
			<add><![CDATA[<div class="extra" style="display: inline-block; color: #444;">

	  <?php if ($this->config->get('config_display_sku') && $product['sku']) { ?> 

	  <span style="color:#38b0e3"><?php echo $pds_sku; ?></span> <?php echo $product['sku']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_model') && $product['model']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_model; ?></span> <?php echo $product['model']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_brand') && $product['brand']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_brand; ?></span> <a href="<?php echo $product['brand_url']; ?>"><?php echo $product['brand']; ?></a> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_location') && $product['location']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_location; ?></span> <?php echo $product['location']; ?> <br />

	  <?php } ?>

	  <?php if ($product['upc'] && $this->config->get('config_display_upc')) { ?> 

	  <span style="color:#38b0e3"><?php echo $pds_upc; ?></span> <?php echo $product['upc']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_listock') && $product['stock']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_stock; ?></span> <?php echo $product['stock']; ?> <br />

	  <?php } ?>

	  </div>]]></add>
		</operation>
		<operation>
			<search position="before"><![CDATA[html += '  <div class="name">' + $(element).find('.name').html() + '</div>';]]></search>
			<add><![CDATA[html += '<div class="extra" style="display: inline-block; color: #444; position: absolute; transform: translate(-165px, 195px); -webkit-transform: translate(-165px, 195px); -o-transform: translate(-165px, 195px); -moz-transform: translate(-165px, 195px); font-size: 14px;">' + $(element).find('.extra').html() + '</div>';]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA[html += '<div class="name">' + $(element).find('.name').html() + '</div>';]]></search>
			<add><![CDATA[html += '<div class="extra" style="display: inline-block; color: #444;">' + $(element).find('.extra').html() + '</div>';]]></add>
		</operation>
	</file>
	<file name="catalog/view/theme/*/template/product/manufacturer_info.tpl">
		<operation>
			<search position="after"><![CDATA[<div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>]]></search>
			<add><![CDATA[<div class="extra" style="display: inline-block; color: #444;">

	  <?php if ($this->config->get('config_display_sku') && $product['sku']) { ?> 

	  <span style="color:#38b0e3"><?php echo $pds_sku; ?></span> <?php echo $product['sku']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_model') && $product['model']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_model; ?></span> <?php echo $product['model']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_brand') && $product['brand']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_brand; ?></span> <a href="<?php echo $product['brand_url']; ?>"><?php echo $product['brand']; ?></a> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_location') && $product['location']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_location; ?></span> <?php echo $product['location']; ?> <br />

	  <?php } ?>

	  <?php if ($product['upc'] && $this->config->get('config_display_upc')) { ?> 

	  <span style="color:#38b0e3"><?php echo $pds_upc; ?></span> <?php echo $product['upc']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_listock') && $product['stock']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_stock; ?></span> <?php echo $product['stock']; ?> <br />

	  <?php } ?>

	  </div>]]></add>
		</operation>
		<operation>
			<search position="before"><![CDATA[html += '  <div class="name">' + $(element).find('.name').html() + '</div>';]]></search>
			<add><![CDATA[html += '<div class="extra" style="display: inline-block; color: #444; position: absolute; transform: translate(-165px, 195px); -webkit-transform: translate(-165px, 195px); -o-transform: translate(-165px, 195px); -moz-transform: translate(-165px, 195px); font-size: 14px;">' + $(element).find('.extra').html() + '</div>';]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA[html += '<div class="name">' + $(element).find('.name').html() + '</div>';]]></search>
			<add><![CDATA[html += '<div class="extra" style="display: inline-block; color: #444;">' + $(element).find('.extra').html() + '</div>';]]></add>
		</operation>
	</file>
	<file name="catalog/controller/module/latest.php">
		<operation>
			<search position="before"><![CDATA[if ($this->config->get('config_review_status')) {]]></search>
			<add><![CDATA[if ($result['quantity'] <= 0) {
                $rstock = $result['stock_status'];
                } elseif ($this->config->get('config_stock_display')) {
                $rstock = "Stock: " . $result['quantity'];
                } else {
                $rstock = $this->language->get('pds_instock');
                }]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA[$result['name'],]]></search>
			<add><![CDATA[//produc display settings
					'sku'         => $result['sku'],
					'model'       => $result['model'],
					'brand'       => $result['manufacturer'],
					'location'    => $result['location'],
					'upc'         => $result['upc'],
					'stock'        => $rstock,
					'brand_url'   => $this->url->link('product/manufacturer/product', 'manufacturer_id=' . $result['manufacturer_id']),
					//end pds]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA[$this->language->load('module/latest');]]></search>
			<add><![CDATA[$this->language->load('product/pds');
$this->data['pds_sku'] = $this->language->get('pds_sku');
$this->data['pds_upc'] = $this->language->get('pds_upc');
$this->data['pds_location'] = $this->language->get('pds_location');
$this->data['pds_model'] = $this->language->get('pds_model');
$this->data['pds_brand'] = $this->language->get('pds_brand');
$this->data['pds_stock'] = $this->language->get('pds_stock');]]></add>
		</operation>
	</file>
	<file name="catalog/view/theme/*/template/module/latest.tpl">
		<operation>
			<search position="after"><![CDATA[<div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>]]></search>
			<add><![CDATA[<div class="extra" style="display: block; color: #444;">

	  <?php if ($this->config->get('config_display_sku') && $product['sku']) { ?> 

	  <span style="color:#38b0e3"><?php echo $pds_sku; ?></span> <?php echo $product['sku']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_model') && $product['model']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_model; ?></span> <?php echo $product['model']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_brand') && $product['brand']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_brand; ?></span> <a href="<?php echo $product['brand_url']; ?>"><?php echo $product['brand']; ?></a> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_location') && $product['location']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_location; ?></span> <?php echo $product['location']; ?> <br />

	  <?php } ?>

	  <?php if ($product['upc'] && $this->config->get('config_display_upc')) { ?> 

	  <span style="color:#38b0e3"><?php echo $pds_upc; ?></span> <?php echo $product['upc']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_listock') && $product['stock']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_stock; ?></span> <?php echo $product['stock']; ?> <br />

	  <?php } ?>

	  </div>]]></add>
		</operation>
		
	</file>
	<file name="catalog/controller/module/bestseller.php">
		<operation>
			<search position="before"><![CDATA[if ($this->config->get('config_review_status')) {]]></search>
			<add><![CDATA[if ($result['quantity'] <= 0) {
                $rstock = $result['stock_status'];
                } elseif ($this->config->get('config_stock_display')) {
                $rstock = "Stock: " . $result['quantity'];
                } else {
                $rstock = $this->language->get('pds_instock');
                }]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA[$result['name'],]]></search>
			<add><![CDATA[//produc display settings
					'sku'         => $result['sku'],
					'model'       => $result['model'],
					'brand'       => $result['manufacturer'],
					'location'    => $result['location'],
					'upc'         => $result['upc'],
					'stock'        => $rstock,
					'brand_url'   => $this->url->link('product/manufacturer/product', 'manufacturer_id=' . $result['manufacturer_id']),
					//end pds]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA[$this->language->load('module/bestseller');]]></search>
			<add><![CDATA[$this->language->load('product/pds');
$this->data['pds_sku'] = $this->language->get('pds_sku');
$this->data['pds_upc'] = $this->language->get('pds_upc');
$this->data['pds_location'] = $this->language->get('pds_location');
$this->data['pds_model'] = $this->language->get('pds_model');
$this->data['pds_brand'] = $this->language->get('pds_brand');
$this->data['pds_stock'] = $this->language->get('pds_stock');]]></add>
		</operation>
	</file>
	<file name="catalog/view/theme/*/template/module/bestseller.tpl">
		<operation>
			<search position="after"><![CDATA[<div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>]]></search>
			<add><![CDATA[<div class="extra" style="display: block; color: #444;">

	  <?php if ($this->config->get('config_display_sku') && $product['sku']) { ?> 

	  <span style="color:#38b0e3"><?php echo $pds_sku; ?></span> <?php echo $product['sku']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_model') && $product['model']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_model; ?></span> <?php echo $product['model']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_brand') && $product['brand']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_brand; ?></span> <a href="<?php echo $product['brand_url']; ?>"><?php echo $product['brand']; ?></a> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_location') && $product['location']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_location; ?></span> <?php echo $product['location']; ?> <br />

	  <?php } ?>

	  <?php if ($product['upc'] && $this->config->get('config_display_upc')) { ?> 

	  <span style="color:#38b0e3"><?php echo $pds_upc; ?></span> <?php echo $product['upc']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_listock') && $product['stock']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_stock; ?></span> <?php echo $product['stock']; ?> <br />

	  <?php } ?>

	  </div>]]></add>
		</operation>
		
	</file>
	<file name="catalog/controller/module/special.php">
		<operation>
			<search position="before"><![CDATA[if ($this->config->get('config_review_status')) {]]></search>
			<add><![CDATA[if ($result['quantity'] <= 0) {
                $rstock = $result['stock_status'];
                } elseif ($this->config->get('config_stock_display')) {
                $rstock = "Stock: " . $result['quantity'];
                } else {
                $rstock = $this->language->get('pds_instock');
                }]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA[$result['name'],]]></search>
			<add><![CDATA[//produc display settings
					'sku'         => $result['sku'],
					'model'       => $result['model'],
					'brand'       => $result['manufacturer'],
					'location'    => $result['location'],
					'upc'         => $result['upc'],
					'stock'        => $rstock,
					'brand_url'   => $this->url->link('product/manufacturer/product', 'manufacturer_id=' . $result['manufacturer_id']),
					//end pds]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA[$this->language->load('module/special');]]></search>
			<add><![CDATA[$this->language->load('product/pds');
$this->data['pds_sku'] = $this->language->get('pds_sku');
$this->data['pds_upc'] = $this->language->get('pds_upc');
$this->data['pds_location'] = $this->language->get('pds_location');
$this->data['pds_model'] = $this->language->get('pds_model');
$this->data['pds_brand'] = $this->language->get('pds_brand');
$this->data['pds_stock'] = $this->language->get('pds_stock');]]></add>
		</operation>
	</file>
	<file name="catalog/view/theme/*/template/module/special.tpl">
		<operation>
			<search position="after"><![CDATA[<div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>]]></search>
			<add><![CDATA[<div class="extra" style="display: block; color: #444;">

	  <?php if ($this->config->get('config_display_sku') && $product['sku']) { ?> 

	  <span style="color:#38b0e3"><?php echo $pds_sku; ?></span> <?php echo $product['sku']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_model') && $product['model']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_model; ?></span> <?php echo $product['model']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_brand') && $product['brand']) { ?>

	 <span style="color:#38b0e3"><?php echo $pds_brand; ?></span> <a href="<?php echo $product['brand_url']; ?>"><?php echo $product['brand']; ?></a> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_location') && $product['location']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_location; ?></span> <?php echo $product['location']; ?> <br />

	  <?php } ?>

	  <?php if ($product['upc'] && $this->config->get('config_display_upc')) { ?> 

	  <span style="color:#38b0e3"><?php echo $pds_upc; ?></span> <?php echo $product['upc']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_listock') && $product['stock']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_stock; ?></span> <?php echo $product['stock']; ?> <br />

	  <?php } ?>

	  </div>]]></add>
		</operation>
		
	</file>
	<file name="catalog/controller/module/featured.php">
		<operation>
			<search position="before"><![CDATA[if ($this->config->get('config_review_status')) {]]></search>
			<add><![CDATA[if ($product_info['quantity'] <= 0) {
                $rstock = $product_info['stock_status'];
                } elseif ($this->config->get('config_stock_display')) {
                $rstock = "Stock: " . $product_info['quantity'];
                } else {
                $rstock = $this->language->get('pds_instock');
                }]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA[$product_info['name'],]]></search>
			<add><![CDATA[//produc display settings
					'sku'         => $product_info['sku'],
					'model'       => $product_info['model'],
					'brand'       => $product_info['manufacturer'],
					'location'    => $product_info['location'],
					'upc'         => $product_info['upc'],
					'stock'        => $rstock,
					'brand_url'   => $this->url->link('product/manufacturer/product', 'manufacturer_id=' . $product_info['manufacturer_id']),
					//end pds]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA[$this->language->load('module/featured');]]></search>
			<add><![CDATA[$this->language->load('product/pds');
$this->data['pds_sku'] = $this->language->get('pds_sku');
$this->data['pds_upc'] = $this->language->get('pds_upc');
$this->data['pds_location'] = $this->language->get('pds_location');
$this->data['pds_model'] = $this->language->get('pds_model');
$this->data['pds_brand'] = $this->language->get('pds_brand');
$this->data['pds_stock'] = $this->language->get('pds_stock');]]></add>
		</operation>
	</file>
	<file name="catalog/view/theme/*/template/module/featured.tpl">
		<operation>
			<search position="after"><![CDATA[<div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>]]></search>
			<add><![CDATA[<div class="extra" style="display: block; color: #444;">

	  <?php if ($this->config->get('config_display_sku') && $product['sku']) { ?> 

	  <span style="color:#38b0e3"><?php echo $pds_sku; ?></span> <?php echo $product['sku']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_model') && $product['model']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_model; ?></span> <?php echo $product['model']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_brand') && $product['brand']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_brand; ?></span> <a href="<?php echo $product['brand_url']; ?>"><?php echo $product['brand']; ?></a> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_location') && $product['location']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_location; ?></span> <?php echo $product['location']; ?> <br />

	  <?php } ?>

	  <?php if ($product['upc'] && $this->config->get('config_display_upc')) { ?> 

	  <span style="color:#38b0e3"><?php echo $pds_upc; ?></span> <?php echo $product['upc']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_listock') && $product['stock']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_stock; ?></span> <?php echo $product['stock']; ?> <br />

	  <?php } ?>

	  </div>]]></add>
		</operation>
		
	</file>
	<file name="catalog/controller/module/viewed.php">
		<operation>
			<search position="before"><![CDATA[if ($this->config->get('config_review_status')) {]]></search>
			<add><![CDATA[if ($product_info['quantity'] <= 0) {
                $rstock = $product_info['stock_status'];
                } elseif ($this->config->get('config_stock_display')) {
                $rstock = "Stock: " . $product_info['quantity'];
                } else {
                $rstock = $this->language->get('pds_instock');
                }]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA[$product_info['name'],]]></search>
			<add><![CDATA[//produc display settings
					'sku'         => $product_info['sku'],
					'model'       => $product_info['model'],
					'brand'       => $product_info['manufacturer'],
					'location'    => $product_info['location'],
					'upc'         => $product_info['upc'],
					'stock'        => $rstock,
					'brand_url'   => $this->url->link('product/manufacturer/product', 'manufacturer_id=' . $product_info['manufacturer_id']),
					//end pds]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA[$this->language->load('module/viewed');]]></search>
			<add><![CDATA[$this->language->load('product/pds');
$this->data['pds_sku'] = $this->language->get('pds_sku');
$this->data['pds_upc'] = $this->language->get('pds_upc');
$this->data['pds_location'] = $this->language->get('pds_location');
$this->data['pds_model'] = $this->language->get('pds_model');
$this->data['pds_brand'] = $this->language->get('pds_brand');
$this->data['pds_stock'] = $this->language->get('pds_stock');]]></add>
		</operation>
	</file>
	<file name="catalog/view/theme/*/template/module/viewed.tpl">
		<operation>
			<search position="after"><![CDATA[<div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>]]></search>
			<add><![CDATA[<div class="extra" style="display: block; color: #444;">

	  <?php if ($this->config->get('config_display_sku') && $product['sku']) { ?> 

	  <span style="color:#38b0e3"><?php echo $pds_sku; ?></span> <?php echo $product['sku']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_model') && $product['model']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_model; ?></span> <?php echo $product['model']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_brand') && $product['brand']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_brand; ?></span> <a href="<?php echo $product['brand_url']; ?>"><?php echo $product['brand']; ?></a> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_location') && $product['location']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_location; ?></span> <?php echo $product['location']; ?> <br />

	  <?php } ?>

	  <?php if ($product['upc'] && $this->config->get('config_display_upc')) { ?> 

	  <span style="color:#38b0e3"><?php echo $pds_upc; ?></span> <?php echo $product['upc']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_listock') && $product['stock']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_stock; ?></span> <?php echo $product['stock']; ?> <br />

	  <?php } ?>

	  </div>]]></add>
		</operation>
		
	</file>
	<file name="catalog/controller/module/filterpro.php">
		<operation>
			<search position="before"><![CDATA[if ($this->config->get('config_review_status')) {]]></search>
			<add><![CDATA[if ($product_total != 0)  {
			if ($result['quantity'] <= 0) {
                $rstock = $result['stock_status'];
                } elseif ($this->config->get('config_stock_display')) {
                $rstock = $result['quantity'];
                } else {
                $rstock = $this->language->get('pds_instock');
                }}]]></add>
		</operation>		
		<operation>
			<search position="after"><![CDATA['name'        => $result['name'],]]></search>
			<add><![CDATA[//produc display settings
					'sku'         => $result['sku'],
					'model'       => $result['model'],
					'brand'       => $result['manufacturer'],
					'location'    => $result['location'],
					'upc'         => $result['upc'],
					'stock'       => $rstock,
					'brand_url'   => $this->url->link('product/manufacturer/product', 'manufacturer_id=' . $result['manufacturer_id']),
					//end pds]]></add>
		</operation>
		<operation>
			<search position="after"><![CDATA[$this->data['text_grid'] = $this->language->get('text_grid');]]></search>
			<add><![CDATA[$this->language->load('product/pds');
$this->data['pds_sku'] = $this->language->get('pds_sku');
$this->data['pds_upc'] = $this->language->get('pds_upc');
$this->data['pds_location'] = $this->language->get('pds_location');
$this->data['pds_model'] = $this->language->get('pds_model');
$this->data['pds_brand'] = $this->language->get('pds_brand');
$this->data['pds_stock'] = $this->language->get('pds_stock');]]></add>
		</operation>
	</file>

	<file name="catalog/view/theme/*/template/module/filterpro_products.tpl">
		<operation>
			<search position="after"><![CDATA[<div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>]]></search>
			<add><![CDATA[<div class="extra" style="display: inline-block; color: #444;">

	  <?php if ($this->config->get('config_display_sku') && $product['sku']) { ?> 

	  <span style="color:#38b0e3"><?php echo $pds_sku; ?></span> <?php echo $product['sku']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_model') && $product['model']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_model; ?></span> <?php echo $product['model']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_brand') && $product['brand']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_brand; ?></span> <a href="<?php echo $product['brand_url']; ?>"><?php echo $product['brand']; ?></a> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_location') && $product['location']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_location; ?></span> <?php echo $product['location']; ?> <br />

	  <?php } ?>

	  <?php if ($product['upc'] && $this->config->get('config_display_upc')) { ?> 

	  <span style="color:#38b0e3"><?php echo $pds_upc; ?></span> <?php echo $product['upc']; ?> <br />

	  <?php } ?>

	  <?php if ($this->config->get('config_display_listock') && $product['stock']) { ?>

	  <span style="color:#38b0e3"><?php echo $pds_stock; ?></span> <?php echo $product['stock']; ?> <br />

	  <?php } ?>

	  </div>]]></add>
		</operation>
    </file>

</modification>

 

               2. vq2-catalog_controller_product_manufacturer.php

Спойлер


<?php 
class ControllerProductManufacturer extends Controller {  
	public function index() { 
		$this->language->load('product/manufacturer');
		
		$this->load->model('catalog/manufacturer');
		
		$this->load->model('tool/image');		
		
		$this->document->setTitle($this->language->get('heading_title'));
		
		$this->data['heading_title'] = $this->language->get('heading_title');
		
		$this->data['text_index'] = $this->language->get('text_index');
		$this->data['text_empty'] = $this->language->get('text_empty');
		
		$this->data['button_continue'] = $this->language->get('button_continue');
		
		$this->data['breadcrumbs'] = array();
		
      	$this->data['breadcrumbs'][] = array(
        	'text'      => $this->language->get('text_home'),
			'href'      => $this->url->link('common/home'),
        	'separator' => false
      	);
		
		$this->data['breadcrumbs'][] = array(
			'text'      => $this->language->get('text_brand'),
			'href'      => $this->url->link('product/manufacturer'),
			'separator' => $this->language->get('text_separator')
		);
		
		$this->data['categories'] = array();
									
		$results = $this->model_catalog_manufacturer->getManufacturers();
	
		foreach ($results as $result) {
			if (is_numeric(utf8_substr($result['name'], 0, 1))) {
				$key = '0 - 9';
			} else {
				$key = utf8_substr(utf8_strtoupper($result['name']), 0, 1);
			}
			
			if (!isset($this->data['manufacturers'][$key])) {
				$this->data['categories'][$key]['name'] = $key;
			}
			
			$this->data['categories'][$key]['manufacturer'][] = array(
				'name' => $result['name'],

	// ManufacturerLogo
				'logo' => $this->model_tool_image->resize($result['image'], 100, 100),
	// ManufacturerLogo end
			
				'href' => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $result['manufacturer_id'])
			);
		}
		
		$this->data['continue'] = $this->url->link('common/home');

		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/manufacturer_list.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/product/manufacturer_list.tpl';
		} else {
			$this->template = 'default/template/product/manufacturer_list.tpl';
		}			
		
		$this->children = array(
			'common/column_left',
			'common/column_right',
			'common/content_top',
			'common/content_bottom',
			'common/footer',
			'common/header'
		);
				
		$this->response->setOutput($this->render());										
  	}
	
	public function info() {
    	$this->language->load('product/manufacturer');
		
		$this->load->model('catalog/manufacturer');
		
		$this->load->model('catalog/product');
		
		$this->load->model('tool/image'); 
		
		if (isset($this->request->get['manufacturer_id'])) {
			$manufacturer_id = (int)$this->request->get['manufacturer_id'];
		} else {
			$manufacturer_id = 0;
		} 
		$filterpro_seo = false;
            		$url_data = false;
            		if(isset($this->request->get['filter_id'])) {
            			$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "filterpro_seo WHERE `url`='" . $this->db->escape("filter_id=" . $this->request->get['filter_id']) . "'");
            			if($query->num_rows) {
            				$filterpro_data = unserialize($query->row['data']);
            				$filterpro_seo = $filterpro_data['lang'][(int)$this->config->get('config_language_id')];
            				parse_str(str_replace("&amp;", "&", $filterpro_data['url']), $url_data);
							$url_data['filer_news'] = false;
            				if (!isset($url_data['manufacturer_id']) || $url_data['manufacturer_id'] != $manufacturer_id) {
            					$this->redirect($this->url->link('error/not_found'));
            				}
            			}
            		}
            
										
		if (isset($this->request->get['sort'])) {
			$sort = $this->request->get['sort'];
		} else {
			$sort = 'p.sort_order';
		} 

		if (isset($this->request->get['order'])) {
			$order = $this->request->get['order'];
		} else {
			$order = 'ASC';
		} 
  		
		if (isset($this->request->get['page'])) {
			$page = $this->request->get['page'];
		} else {
			$page = 1;
		}
				
		if (isset($this->request->get['limit'])) {
			$limit = $this->request->get['limit'];
		} else {
			$limit = $this->config->get('config_catalog_limit');
		}

		$this->data['breadcrumbs'] = array();

   		$this->data['breadcrumbs'][] = array( 
       		'text'      => $this->language->get('text_home'),
			'href'      => $this->url->link('common/home'),
      		'separator' => false
   		);
   		
		$this->data['breadcrumbs'][] = array( 
       		'text'      => $this->language->get('text_brand'),
			'href'      => $this->url->link('product/manufacturer'),
      		'separator' => $this->language->get('text_separator')
   		);
		
		$manufacturer_info = $this->model_catalog_manufacturer->getManufacturer($manufacturer_id);
	
		if ($manufacturer_info) {
			if ($manufacturer_info['seo_title']) {
				$this->document->setTitle($manufacturer_info['seo_title']);
			} else {
				$this->document->setTitle($manufacturer_info['name']);
				
			}
			$this->document->addScript('catalog/view/javascript/jquery/jquery.total-storage.min.js');
			$this->document->setDescription($manufacturer_info['meta_description']);
			$this->document->setKeywords($manufacturer_info['meta_keyword']);
			
			$url = '';
			
			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	
	
			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}
					
			if (isset($this->request->get['page'])) {
				$url .= '&page=' . $this->request->get['page'];
			}	
			
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
		   			
			$this->data['breadcrumbs'][] = array(
       			'text'      => $manufacturer_info['name'],
				'href'      => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . $url),
      			'separator' => $this->language->get('text_separator')
   			);
			
			if ($manufacturer_info['seo_h1']) {
				$this->data['heading_title'] = $manufacturer_info['seo_h1'];
			} else {
				$this->data['heading_title'] = $manufacturer_info['name'];
			if($filterpro_seo) {
            				$this->data['description'] = html_entity_decode($filterpro_seo['description'], ENT_QUOTES, 'UTF-8');
            				$this->data['heading_title'] = $filterpro_seo['h1'];
            				$this->document->setTitle($filterpro_seo['title']);
            				$this->document->setDescription($filterpro_seo['meta_description']);
            				$this->document->setKeywords($filterpro_seo['meta_keywords']);
            			}
			}

			$this->data['description'] = html_entity_decode($manufacturer_info['description'], ENT_QUOTES, 'UTF-8');
		

			
			$this->data['text_empty'] = $this->language->get('text_empty');
			$this->data['text_quantity'] = $this->language->get('text_quantity');
			$this->data['text_manufacturer'] = $this->language->get('text_manufacturer');
			$this->data['text_model'] = $this->language->get('text_model');
			$this->data['text_price'] = $this->language->get('text_price');
			$this->data['text_tax'] = $this->language->get('text_tax');
			$this->data['text_points'] = $this->language->get('text_points');
			$this->data['text_compare'] = sprintf($this->language->get('text_compare'), (isset($this->session->data['compare']) ? count($this->session->data['compare']) : 0));
			$this->data['text_display'] = $this->language->get('text_display');
			$this->data['text_list'] = $this->language->get('text_list');
			$this->data['text_grid'] = $this->language->get('text_grid');			
$this->language->load('product/pds');
$this->data['pds_sku'] = $this->language->get('pds_sku');
$this->data['pds_upc'] = $this->language->get('pds_upc');
$this->data['pds_location'] = $this->language->get('pds_location');
$this->data['pds_model'] = $this->language->get('pds_model');
$this->data['pds_brand'] = $this->language->get('pds_brand');
$this->data['pds_stock'] = $this->language->get('pds_stock');
			$this->data['text_sort'] = $this->language->get('text_sort');
			$this->data['text_limit'] = $this->language->get('text_limit');
			  
			$this->data['button_cart'] = $this->language->get('button_cart');
$this->data['button_out_of_stock'] = $this->language->get('button_out_of_stock');
			$this->data['button_wishlist'] = $this->language->get('button_wishlist');
			$this->data['button_compare'] = $this->language->get('button_compare');
			$this->data['button_continue'] = $this->language->get('button_continue');
			
			$this->data['compare'] = $this->url->link('product/compare');
			
			$this->data['products'] = array();
			
			$data = array(
				'filter_manufacturer_id' => $manufacturer_id, 
				'sort'                   => $sort,
				'order'                  => $order,
				'start'                  => ($page - 1) * $limit,
				'limit'                  => $limit
			);
					
						if($url_data) {
            				$get = $this->request->get;
            				unset($get['route']);
            				unset($get['filter_id']);
            				$this->request->get['filter_redirect'] = $this->url->link('product/category', http_build_query($get));
            				$this->request->post = $url_data;

            				$this->load->model('module/filterpro');
            				list($f1, $f2, $f3, $f4, $f5, $f5, $f6, $url_data) = $this->model_module_filterpro->getData();
            				$url_data['filer_news'] = false;
            				$product_total = $this->model_module_filterpro->getTotalProducts($url_data);
            				$results = $this->model_module_filterpro->getProducts($url_data);
            			} else {
            				$product_total = $this->model_catalog_product->getTotalProducts($data);
            				$results = $this->model_catalog_product->getProducts($data);
            			}
			//Вызов метода getFoundProducts должен проводится сразу же после getProducts
			//только тогда он выдает правильное значения количества товаров
			//$product_total = $this->model_catalog_product->getTotalProducts($data); 
					
			foreach ($results as $result) {
				if ($result['image']) {
					$image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));
				} else {
					$image = false;
				}
				
				if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {
					$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));
				} else {
					$price = false;
				}
				
				if ((float)$result['special']) {
					$special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')));
				} else {
					$special = false;
				}	
				
				if ($this->config->get('config_tax')) {
					$tax = $this->currency->format((float)$result['special'] ? $result['special'] : $result['price']);
				} else {
					$tax = false;
				}				
				
if ($product_total != 0)  {
			if ($result['quantity'] <= 0) {
                $rstock = $result['stock_status'];
                } elseif ($this->config->get('config_stock_display')) {
                $rstock = $result['quantity'];
                } else {
                $rstock = $this->language->get('pds_instock');
                }}
				if ($this->config->get('config_review_status')) {
					$rating = (int)$result['rating'];
				} else {
					$rating = false;
				}
			

        // module attribute to text
        $options = $this->config->get('attribute_to_text_options');
        if (isset($options['show_catalog_attributes'])) {
          $this->load->model('catalog/attributes_to_text');
          $description = $this->model_catalog_attributes_to_text->getText($result['product_id'], $options);
          if (empty($description) || $description == '<span class="attributes-text"></span>') {
            $description = utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 300) . '..';
          }
        }
        else {
          $description = utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 300) . '..';
        }
      
				$this->data['products'][] = array(

'promotion'   => $result['promotions']['category'],
      

'statuses'    => $result['statuses']['category'],
'stickers'    => $result['statuses']['category_stickers'],        
      
					'product_id'  => $result['product_id'],
'quantity'	  => $result['quantity'],
            'stock' => $result['stock_status'],
					'thumb'       => $image,
					'name'        => $result['name'],
//produc display settings
					'sku'         => $result['sku'],
					'model'       => $result['model'],
					'brand'       => $result['manufacturer'],
					'location'    => $result['location'],
					'upc'         => $result['upc'],
					'stock'       => $rstock,
					'brand_url'   => $this->url->link('product/manufacturer/product', 'manufacturer_id=' . $result['manufacturer_id']),
					//end pds
					
          'description' => $description,
        
					'price'       => $price,
					'special'     => $special,
					'tax'         => $tax,
					'rating'      => $result['rating'],
					'reviews'     => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),
					'href'        => $this->url->link('product/product', '&manufacturer_id=' . $result['manufacturer_id'] . '&product_id=' . $result['product_id'] . $url)
				);
			}
					
			$url = '';
			
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
						
			$this->data['sorts'] = array();
			
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_default'),
				'value' => 'p.sort_order-ASC',
				'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=p.sort_order&order=ASC' . $url)
			);
			
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_name_asc'),
				'value' => 'pd.name-ASC',
				'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=pd.name&order=ASC' . $url)
			); 
	
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_name_desc'),
				'value' => 'pd.name-DESC',
				'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=pd.name&order=DESC' . $url)
			);
	
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_price_asc'),
				'value' => 'p.price-ASC',
				'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=p.price&order=ASC' . $url)
			); 
	
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_price_desc'),
				'value' => 'p.price-DESC',
				'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=p.price&order=DESC' . $url)
			); 
			
if ($product_total != 0)  {
			if ($result['quantity'] <= 0) {
                $rstock = $result['stock_status'];
                } elseif ($this->config->get('config_stock_display')) {
                $rstock = $result['quantity'];
                } else {
                $rstock = $this->language->get('pds_instock');
                }}
			if ($this->config->get('config_review_status')) {
				$this->data['sorts'][] = array(
					'text'  => $this->language->get('text_rating_desc'),
					'value' => 'rating-DESC',
					'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=rating&order=DESC' . $url)


			); 
			
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_rating_asc'),
				'value' => 'rating-ASC',
					'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=rating&order=ASC' . $url)

			);
			}
			
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_model_asc'),
				'value' => 'p.model-ASC',
				'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=p.model&order=ASC' . $url)
			); 
	
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_model_desc'),
				'value' => 'p.model-DESC',
				'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=p.model&order=DESC' . $url)
			);
	
			$url = '';
					
			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	
	
			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}
			
			$this->data['limits'] = array();
	
			$limits = array_unique(array($this->config->get('config_catalog_limit'), 25, 50, 75, 100));

			sort($limits);
	
			foreach($limits as $value){
				$this->data['limits'][] = array(
					'text'  => $value,
					'value' => $value,
					'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . $url . '&limit=' . $value)
				);
			}
				
			$url = '';
							
			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	
	
			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}
			
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
					
			$pagination = new Pagination();
			$pagination->total = $product_total;
			$pagination->page = $page;
			$pagination->limit = $limit;
			$pagination->text = $this->language->get('text_pagination');
			$pagination->url = $this->url->link('product/manufacturer/info','manufacturer_id=' . $this->request->get['manufacturer_id'] .  $url . '&page={page}');
			
			$this->data['pagination'] = $pagination->render();
			
			$this->data['sort'] = $sort;
			$this->data['order'] = $order;
			$this->data['limit'] = $limit;
			
			$this->data['continue'] = $this->url->link('common/home');
			
			if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/manufacturer_info.tpl')) {
				$this->template = $this->config->get('config_template') . '/template/product/manufacturer_info.tpl';
			} else {
				$this->template = 'default/template/product/manufacturer_info.tpl';
			}
			
			$this->children = array(
				'common/column_left',
				'common/column_right',
				'common/content_top',
				'common/content_bottom',
				'common/footer',
				'common/header'
			);
					
			$this->response->setOutput($this->render());
		} else {
			$url = '';
			
			if (isset($this->request->get['manufacturer_id'])) {
				$url .= '&manufacturer_id=' . $this->request->get['manufacturer_id'];
			}
									
			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}
				
			if (isset($this->request->get['page'])) {
				$url .= '&page=' . $this->request->get['page'];
			}
						
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
						
			$this->data['breadcrumbs'][] = array(
				'text'      => $this->language->get('text_error'),
				'href'      => $this->url->link('product/category', $url),
				'separator' => $this->language->get('text_separator')
			);
				
			$this->document->setTitle($this->language->get('text_error'));

      		$this->data['heading_title'] = $this->language->get('text_error');

      		$this->data['text_error'] = $this->language->get('text_error');

      		$this->data['button_continue'] = $this->language->get('button_continue');

      		$this->data['continue'] = $this->url->link('common/home');

			if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {
				$this->template = $this->config->get('config_template') . '/template/error/not_found.tpl';
			} else {
				$this->template = 'default/template/error/not_found.tpl';
			}
			
			$this->children = array(
				'common/column_left',
				'common/column_right',
				'common/content_top',
				'common/content_bottom',
				'common/footer',
				'common/header'
			);
					
			$this->response->setOutput($this->render());
		}
  	}
}
?>

 

            3. "vq2-catalog_controller_product_category.php"

Спойлер



<?php 
class ControllerProductCategory extends Controller {  
	public function index() { 
		$this->language->load('product/category');
		
		$this->load->model('catalog/category');
		
		$this->load->model('catalog/product');
		
		$this->load->model('tool/image'); 
		
		if (isset($this->request->get['filter'])) {
			$filter = $this->request->get['filter'];
		} else {
			$filter = '';
		}

			
		if (isset($this->request->get['sort'])) {
			$sort = $this->request->get['sort'];
		} else {
			$sort = 'p.sort_order';
		}

		if (isset($this->request->get['order'])) {
			$order = $this->request->get['order'];
		} else {
			$order = 'ASC';
		}
		
		if (isset($this->request->get['page'])) {
			$page = $this->request->get['page'];
		} else { 
			$page = 1;
		}	
							
		if (isset($this->request->get['limit'])) {
			$limit = $this->request->get['limit'];
		} else {
			$limit = $this->config->get('config_catalog_limit');
		}

					
		$this->data['breadcrumbs'] = array();

   		$this->data['breadcrumbs'][] = array(
       		'text'      => $this->language->get('text_home'),
			'href'      => $this->url->link('common/home'),
       		'separator' => false
   		);	
			
		if (isset($this->request->get['path'])) {
			$url = '';
			
			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}	
			
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}

				
			$path = '';
		
			$parts = explode('_', (string)$this->request->get['path']);
		
			$category_id = (int)array_pop($parts);

			foreach ($parts as $path_id) {
				if (!$path) {
					$path = (int)$path_id;
				} else {
					$path .= '_' . (int)$path_id;
				}
									
				$category_info = $this->model_catalog_category->getCategory($path_id);
				
				if ($category_info) {
	       			$this->data['breadcrumbs'][] = array(
   	    				'text'      => $category_info['name'],
						'href'      => $this->url->link('product/category', 'path=' . $path . $url),
        				'separator' => $this->language->get('text_separator')
        			);
				}

			}		
		
			
		} else {
			$category_id = 0;
		}

  		$filterpro_seo = false;
  		$url_data = false;
  		if(isset($this->request->get['filter_id'])) {
  			$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "filterpro_seo WHERE `url`='" . $this->db->escape("filter_id=" . $this->request->get['filter_id']) . "'");
  			if($query->num_rows) {
  				$filterpro_data = unserialize($query->row['data']);
  				$filterpro_seo = $filterpro_data['lang'][(int)$this->config->get('config_language_id')];
  				parse_str(str_replace("&amp;", "&", $filterpro_data['url']), $url_data);
				$url_data['filer_news'] = false;
  				if(!isset($url_data['category_id']) || $url_data['category_id'] != $category_id) {
  					$this->redirect($this->url->link('error/not_found'));
  				}
  			}
  		}

		
		$category_info = $this->model_catalog_category->getCategory($category_id);
	
		if ($category_info) {
			if ($category_info['seo_title']) {
		  		$this->document->setTitle($category_info['seo_title']);
			} else {
		  		$this->document->setTitle($category_info['name']);
			}

			$this->document->setDescription($category_info['meta_description']);
			$this->document->setKeywords($category_info['meta_keyword']);
			$this->document->addScript('catalog/view/javascript/jquery/jquery.total-storage.min.js');
			
			if ($category_info['seo_h1']) {
				$this->data['heading_title'] = $category_info['seo_h1'];
			} else {
				$this->data['heading_title'] = $category_info['name'];
			}
			
			$this->data['text_refine'] = $this->language->get('text_refine');
			$this->data['text_empty'] = $this->language->get('text_empty');			
			$this->data['text_quantity'] = $this->language->get('text_quantity');
			$this->data['text_manufacturer'] = $this->language->get('text_manufacturer');
			$this->data['text_model'] = $this->language->get('text_model');
			$this->data['text_price'] = $this->language->get('text_price');
			$this->data['text_tax'] = $this->language->get('text_tax');
			$this->data['text_points'] = $this->language->get('text_points');
			$this->data['text_compare'] = sprintf($this->language->get('text_compare'), (isset($this->session->data['compare']) ? count($this->session->data['compare']) : 0));
			$this->data['text_display'] = $this->language->get('text_display');
			$this->data['text_list'] = $this->language->get('text_list');
			$this->data['text_grid'] = $this->language->get('text_grid');
$this->language->load('product/pds');
$this->data['pds_sku'] = $this->language->get('pds_sku');
$this->data['pds_upc'] = $this->language->get('pds_upc');
$this->data['pds_location'] = $this->language->get('pds_location');
$this->data['pds_model'] = $this->language->get('pds_model');
$this->data['pds_brand'] = $this->language->get('pds_brand');
$this->data['pds_stock'] = $this->language->get('pds_stock');
			$this->data['text_sort'] = $this->language->get('text_sort');
			$this->data['text_limit'] = $this->language->get('text_limit');
					
			$this->data['button_cart'] = $this->language->get('button_cart');
$this->data['button_out_of_stock'] = $this->language->get('button_out_of_stock');
			$this->data['button_wishlist'] = $this->language->get('button_wishlist');
			$this->data['button_compare'] = $this->language->get('button_compare');
			$this->data['button_continue'] = $this->language->get('button_continue');
			
			// Set the last category breadcrumb		
			$url = '';
			
			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}	
			
			if (isset($this->request->get['page'])) {
				$url .= '&page=' . $this->request->get['page'];
			}
			
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
									
			$this->data['breadcrumbs'][] = array(
				'text'      => $category_info['name'],
				'href'      => $this->url->link('product/category', 'path=' . $this->request->get['path']),
				'separator' => $this->language->get('text_separator')
			);
								
					
			if ($category_info['image']) {
				$this->data['thumb'] = $this->model_tool_image->resize($category_info['image'], $this->config->get('config_image_category_width'), $this->config->get('config_image_category_height'));
				$this->document->setOgImage($this->data['thumb']);
			} else {
				$this->data['thumb'] = '';
			}
									
			$this->data['description'] = html_entity_decode($category_info['description'], ENT_QUOTES, 'UTF-8');
            if($filterpro_seo) {
              $this->data['description'] = html_entity_decode($filterpro_seo['description'], ENT_QUOTES, 'UTF-8');
              $this->data['heading_title'] = $filterpro_seo['h1'];
              $this->document->setTitle($filterpro_seo['title']);
              $this->document->setDescription($filterpro_seo['meta_description']);
              $this->document->setKeywords($filterpro_seo['meta_keywords']);
            }
			$this->data['compare'] = $this->url->link('product/compare');
			
			$url = '';
			
			if (isset($this->request->get['filter'])) {
				$url .= '&filter=' . $this->request->get['filter'];
			}	

			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}	
			
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
								
			$this->data['categories'] = array();
			
			$results = $this->model_catalog_category->getCategories($category_id);
			
			foreach ($results as $result) {
				$data = array(
					'filter_category_id'  => $result['category_id'],
					'filter_sub_category' => true
				);
				
				$product_total = $this->model_catalog_product->getTotalProducts($data);				
				
				$this->data['categories'][] = array(
					'name'  => $result['name'] . ($this->config->get('config_product_count') ? ' (' . $product_total . ')' : ''),
					'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url),
					'thumb' => $this->model_tool_image->resize(($result['image']=='' ? 'no_image.jpg' : $result['image']), $this->config->get('config_image_category_width'), $this->config->get('config_image_category_height'))
				);
			}
			
			$this->data['products'] = array();
			
			$data = array(
				'filter_category_id' => $category_id,
				'filter_filter'      => $filter, 
				'sort'               => $sort,
				'order'              => $order,
				'start'              => ($page - 1) * $limit,
				'limit'              => $limit
			);
					
			
			if($url_data) {
				$get = $this->request->get;
				unset($get['route']);
				unset($get['filter_id']);
				$this->request->get['filter_redirect'] = $this->url->link('product/category', http_build_query($get));
				$this->request->post = $url_data;

				$this->load->model('module/filterpro');
				list($f1, $f2, $f3, $f4, $f5, $f5, $f6, $url_data) = $this->model_module_filterpro->getData();
				$url_data['filer_news'] = false;
				$product_total = $this->model_module_filterpro->getTotalProducts($url_data);
				$results = $this->model_module_filterpro->getProducts($url_data);
			} else {
				$product_total = $this->model_catalog_product->getTotalProducts($data);
				$results = $this->model_catalog_product->getProducts($data);
			}
			//Вызов метода getFoundProducts должен проводится сразу же после getProducts
			//только тогда он выдает правильное значения количества товаров
			//$product_total = $this->model_catalog_product->getTotalProducts($data); 
			
			foreach ($results as $result) {
				if ($result['image']) {
					$image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));
				} else {
					$image = $this->model_tool_image->resize('no_image.jpg', $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));
				}
				
				if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {
					$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));
				} else {
					$price = false;
				}
				
				if ((float)$result['special']) {
					$special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')));
				} else {
					$special = false;
				}	
				
				if ($this->config->get('config_tax')) {
					$tax = $this->currency->format((float)$result['special'] ? $result['special'] : $result['price']);
				} else {
					$tax = false;
				}				
				
if ($product_total != 0)  {
			if ($result['quantity'] <= 0) {
                $rstock = $result['stock_status'];
                } elseif ($this->config->get('config_stock_display')) {
                $rstock = $result['quantity'];
                } else {
                $rstock = $this->language->get('pds_instock');
                }}
				if ($this->config->get('config_review_status')) {
					$rating = (int)$result['rating'];
				} else {
					$rating = false;
				}
								

        // module attribute to text
        $options = $this->config->get('attribute_to_text_options');
        if (isset($options['show_catalog_attributes'])) {
          $this->load->model('catalog/attributes_to_text');
          $description = $this->model_catalog_attributes_to_text->getText($result['product_id'], $options);
          if (empty($description) || $description == '<span class="attributes-text"></span>') {
            $description = utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 300) . '..';
          }
        }
        else {
          $description = utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 300) . '..';
        }
      
				$this->data['products'][] = array(

'promotion'   => $result['promotions']['category'],
      

'statuses'    => $result['statuses']['category'],
'stickers'    => $result['statuses']['category_stickers'],        
      
					'product_id'  => $result['product_id'],
'quantity'	  => $result['quantity'],
            'stock' => $result['stock_status'],
					'thumb'       => $image,
					'name'        => $result['name'],
//produc display settings
					'sku'         => $result['sku'],
					'model'       => $result['model'],
					'brand'       => $result['manufacturer'],
					'location'    => $result['location'],
					'upc'         => $result['upc'],
					'stock'       => $rstock,
					'brand_url'   => $this->url->link('product/manufacturer/product', 'manufacturer_id=' . $result['manufacturer_id']),
					//end pds
					
          'description' => $description,
        
					'price'       => $price,
					'special'     => $special,
					'tax'         => $tax,
					'rating'      => $result['rating'],
					'reviews'     => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),
					'href'        => $this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'] . $url)
				);
			}
			
			$url = '';
			
			if (isset($this->request->get['filter'])) {
				$url .= '&filter=' . $this->request->get['filter'];
			}
				
	
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
										
			$this->data['sorts'] = array();
			
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_default'),
				'value' => 'p.sort_order-ASC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url)
			);
			
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_name_asc'),
				'value' => 'pd.name-ASC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=pd.name&order=ASC' . $url)
			);

			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_name_desc'),
				'value' => 'pd.name-DESC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=pd.name&order=DESC' . $url)
			);

			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_price_asc'),
				'value' => 'p.price-ASC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.price&order=ASC' . $url)
			); 

			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_price_desc'),
				'value' => 'p.price-DESC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.price&order=DESC' . $url)
			); 
			
if ($product_total != 0)  {
			if ($result['quantity'] <= 0) {
                $rstock = $result['stock_status'];
                } elseif ($this->config->get('config_stock_display')) {
                $rstock = $result['quantity'];
                } else {
                $rstock = $this->language->get('pds_instock');
                }}
			if ($this->config->get('config_review_status')) {
				$this->data['sorts'][] = array(
					'text'  => $this->language->get('text_rating_desc'),
					'value' => 'rating-DESC',
					'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=rating&order=DESC' . $url)
				); 
				
				$this->data['sorts'][] = array(
					'text'  => $this->language->get('text_rating_asc'),
					'value' => 'rating-ASC',
					'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=rating&order=ASC' . $url)
				);
			}
			
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_model_asc'),
				'value' => 'p.model-ASC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.model&order=ASC' . $url)
			);

			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_model_desc'),
				'value' => 'p.model-DESC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.model&order=DESC' . $url)
			);
			
			$url = '';
			
			if (isset($this->request->get['filter'])) {
				$url .= '&filter=' . $this->request->get['filter'];
			}

			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}
			
			$this->data['limits'] = array();
			
			$limits = array_unique(array($this->config->get('config_catalog_limit'), 25, 50, 75, 100));
			
			sort($limits);
	
			foreach($limits as $value){
				$this->data['limits'][] = array(
					'text'  => $value,
					'value' => $value,
					'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&limit=' . $value)
				);
			}
			
			$url = '';
			

			if (isset($this->request->get['filter'])) {
				$url .= '&filter=' . $this->request->get['filter'];
			}

			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}
	
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
					
			$pagination = new Pagination();
			$pagination->total = $product_total;
			$pagination->page = $page;
			$pagination->limit = $limit;
			$pagination->text = $this->language->get('text_pagination');
			$pagination->url = $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&page={page}');
		
			$this->data['pagination'] = $pagination->render();
		
			$this->data['sort'] = $sort;
			$this->data['order'] = $order;
			$this->data['limit'] = $limit;
		
			$this->data['continue'] = $this->url->link('common/home');

			if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/category.tpl')) {
				$this->template = $this->config->get('config_template') . '/template/product/category.tpl';
			} else {
				$this->template = 'default/template/product/category.tpl';
			}
			
			$this->children = array(
				'common/column_left',
				'common/column_right',
				'common/content_top',
				'common/content_bottom',
				'common/footer',
				'common/header'
			);
				
			$this->response->setOutput($this->render());										
    	} else {
			$url = '';
			
			if (isset($this->request->get['path'])) {
				$url .= '&path=' . $this->request->get['path'];
			}
			
			if (isset($this->request->get['filter'])) {
				$url .= '&filter=' . $this->request->get['filter'];
			}
				
									
			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}
				
			if (isset($this->request->get['page'])) {
				$url .= '&page=' . $this->request->get['page'];
			}
						
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
						
			$this->data['breadcrumbs'][] = array(
				'text'      => $this->language->get('text_error'),
				'href'      => $this->url->link('product/category', $url),
				'separator' => $this->language->get('text_separator')
			);
				
			$this->document->setTitle($this->language->get('text_error'));

      		$this->data['heading_title'] = $this->language->get('text_error');

      		$this->data['text_error'] = $this->language->get('text_error');

      		$this->data['button_continue'] = $this->language->get('button_continue');

      		$this->data['continue'] = $this->url->link('common/home');

			if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {
				$this->template = $this->config->get('config_template') . '/template/error/not_found.tpl';
			} else {
				$this->template = 'default/template/error/not_found.tpl';
			}
			
			$this->children = array(
				'common/column_left',
				'common/column_right',
				'common/content_top',
				'common/content_bottom',
				'common/footer',
				'common/header'
			);
					
			$this->response->setOutput($this->render());
		}
  	}
}
?>

 

 

 

 

          4. catalog/controller/product/manufacturer.php

Спойлер

<?php 
class ControllerProductManufacturer extends Controller {  
	public function index() { 
		$this->language->load('product/manufacturer');
		
		$this->load->model('catalog/manufacturer');
		
		$this->load->model('tool/image');		
		
		$this->document->setTitle($this->language->get('heading_title'));
		
		$this->data['heading_title'] = $this->language->get('heading_title');
		
		$this->data['text_index'] = $this->language->get('text_index');
		$this->data['text_empty'] = $this->language->get('text_empty');
		
		$this->data['button_continue'] = $this->language->get('button_continue');
		
		$this->data['breadcrumbs'] = array();
		
      	$this->data['breadcrumbs'][] = array(
        	'text'      => $this->language->get('text_home'),
			'href'      => $this->url->link('common/home'),
        	'separator' => false
      	);
		
		$this->data['breadcrumbs'][] = array(
			'text'      => $this->language->get('text_brand'),
			'href'      => $this->url->link('product/manufacturer'),
			'separator' => $this->language->get('text_separator')
		);
		
		$this->data['categories'] = array();
									
		$results = $this->model_catalog_manufacturer->getManufacturers();
	
		foreach ($results as $result) {
			if (is_numeric(utf8_substr($result['name'], 0, 1))) {
				$key = '0 - 9';
			} else {
				$key = utf8_substr(utf8_strtoupper($result['name']), 0, 1);
			}
			
			if (!isset($this->data['manufacturers'][$key])) {
				$this->data['categories'][$key]['name'] = $key;
			}
			
			$this->data['categories'][$key]['manufacturer'][] = array(
				'name' => $result['name'],
				'href' => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $result['manufacturer_id'])
			);
		}
		
		$this->data['continue'] = $this->url->link('common/home');

		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/manufacturer_list.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/product/manufacturer_list.tpl';
		} else {
			$this->template = 'default/template/product/manufacturer_list.tpl';
		}			
		
		$this->children = array(
			'common/column_left',
			'common/column_right',
			'common/content_top',
			'common/content_bottom',
			'common/footer',
			'common/header'
		);
				
		$this->response->setOutput($this->render());										
  	}
	
	public function info() {
    	$this->language->load('product/manufacturer');
		
		$this->load->model('catalog/manufacturer');
		
		$this->load->model('catalog/product');
		
		$this->load->model('tool/image'); 
		
		if (isset($this->request->get['manufacturer_id'])) {
			$manufacturer_id = (int)$this->request->get['manufacturer_id'];
		} else {
			$manufacturer_id = 0;
		} 
										
		if (isset($this->request->get['sort'])) {
			$sort = $this->request->get['sort'];
		} else {
			$sort = 'p.sort_order';
		} 

		if (isset($this->request->get['order'])) {
			$order = $this->request->get['order'];
		} else {
			$order = 'ASC';
		} 
  		
		if (isset($this->request->get['page'])) {
			$page = $this->request->get['page'];
		} else {
			$page = 1;
		}
				
		if (isset($this->request->get['limit'])) {
			$limit = $this->request->get['limit'];
		} else {
			$limit = $this->config->get('config_catalog_limit');
		}

		$this->data['breadcrumbs'] = array();

   		$this->data['breadcrumbs'][] = array( 
       		'text'      => $this->language->get('text_home'),
			'href'      => $this->url->link('common/home'),
      		'separator' => false
   		);
   		
		$this->data['breadcrumbs'][] = array( 
       		'text'      => $this->language->get('text_brand'),
			'href'      => $this->url->link('product/manufacturer'),
      		'separator' => $this->language->get('text_separator')
   		);
		
		$manufacturer_info = $this->model_catalog_manufacturer->getManufacturer($manufacturer_id);
	
		if ($manufacturer_info) {
			if ($manufacturer_info['seo_title']) {
				$this->document->setTitle($manufacturer_info['seo_title']);
			} else {
				$this->document->setTitle($manufacturer_info['name']);
				
			}
			$this->document->addScript('catalog/view/javascript/jquery/jquery.total-storage.min.js');
			$this->document->setDescription($manufacturer_info['meta_description']);
			$this->document->setKeywords($manufacturer_info['meta_keyword']);
			
			$url = '';
			
			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	
	
			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}
					
			if (isset($this->request->get['page'])) {
				$url .= '&page=' . $this->request->get['page'];
			}	
			
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
		   			
			$this->data['breadcrumbs'][] = array(
       			'text'      => $manufacturer_info['name'],
				'href'      => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . $url),
      			'separator' => $this->language->get('text_separator')
   			);
			
			if ($manufacturer_info['seo_h1']) {
				$this->data['heading_title'] = $manufacturer_info['seo_h1'];
			} else {
				$this->data['heading_title'] = $manufacturer_info['name'];
			}

			$this->data['description'] = html_entity_decode($manufacturer_info['description'], ENT_QUOTES, 'UTF-8');
		

			
			$this->data['text_empty'] = $this->language->get('text_empty');
			$this->data['text_quantity'] = $this->language->get('text_quantity');
			$this->data['text_manufacturer'] = $this->language->get('text_manufacturer');
			$this->data['text_model'] = $this->language->get('text_model');
			$this->data['text_price'] = $this->language->get('text_price');
			$this->data['text_tax'] = $this->language->get('text_tax');
			$this->data['text_points'] = $this->language->get('text_points');
			$this->data['text_compare'] = sprintf($this->language->get('text_compare'), (isset($this->session->data['compare']) ? count($this->session->data['compare']) : 0));
			$this->data['text_display'] = $this->language->get('text_display');
			$this->data['text_list'] = $this->language->get('text_list');
			$this->data['text_grid'] = $this->language->get('text_grid');			
			$this->data['text_sort'] = $this->language->get('text_sort');
			$this->data['text_limit'] = $this->language->get('text_limit');
			  
			$this->data['button_cart'] = $this->language->get('button_cart');
			$this->data['button_wishlist'] = $this->language->get('button_wishlist');
			$this->data['button_compare'] = $this->language->get('button_compare');
			$this->data['button_continue'] = $this->language->get('button_continue');
			
			$this->data['compare'] = $this->url->link('product/compare');
			
			$this->data['products'] = array();
			
			$data = array(
				'filter_manufacturer_id' => $manufacturer_id, 
				'sort'                   => $sort,
				'order'                  => $order,
				'start'                  => ($page - 1) * $limit,
				'limit'                  => $limit
			);
					
			$results = $this->model_catalog_product->getProducts($data);
			//Вызов метода getFoundProducts должен проводится сразу же после getProducts
			//только тогда он выдает правильное значения количества товаров
			$product_total = $this->model_catalog_product->getTotalProducts($data); 
					
			foreach ($results as $result) {
				if ($result['image']) {
					$image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));
				} else {
					$image = false;
				}
				
				if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {
					$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));
				} else {
					$price = false;
				}
				
				if ((float)$result['special']) {
					$special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')));
				} else {
					$special = false;
				}	
				
				if ($this->config->get('config_tax')) {
					$tax = $this->currency->format((float)$result['special'] ? $result['special'] : $result['price']);
				} else {
					$tax = false;
				}				
				
				if ($this->config->get('config_review_status')) {
					$rating = (int)$result['rating'];
				} else {
					$rating = false;
				}
			
				$this->data['products'][] = array(
					'product_id'  => $result['product_id'],
					'thumb'       => $image,
					'name'        => $result['name'],
					'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 300) . '..',
					'price'       => $price,
					'special'     => $special,
					'tax'         => $tax,
					'rating'      => $result['rating'],
					'reviews'     => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),
					'href'        => $this->url->link('product/product', '&manufacturer_id=' . $result['manufacturer_id'] . '&product_id=' . $result['product_id'] . $url)
				);
			}
					
			$url = '';
			
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
						
			$this->data['sorts'] = array();
			
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_default'),
				'value' => 'p.sort_order-ASC',
				'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=p.sort_order&order=ASC' . $url)
			);
			
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_name_asc'),
				'value' => 'pd.name-ASC',
				'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=pd.name&order=ASC' . $url)
			); 
	
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_name_desc'),
				'value' => 'pd.name-DESC',
				'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=pd.name&order=DESC' . $url)
			);
	
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_price_asc'),
				'value' => 'p.price-ASC',
				'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=p.price&order=ASC' . $url)
			); 
	
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_price_desc'),
				'value' => 'p.price-DESC',
				'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=p.price&order=DESC' . $url)
			); 
			
			if ($this->config->get('config_review_status')) {
				$this->data['sorts'][] = array(
					'text'  => $this->language->get('text_rating_desc'),
					'value' => 'rating-DESC',
					'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=rating&order=DESC' . $url)


			); 
			
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_rating_asc'),
				'value' => 'rating-ASC',
					'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=rating&order=ASC' . $url)

			);
			}
			
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_model_asc'),
				'value' => 'p.model-ASC',
				'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=p.model&order=ASC' . $url)
			); 
	
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_model_desc'),
				'value' => 'p.model-DESC',
				'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=p.model&order=DESC' . $url)
			);
	
			$url = '';
					
			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	
	
			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}
			
			$this->data['limits'] = array();
	
			$limits = array_unique(array($this->config->get('config_catalog_limit'), 25, 50, 75, 100));

			sort($limits);
	
			foreach($limits as $value){
				$this->data['limits'][] = array(
					'text'  => $value,
					'value' => $value,
					'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . $url . '&limit=' . $value)
				);
			}
				
			$url = '';
							
			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	
	
			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}
			
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
					
			$pagination = new Pagination();
			$pagination->total = $product_total;
			$pagination->page = $page;
			$pagination->limit = $limit;
			$pagination->text = $this->language->get('text_pagination');
			$pagination->url = $this->url->link('product/manufacturer/info','manufacturer_id=' . $this->request->get['manufacturer_id'] .  $url . '&page={page}');
			
			$this->data['pagination'] = $pagination->render();
			
			$this->data['sort'] = $sort;
			$this->data['order'] = $order;
			$this->data['limit'] = $limit;
			
			$this->data['continue'] = $this->url->link('common/home');
			
			if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/manufacturer_info.tpl')) {
				$this->template = $this->config->get('config_template') . '/template/product/manufacturer_info.tpl';
			} else {
				$this->template = 'default/template/product/manufacturer_info.tpl';
			}
			
			$this->children = array(
				'common/column_left',
				'common/column_right',
				'common/content_top',
				'common/content_bottom',
				'common/footer',
				'common/header'
			);
					
			$this->response->setOutput($this->render());
		} else {
			$url = '';
			
			if (isset($this->request->get['manufacturer_id'])) {
				$url .= '&manufacturer_id=' . $this->request->get['manufacturer_id'];
			}
									
			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}
				
			if (isset($this->request->get['page'])) {
				$url .= '&page=' . $this->request->get['page'];
			}
						
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
						
			$this->data['breadcrumbs'][] = array(
				'text'      => $this->language->get('text_error'),
				'href'      => $this->url->link('product/category', $url),
				'separator' => $this->language->get('text_separator')
			);
				
			$this->document->setTitle($this->language->get('text_error'));

      		$this->data['heading_title'] = $this->language->get('text_error');

      		$this->data['text_error'] = $this->language->get('text_error');

      		$this->data['button_continue'] = $this->language->get('button_continue');

      		$this->data['continue'] = $this->url->link('common/home');

			if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {
				$this->template = $this->config->get('config_template') . '/template/error/not_found.tpl';
			} else {
				$this->template = 'default/template/error/not_found.tpl';
			}
			
			$this->children = array(
				'common/column_left',
				'common/column_right',
				'common/content_top',
				'common/content_bottom',
				'common/footer',
				'common/header'
			);
					
			$this->response->setOutput($this->render());
		}
  	}
}
?>

 

 

           5. catalog/controller/product/category.php

Спойлер

<?php 
class ControllerProductCategory extends Controller {  
	public function index() { 
		$this->language->load('product/category');
		
		$this->load->model('catalog/category');
		
		$this->load->model('catalog/product');
		
		$this->load->model('tool/image'); 
		
		if (isset($this->request->get['filter'])) {
			$filter = $this->request->get['filter'];
		} else {
			$filter = '';
		}

			
		if (isset($this->request->get['sort'])) {
			$sort = $this->request->get['sort'];
		} else {
			$sort = 'p.sort_order';
		}

		if (isset($this->request->get['order'])) {
			$order = $this->request->get['order'];
		} else {
			$order = 'ASC';
		}
		
		if (isset($this->request->get['page'])) {
			$page = $this->request->get['page'];
		} else { 
			$page = 1;
		}	
							
		if (isset($this->request->get['limit'])) {
			$limit = $this->request->get['limit'];
		} else {
			$limit = $this->config->get('config_catalog_limit');
		}

					
		$this->data['breadcrumbs'] = array();

   		$this->data['breadcrumbs'][] = array(
       		'text'      => $this->language->get('text_home'),
			'href'      => $this->url->link('common/home'),
       		'separator' => false
   		);	
			
		if (isset($this->request->get['path'])) {
			$url = '';
			
			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}	
			
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}

				
			$path = '';
		
			$parts = explode('_', (string)$this->request->get['path']);
		
			$category_id = (int)array_pop($parts);

			foreach ($parts as $path_id) {
				if (!$path) {
					$path = (int)$path_id;
				} else {
					$path .= '_' . (int)$path_id;
				}
									
				$category_info = $this->model_catalog_category->getCategory($path_id);
				
				if ($category_info) {
	       			$this->data['breadcrumbs'][] = array(
   	    				'text'      => $category_info['name'],
						'href'      => $this->url->link('product/category', 'path=' . $path . $url),
        				'separator' => $this->language->get('text_separator')
        			);
				}

			}		
		
			
		} else {
			$category_id = 0;
		}

		
		$category_info = $this->model_catalog_category->getCategory($category_id);
	
		if ($category_info) {
			if ($category_info['seo_title']) {
		  		$this->document->setTitle($category_info['seo_title']);
			} else {
		  		$this->document->setTitle($category_info['name']);
			}

			$this->document->setDescription($category_info['meta_description']);
			$this->document->setKeywords($category_info['meta_keyword']);
			$this->document->addScript('catalog/view/javascript/jquery/jquery.total-storage.min.js');
			
			if ($category_info['seo_h1']) {
				$this->data['heading_title'] = $category_info['seo_h1'];
			} else {
				$this->data['heading_title'] = $category_info['name'];
			}
			
			$this->data['text_refine'] = $this->language->get('text_refine');
			$this->data['text_empty'] = $this->language->get('text_empty');			
			$this->data['text_quantity'] = $this->language->get('text_quantity');
			$this->data['text_manufacturer'] = $this->language->get('text_manufacturer');
			$this->data['text_model'] = $this->language->get('text_model');
			$this->data['text_price'] = $this->language->get('text_price');
			$this->data['text_tax'] = $this->language->get('text_tax');
			$this->data['text_points'] = $this->language->get('text_points');
			$this->data['text_compare'] = sprintf($this->language->get('text_compare'), (isset($this->session->data['compare']) ? count($this->session->data['compare']) : 0));
			$this->data['text_display'] = $this->language->get('text_display');
			$this->data['text_list'] = $this->language->get('text_list');
			$this->data['text_grid'] = $this->language->get('text_grid');
			$this->data['text_sort'] = $this->language->get('text_sort');
			$this->data['text_limit'] = $this->language->get('text_limit');
					
			$this->data['button_cart'] = $this->language->get('button_cart');
			$this->data['button_wishlist'] = $this->language->get('button_wishlist');
			$this->data['button_compare'] = $this->language->get('button_compare');
			$this->data['button_continue'] = $this->language->get('button_continue');
			
			// Set the last category breadcrumb		
			$url = '';
			
			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}	
			
			if (isset($this->request->get['page'])) {
				$url .= '&page=' . $this->request->get['page'];
			}
			
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
									
			$this->data['breadcrumbs'][] = array(
				'text'      => $category_info['name'],
				'href'      => $this->url->link('product/category', 'path=' . $this->request->get['path']),
				'separator' => $this->language->get('text_separator')
			);
								
					
			if ($category_info['image']) {
				$this->data['thumb'] = $this->model_tool_image->resize($category_info['image'], $this->config->get('config_image_category_width'), $this->config->get('config_image_category_height'));
				$this->document->setOgImage($this->data['thumb']);
			} else {
				$this->data['thumb'] = '';
			}
									
			$this->data['description'] = html_entity_decode($category_info['description'], ENT_QUOTES, 'UTF-8');
			$this->data['compare'] = $this->url->link('product/compare');
			
			$url = '';
			
			if (isset($this->request->get['filter'])) {
				$url .= '&filter=' . $this->request->get['filter'];
			}	

			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}	
			
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
								
			$this->data['categories'] = array();
			
			$results = $this->model_catalog_category->getCategories($category_id);
			
			foreach ($results as $result) {
				$data = array(
					'filter_category_id'  => $result['category_id'],
					'filter_sub_category' => true
				);
				
				$product_total = $this->model_catalog_product->getTotalProducts($data);				
				
				$this->data['categories'][] = array(
					'name'  => $result['name'] . ($this->config->get('config_product_count') ? ' (' . $product_total . ')' : ''),
					'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url),
					'thumb' => $this->model_tool_image->resize(($result['image']=='' ? 'no_image.jpg' : $result['image']), $this->config->get('config_image_category_width'), $this->config->get('config_image_category_height'))
				);
			}
			
			$this->data['products'] = array();
			
			$data = array(
				'filter_category_id' => $category_id,
				'filter_filter'      => $filter, 
				'sort'               => $sort,
				'order'              => $order,
				'start'              => ($page - 1) * $limit,
				'limit'              => $limit
			);
					
			$results = $this->model_catalog_product->getProducts($data);
			//Вызов метода getFoundProducts должен проводится сразу же после getProducts
			//только тогда он выдает правильное значения количества товаров
			$product_total = $this->model_catalog_product->getTotalProducts($data); 
			
			foreach ($results as $result) {
				if ($result['image']) {
					$image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));
				} else {
					$image = $this->model_tool_image->resize('no_image.jpg', $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));
				}
				
				if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {
					$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));
				} else {
					$price = false;
				}
				
				if ((float)$result['special']) {
					$special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')));
				} else {
					$special = false;
				}	
				
				if ($this->config->get('config_tax')) {
					$tax = $this->currency->format((float)$result['special'] ? $result['special'] : $result['price']);
				} else {
					$tax = false;
				}				
				
				if ($this->config->get('config_review_status')) {
					$rating = (int)$result['rating'];
				} else {
					$rating = false;
				}
								
				$this->data['products'][] = array(
					'product_id'  => $result['product_id'],
					'thumb'       => $image,
					'name'        => $result['name'],
					'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 300) . '..',
					'price'       => $price,
					'special'     => $special,
					'tax'         => $tax,
					'rating'      => $result['rating'],
					'reviews'     => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),
					'href'        => $this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'] . $url)
				);
			}
			
			$url = '';
			
			if (isset($this->request->get['filter'])) {
				$url .= '&filter=' . $this->request->get['filter'];
			}
				
	
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
										
			$this->data['sorts'] = array();
			
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_default'),
				'value' => 'p.sort_order-ASC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url)
			);
			
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_name_asc'),
				'value' => 'pd.name-ASC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=pd.name&order=ASC' . $url)
			);

			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_name_desc'),
				'value' => 'pd.name-DESC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=pd.name&order=DESC' . $url)
			);

			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_price_asc'),
				'value' => 'p.price-ASC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.price&order=ASC' . $url)
			); 

			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_price_desc'),
				'value' => 'p.price-DESC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.price&order=DESC' . $url)
			); 
			
			if ($this->config->get('config_review_status')) {
				$this->data['sorts'][] = array(
					'text'  => $this->language->get('text_rating_desc'),
					'value' => 'rating-DESC',
					'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=rating&order=DESC' . $url)
				); 
				
				$this->data['sorts'][] = array(
					'text'  => $this->language->get('text_rating_asc'),
					'value' => 'rating-ASC',
					'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=rating&order=ASC' . $url)
				);
			}
			
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_model_asc'),
				'value' => 'p.model-ASC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.model&order=ASC' . $url)
			);

			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_model_desc'),
				'value' => 'p.model-DESC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.model&order=DESC' . $url)
			);
			
			$url = '';
			
			if (isset($this->request->get['filter'])) {
				$url .= '&filter=' . $this->request->get['filter'];
			}

			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}
			
			$this->data['limits'] = array();
			
			$limits = array_unique(array($this->config->get('config_catalog_limit'), 25, 50, 75, 100));
			
			sort($limits);
	
			foreach($limits as $value){
				$this->data['limits'][] = array(
					'text'  => $value,
					'value' => $value,
					'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&limit=' . $value)
				);
			}
			
			$url = '';
			

			if (isset($this->request->get['filter'])) {
				$url .= '&filter=' . $this->request->get['filter'];
			}

			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}
	
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
					
			$pagination = new Pagination();
			$pagination->total = $product_total;
			$pagination->page = $page;
			$pagination->limit = $limit;
			$pagination->text = $this->language->get('text_pagination');
			$pagination->url = $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&page={page}');
		
			$this->data['pagination'] = $pagination->render();
		
			$this->data['sort'] = $sort;
			$this->data['order'] = $order;
			$this->data['limit'] = $limit;
		
			$this->data['continue'] = $this->url->link('common/home');

			if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/category.tpl')) {
				$this->template = $this->config->get('config_template') . '/template/product/category.tpl';
			} else {
				$this->template = 'default/template/product/category.tpl';
			}
			
			$this->children = array(
				'common/column_left',
				'common/column_right',
				'common/content_top',
				'common/content_bottom',
				'common/footer',
				'common/header'
			);
				
			$this->response->setOutput($this->render());										
    	} else {
			$url = '';
			
			if (isset($this->request->get['path'])) {
				$url .= '&path=' . $this->request->get['path'];
			}
			
			if (isset($this->request->get['filter'])) {
				$url .= '&filter=' . $this->request->get['filter'];
			}
				
									
			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}
				
			if (isset($this->request->get['page'])) {
				$url .= '&page=' . $this->request->get['page'];
			}
						
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
						
			$this->data['breadcrumbs'][] = array(
				'text'      => $this->language->get('text_error'),
				'href'      => $this->url->link('product/category', $url),
				'separator' => $this->language->get('text_separator')
			);
				
			$this->document->setTitle($this->language->get('text_error'));

      		$this->data['heading_title'] = $this->language->get('text_error');

      		$this->data['text_error'] = $this->language->get('text_error');

      		$this->data['button_continue'] = $this->language->get('button_continue');

      		$this->data['continue'] = $this->url->link('common/home');

			if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {
				$this->template = $this->config->get('config_template') . '/template/error/not_found.tpl';
			} else {
				$this->template = 'default/template/error/not_found.tpl';
			}
			
			$this->children = array(
				'common/column_left',
				'common/column_right',
				'common/content_top',
				'common/content_bottom',
				'common/footer',
				'common/header'
			);
					
			$this->response->setOutput($this->render());
		}
  	}
}
?>

 

 

Что означают эти ошибки знаю, но не знаю, как поправить.

Буду благодарен любой помощи.

Надіслати
Поділитися на інших сайтах


44 минуты назад, Zapuzin сказал:

Вот эти неуловимые ошибки

Эти ошибки очень даже уловимые, написано в каком файле и на какой строке они возникают.

 

Спойлер

2019-07-15 0:59:07 - PHP Notice:  Undefined variable: result in /home/teploplc/public_html/vqmod/vqcache/vq2-catalog_controller_product_manufacturer.php on line 386
2019-07-15 0:59:07 - PHP Notice:  Undefined variable: result in /home/teploplc/public_html/vqmod/vqcache/vq2-catalog_controller_product_manufacturer.php on line 387
2019-07-15 10:57:34 - PHP Notice:  Undefined variable: result in /home/teploplc/public_html/vqmod/vqcache/vq2-catalog_controller_product_category.php on line 404
2019-07-15 10:57:34 - PHP Notice:  Undefined variable: result in /home/teploplc/public_html/vqmod/vqcache/vq2-catalog_controller_product_category.php on line 405

 

Надіслати
Поділитися на інших сайтах

Сами ошибки уловимы, согласен, и вижу их в файлах vqcache, но как исправить, не знаю. Пробовал методом тыка, но безрезультатно )

Знал бы как исправить, то в песочнице не просил бы помощи  )

Интересно то, что они появляются не сразу, а через некоторое время.

 

Кстати, файлы vqcache по ошибке вложил в пункт 1. Т.е. файл в файле ) После попытки редактирования сообщения получаю ответ:

1526677394__.png.53c067911948ce62a87026c5d052c9a1.png

 

Змінено користувачем Zapuzin
Редактирование сообщения
Надіслати
Поділитися на інших сайтах


43 минуты назад, smartcoder сказал:

Эти ошибки очень даже уловимые, написано в каком файле и на какой строке они возникают.

 

  Показать контент

2019-07-15 0:59:07 - PHP Notice:  Undefined variable: result in /home/teploplc/public_html/vqmod/vqcache/vq2-catalog_controller_product_manufacturer.php on line 386
2019-07-15 0:59:07 - PHP Notice:  Undefined variable: result in /home/teploplc/public_html/vqmod/vqcache/vq2-catalog_controller_product_manufacturer.php on line 387
2019-07-15 10:57:34 - PHP Notice:  Undefined variable: result in /home/teploplc/public_html/vqmod/vqcache/vq2-catalog_controller_product_category.php on line 404
2019-07-15 10:57:34 - PHP Notice:  Undefined variable: result in /home/teploplc/public_html/vqmod/vqcache/vq2-catalog_controller_product_category.php on line 405

 

 

Эти ошибки начали появляться только после того, как добавился файл  "product_statuses.xml" свежеустановленного модуля.

До этого никаких ошибок, в том числе и этих, связанных с "product-display-settings.xml", не было!

Вот файлы, которые по ошибке спрятаны в пункте 1. )

       2. vq2-catalog_controller_product_manufacturer.php

Спойлер

<?php 
class ControllerProductManufacturer extends Controller {  
	public function index() { 
		$this->language->load('product/manufacturer');
		
		$this->load->model('catalog/manufacturer');
		
		$this->load->model('tool/image');		
		
		$this->document->setTitle($this->language->get('heading_title'));
		
		$this->data['heading_title'] = $this->language->get('heading_title');
		
		$this->data['text_index'] = $this->language->get('text_index');
		$this->data['text_empty'] = $this->language->get('text_empty');
		
		$this->data['button_continue'] = $this->language->get('button_continue');
		
		$this->data['breadcrumbs'] = array();
		
      	$this->data['breadcrumbs'][] = array(
        	'text'      => $this->language->get('text_home'),
			'href'      => $this->url->link('common/home'),
        	'separator' => false
      	);
		
		$this->data['breadcrumbs'][] = array(
			'text'      => $this->language->get('text_brand'),
			'href'      => $this->url->link('product/manufacturer'),
			'separator' => $this->language->get('text_separator')
		);
		
		$this->data['categories'] = array();
									
		$results = $this->model_catalog_manufacturer->getManufacturers();
	
		foreach ($results as $result) {
			if (is_numeric(utf8_substr($result['name'], 0, 1))) {
				$key = '0 - 9';
			} else {
				$key = utf8_substr(utf8_strtoupper($result['name']), 0, 1);
			}
			
			if (!isset($this->data['manufacturers'][$key])) {
				$this->data['categories'][$key]['name'] = $key;
			}
			
			$this->data['categories'][$key]['manufacturer'][] = array(
				'name' => $result['name'],

	// ManufacturerLogo
				'logo' => $this->model_tool_image->resize($result['image'], 100, 100),
	// ManufacturerLogo end
			
				'href' => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $result['manufacturer_id'])
			);
		}
		
		$this->data['continue'] = $this->url->link('common/home');

		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/manufacturer_list.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/product/manufacturer_list.tpl';
		} else {
			$this->template = 'default/template/product/manufacturer_list.tpl';
		}			
		
		$this->children = array(
			'common/column_left',
			'common/column_right',
			'common/content_top',
			'common/content_bottom',
			'common/footer',
			'common/header'
		);
				
		$this->response->setOutput($this->render());										
  	}
	
	public function info() {
    	$this->language->load('product/manufacturer');
		
		$this->load->model('catalog/manufacturer');
		
		$this->load->model('catalog/product');
		
		$this->load->model('tool/image'); 
		
		if (isset($this->request->get['manufacturer_id'])) {
			$manufacturer_id = (int)$this->request->get['manufacturer_id'];
		} else {
			$manufacturer_id = 0;
		} 
		$filterpro_seo = false;
            		$url_data = false;
            		if(isset($this->request->get['filter_id'])) {
            			$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "filterpro_seo WHERE `url`='" . $this->db->escape("filter_id=" . $this->request->get['filter_id']) . "'");
            			if($query->num_rows) {
            				$filterpro_data = unserialize($query->row['data']);
            				$filterpro_seo = $filterpro_data['lang'][(int)$this->config->get('config_language_id')];
            				parse_str(str_replace("&amp;", "&", $filterpro_data['url']), $url_data);
							$url_data['filer_news'] = false;
            				if (!isset($url_data['manufacturer_id']) || $url_data['manufacturer_id'] != $manufacturer_id) {
            					$this->redirect($this->url->link('error/not_found'));
            				}
            			}
            		}
            
										
		if (isset($this->request->get['sort'])) {
			$sort = $this->request->get['sort'];
		} else {
			$sort = 'p.sort_order';
		} 

		if (isset($this->request->get['order'])) {
			$order = $this->request->get['order'];
		} else {
			$order = 'ASC';
		} 
  		
		if (isset($this->request->get['page'])) {
			$page = $this->request->get['page'];
		} else {
			$page = 1;
		}
				
		if (isset($this->request->get['limit'])) {
			$limit = $this->request->get['limit'];
		} else {
			$limit = $this->config->get('config_catalog_limit');
		}

		$this->data['breadcrumbs'] = array();

   		$this->data['breadcrumbs'][] = array( 
       		'text'      => $this->language->get('text_home'),
			'href'      => $this->url->link('common/home'),
      		'separator' => false
   		);
   		
		$this->data['breadcrumbs'][] = array( 
       		'text'      => $this->language->get('text_brand'),
			'href'      => $this->url->link('product/manufacturer'),
      		'separator' => $this->language->get('text_separator')
   		);
		
		$manufacturer_info = $this->model_catalog_manufacturer->getManufacturer($manufacturer_id);
	
		if ($manufacturer_info) {
			if ($manufacturer_info['seo_title']) {
				$this->document->setTitle($manufacturer_info['seo_title']);
			} else {
				$this->document->setTitle($manufacturer_info['name']);
				
			}
			$this->document->addScript('catalog/view/javascript/jquery/jquery.total-storage.min.js');
			$this->document->setDescription($manufacturer_info['meta_description']);
			$this->document->setKeywords($manufacturer_info['meta_keyword']);
			
			$url = '';
			
			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	
	
			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}
					
			if (isset($this->request->get['page'])) {
				$url .= '&page=' . $this->request->get['page'];
			}	
			
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
		   			
			$this->data['breadcrumbs'][] = array(
       			'text'      => $manufacturer_info['name'],
				'href'      => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . $url),
      			'separator' => $this->language->get('text_separator')
   			);
			
			if ($manufacturer_info['seo_h1']) {
				$this->data['heading_title'] = $manufacturer_info['seo_h1'];
			} else {
				$this->data['heading_title'] = $manufacturer_info['name'];
			if($filterpro_seo) {
            				$this->data['description'] = html_entity_decode($filterpro_seo['description'], ENT_QUOTES, 'UTF-8');
            				$this->data['heading_title'] = $filterpro_seo['h1'];
            				$this->document->setTitle($filterpro_seo['title']);
            				$this->document->setDescription($filterpro_seo['meta_description']);
            				$this->document->setKeywords($filterpro_seo['meta_keywords']);
            			}
			}

			$this->data['description'] = html_entity_decode($manufacturer_info['description'], ENT_QUOTES, 'UTF-8');
		

			
			$this->data['text_empty'] = $this->language->get('text_empty');
			$this->data['text_quantity'] = $this->language->get('text_quantity');
			$this->data['text_manufacturer'] = $this->language->get('text_manufacturer');
			$this->data['text_model'] = $this->language->get('text_model');
			$this->data['text_price'] = $this->language->get('text_price');
			$this->data['text_tax'] = $this->language->get('text_tax');
			$this->data['text_points'] = $this->language->get('text_points');
			$this->data['text_compare'] = sprintf($this->language->get('text_compare'), (isset($this->session->data['compare']) ? count($this->session->data['compare']) : 0));
			$this->data['text_display'] = $this->language->get('text_display');
			$this->data['text_list'] = $this->language->get('text_list');
			$this->data['text_grid'] = $this->language->get('text_grid');			
$this->language->load('product/pds');
$this->data['pds_sku'] = $this->language->get('pds_sku');
$this->data['pds_upc'] = $this->language->get('pds_upc');
$this->data['pds_location'] = $this->language->get('pds_location');
$this->data['pds_model'] = $this->language->get('pds_model');
$this->data['pds_brand'] = $this->language->get('pds_brand');
$this->data['pds_stock'] = $this->language->get('pds_stock');
			$this->data['text_sort'] = $this->language->get('text_sort');
			$this->data['text_limit'] = $this->language->get('text_limit');
			  
			$this->data['button_cart'] = $this->language->get('button_cart');
$this->data['button_out_of_stock'] = $this->language->get('button_out_of_stock');
			$this->data['button_wishlist'] = $this->language->get('button_wishlist');
			$this->data['button_compare'] = $this->language->get('button_compare');
			$this->data['button_continue'] = $this->language->get('button_continue');
			
			$this->data['compare'] = $this->url->link('product/compare');
			
			$this->data['products'] = array();
			
			$data = array(
				'filter_manufacturer_id' => $manufacturer_id, 
				'sort'                   => $sort,
				'order'                  => $order,
				'start'                  => ($page - 1) * $limit,
				'limit'                  => $limit
			);
					
						if($url_data) {
            				$get = $this->request->get;
            				unset($get['route']);
            				unset($get['filter_id']);
            				$this->request->get['filter_redirect'] = $this->url->link('product/category', http_build_query($get));
            				$this->request->post = $url_data;

            				$this->load->model('module/filterpro');
            				list($f1, $f2, $f3, $f4, $f5, $f5, $f6, $url_data) = $this->model_module_filterpro->getData();
            				$url_data['filer_news'] = false;
            				$product_total = $this->model_module_filterpro->getTotalProducts($url_data);
            				$results = $this->model_module_filterpro->getProducts($url_data);
            			} else {
            				$product_total = $this->model_catalog_product->getTotalProducts($data);
            				$results = $this->model_catalog_product->getProducts($data);
            			}
			//Вызов метода getFoundProducts должен проводится сразу же после getProducts
			//только тогда он выдает правильное значения количества товаров
			//$product_total = $this->model_catalog_product->getTotalProducts($data); 
					
			foreach ($results as $result) {
				if ($result['image']) {
					$image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));
				} else {
					$image = false;
				}
				
				if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {
					$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));
				} else {
					$price = false;
				}
				
				if ((float)$result['special']) {
					$special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')));
				} else {
					$special = false;
				}	
				
				if ($this->config->get('config_tax')) {
					$tax = $this->currency->format((float)$result['special'] ? $result['special'] : $result['price']);
				} else {
					$tax = false;
				}				
				
if ($product_total != 0)  {
			if ($result['quantity'] <= 0) {
                $rstock = $result['stock_status'];
                } elseif ($this->config->get('config_stock_display')) {
                $rstock = $result['quantity'];
                } else {
                $rstock = $this->language->get('pds_instock');
                }}
				if ($this->config->get('config_review_status')) {
					$rating = (int)$result['rating'];
				} else {
					$rating = false;
				}
			

        // module attribute to text
        $options = $this->config->get('attribute_to_text_options');
        if (isset($options['show_catalog_attributes'])) {
          $this->load->model('catalog/attributes_to_text');
          $description = $this->model_catalog_attributes_to_text->getText($result['product_id'], $options);
          if (empty($description) || $description == '<span class="attributes-text"></span>') {
            $description = utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 300) . '..';
          }
        }
        else {
          $description = utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 300) . '..';
        }
      
				$this->data['products'][] = array(

'promotion'   => $result['promotions']['category'],
      

'statuses'    => $result['statuses']['category'],
'stickers'    => $result['statuses']['category_stickers'],        
      
					'product_id'  => $result['product_id'],
'quantity'	  => $result['quantity'],
            'stock' => $result['stock_status'],
					'thumb'       => $image,
					'name'        => $result['name'],
//produc display settings
					'sku'         => $result['sku'],
					'model'       => $result['model'],
					'brand'       => $result['manufacturer'],
					'location'    => $result['location'],
					'upc'         => $result['upc'],
					'stock'       => $rstock,
					'brand_url'   => $this->url->link('product/manufacturer/product', 'manufacturer_id=' . $result['manufacturer_id']),
					//end pds
					
          'description' => $description,
        
					'price'       => $price,
					'special'     => $special,
					'tax'         => $tax,
					'rating'      => $result['rating'],
					'reviews'     => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),
					'href'        => $this->url->link('product/product', '&manufacturer_id=' . $result['manufacturer_id'] . '&product_id=' . $result['product_id'] . $url)
				);
			}
					
			$url = '';
			
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
						
			$this->data['sorts'] = array();
			
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_default'),
				'value' => 'p.sort_order-ASC',
				'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=p.sort_order&order=ASC' . $url)
			);
			
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_name_asc'),
				'value' => 'pd.name-ASC',
				'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=pd.name&order=ASC' . $url)
			); 
	
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_name_desc'),
				'value' => 'pd.name-DESC',
				'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=pd.name&order=DESC' . $url)
			);
	
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_price_asc'),
				'value' => 'p.price-ASC',
				'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=p.price&order=ASC' . $url)
			); 
	
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_price_desc'),
				'value' => 'p.price-DESC',
				'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=p.price&order=DESC' . $url)
			); 
			
if ($product_total != 0)  {
			if ($result['quantity'] <= 0) {
                $rstock = $result['stock_status'];
                } elseif ($this->config->get('config_stock_display')) {
                $rstock = $result['quantity'];
                } else {
                $rstock = $this->language->get('pds_instock');
                }}
			if ($this->config->get('config_review_status')) {
				$this->data['sorts'][] = array(
					'text'  => $this->language->get('text_rating_desc'),
					'value' => 'rating-DESC',
					'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=rating&order=DESC' . $url)


			); 
			
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_rating_asc'),
				'value' => 'rating-ASC',
					'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=rating&order=ASC' . $url)

			);
			}
			
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_model_asc'),
				'value' => 'p.model-ASC',
				'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=p.model&order=ASC' . $url)
			); 
	
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_model_desc'),
				'value' => 'p.model-DESC',
				'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . '&sort=p.model&order=DESC' . $url)
			);
	
			$url = '';
					
			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	
	
			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}
			
			$this->data['limits'] = array();
	
			$limits = array_unique(array($this->config->get('config_catalog_limit'), 25, 50, 75, 100));

			sort($limits);
	
			foreach($limits as $value){
				$this->data['limits'][] = array(
					'text'  => $value,
					'value' => $value,
					'href'  => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . $url . '&limit=' . $value)
				);
			}
				
			$url = '';
							
			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	
	
			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}
			
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
					
			$pagination = new Pagination();
			$pagination->total = $product_total;
			$pagination->page = $page;
			$pagination->limit = $limit;
			$pagination->text = $this->language->get('text_pagination');
			$pagination->url = $this->url->link('product/manufacturer/info','manufacturer_id=' . $this->request->get['manufacturer_id'] .  $url . '&page={page}');
			
			$this->data['pagination'] = $pagination->render();
			
			$this->data['sort'] = $sort;
			$this->data['order'] = $order;
			$this->data['limit'] = $limit;
			
			$this->data['continue'] = $this->url->link('common/home');
			
			if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/manufacturer_info.tpl')) {
				$this->template = $this->config->get('config_template') . '/template/product/manufacturer_info.tpl';
			} else {
				$this->template = 'default/template/product/manufacturer_info.tpl';
			}
			
			$this->children = array(
				'common/column_left',
				'common/column_right',
				'common/content_top',
				'common/content_bottom',
				'common/footer',
				'common/header'
			);
					
			$this->response->setOutput($this->render());
		} else {
			$url = '';
			
			if (isset($this->request->get['manufacturer_id'])) {
				$url .= '&manufacturer_id=' . $this->request->get['manufacturer_id'];
			}
									
			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}
				
			if (isset($this->request->get['page'])) {
				$url .= '&page=' . $this->request->get['page'];
			}
						
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
						
			$this->data['breadcrumbs'][] = array(
				'text'      => $this->language->get('text_error'),
				'href'      => $this->url->link('product/category', $url),
				'separator' => $this->language->get('text_separator')
			);
				
			$this->document->setTitle($this->language->get('text_error'));

      		$this->data['heading_title'] = $this->language->get('text_error');

      		$this->data['text_error'] = $this->language->get('text_error');

      		$this->data['button_continue'] = $this->language->get('button_continue');

      		$this->data['continue'] = $this->url->link('common/home');

			if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {
				$this->template = $this->config->get('config_template') . '/template/error/not_found.tpl';
			} else {
				$this->template = 'default/template/error/not_found.tpl';
			}
			
			$this->children = array(
				'common/column_left',
				'common/column_right',
				'common/content_top',
				'common/content_bottom',
				'common/footer',
				'common/header'
			);
					
			$this->response->setOutput($this->render());
		}
  	}
}
?>

 

 

       3. vq2-catalog_controller_product_category.php

Спойлер

<?php 
class ControllerProductCategory extends Controller {  
	public function index() { 
		$this->language->load('product/category');
		
		$this->load->model('catalog/category');
		
		$this->load->model('catalog/product');
		
		$this->load->model('tool/image'); 
		
		if (isset($this->request->get['filter'])) {
			$filter = $this->request->get['filter'];
		} else {
			$filter = '';
		}

			
		if (isset($this->request->get['sort'])) {
			$sort = $this->request->get['sort'];
		} else {
			$sort = 'p.sort_order';
		}

		if (isset($this->request->get['order'])) {
			$order = $this->request->get['order'];
		} else {
			$order = 'ASC';
		}
		
		if (isset($this->request->get['page'])) {
			$page = $this->request->get['page'];
		} else { 
			$page = 1;
		}	
							
		if (isset($this->request->get['limit'])) {
			$limit = $this->request->get['limit'];
		} else {
			$limit = $this->config->get('config_catalog_limit');
		}

					
		$this->data['breadcrumbs'] = array();

   		$this->data['breadcrumbs'][] = array(
       		'text'      => $this->language->get('text_home'),
			'href'      => $this->url->link('common/home'),
       		'separator' => false
   		);	
			
		if (isset($this->request->get['path'])) {
			$url = '';
			
			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}	
			
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}

				
			$path = '';
		
			$parts = explode('_', (string)$this->request->get['path']);
		
			$category_id = (int)array_pop($parts);

			foreach ($parts as $path_id) {
				if (!$path) {
					$path = (int)$path_id;
				} else {
					$path .= '_' . (int)$path_id;
				}
									
				$category_info = $this->model_catalog_category->getCategory($path_id);
				
				if ($category_info) {
	       			$this->data['breadcrumbs'][] = array(
   	    				'text'      => $category_info['name'],
						'href'      => $this->url->link('product/category', 'path=' . $path . $url),
        				'separator' => $this->language->get('text_separator')
        			);
				}

			}		
		
			
		} else {
			$category_id = 0;
		}

  		$filterpro_seo = false;
  		$url_data = false;
  		if(isset($this->request->get['filter_id'])) {
  			$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "filterpro_seo WHERE `url`='" . $this->db->escape("filter_id=" . $this->request->get['filter_id']) . "'");
  			if($query->num_rows) {
  				$filterpro_data = unserialize($query->row['data']);
  				$filterpro_seo = $filterpro_data['lang'][(int)$this->config->get('config_language_id')];
  				parse_str(str_replace("&amp;", "&", $filterpro_data['url']), $url_data);
				$url_data['filer_news'] = false;
  				if(!isset($url_data['category_id']) || $url_data['category_id'] != $category_id) {
  					$this->redirect($this->url->link('error/not_found'));
  				}
  			}
  		}

		
		$category_info = $this->model_catalog_category->getCategory($category_id);
	
		if ($category_info) {
			if ($category_info['seo_title']) {
		  		$this->document->setTitle($category_info['seo_title']);
			} else {
		  		$this->document->setTitle($category_info['name']);
			}

			$this->document->setDescription($category_info['meta_description']);
			$this->document->setKeywords($category_info['meta_keyword']);
			$this->document->addScript('catalog/view/javascript/jquery/jquery.total-storage.min.js');
			
			if ($category_info['seo_h1']) {
				$this->data['heading_title'] = $category_info['seo_h1'];
			} else {
				$this->data['heading_title'] = $category_info['name'];
			}
			
			$this->data['text_refine'] = $this->language->get('text_refine');
			$this->data['text_empty'] = $this->language->get('text_empty');			
			$this->data['text_quantity'] = $this->language->get('text_quantity');
			$this->data['text_manufacturer'] = $this->language->get('text_manufacturer');
			$this->data['text_model'] = $this->language->get('text_model');
			$this->data['text_price'] = $this->language->get('text_price');
			$this->data['text_tax'] = $this->language->get('text_tax');
			$this->data['text_points'] = $this->language->get('text_points');
			$this->data['text_compare'] = sprintf($this->language->get('text_compare'), (isset($this->session->data['compare']) ? count($this->session->data['compare']) : 0));
			$this->data['text_display'] = $this->language->get('text_display');
			$this->data['text_list'] = $this->language->get('text_list');
			$this->data['text_grid'] = $this->language->get('text_grid');
$this->language->load('product/pds');
$this->data['pds_sku'] = $this->language->get('pds_sku');
$this->data['pds_upc'] = $this->language->get('pds_upc');
$this->data['pds_location'] = $this->language->get('pds_location');
$this->data['pds_model'] = $this->language->get('pds_model');
$this->data['pds_brand'] = $this->language->get('pds_brand');
$this->data['pds_stock'] = $this->language->get('pds_stock');
			$this->data['text_sort'] = $this->language->get('text_sort');
			$this->data['text_limit'] = $this->language->get('text_limit');
					
			$this->data['button_cart'] = $this->language->get('button_cart');
$this->data['button_out_of_stock'] = $this->language->get('button_out_of_stock');
			$this->data['button_wishlist'] = $this->language->get('button_wishlist');
			$this->data['button_compare'] = $this->language->get('button_compare');
			$this->data['button_continue'] = $this->language->get('button_continue');
			
			// Set the last category breadcrumb		
			$url = '';
			
			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}	
			
			if (isset($this->request->get['page'])) {
				$url .= '&page=' . $this->request->get['page'];
			}
			
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
									
			$this->data['breadcrumbs'][] = array(
				'text'      => $category_info['name'],
				'href'      => $this->url->link('product/category', 'path=' . $this->request->get['path']),
				'separator' => $this->language->get('text_separator')
			);
								
					
			if ($category_info['image']) {
				$this->data['thumb'] = $this->model_tool_image->resize($category_info['image'], $this->config->get('config_image_category_width'), $this->config->get('config_image_category_height'));
				$this->document->setOgImage($this->data['thumb']);
			} else {
				$this->data['thumb'] = '';
			}
									
			$this->data['description'] = html_entity_decode($category_info['description'], ENT_QUOTES, 'UTF-8');
            if($filterpro_seo) {
              $this->data['description'] = html_entity_decode($filterpro_seo['description'], ENT_QUOTES, 'UTF-8');
              $this->data['heading_title'] = $filterpro_seo['h1'];
              $this->document->setTitle($filterpro_seo['title']);
              $this->document->setDescription($filterpro_seo['meta_description']);
              $this->document->setKeywords($filterpro_seo['meta_keywords']);
            }
			$this->data['compare'] = $this->url->link('product/compare');
			
			$url = '';
			
			if (isset($this->request->get['filter'])) {
				$url .= '&filter=' . $this->request->get['filter'];
			}	

			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}	
			
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
								
			$this->data['categories'] = array();
			
			$results = $this->model_catalog_category->getCategories($category_id);
			
			foreach ($results as $result) {
				$data = array(
					'filter_category_id'  => $result['category_id'],
					'filter_sub_category' => true
				);
				
				$product_total = $this->model_catalog_product->getTotalProducts($data);				
				
				$this->data['categories'][] = array(
					'name'  => $result['name'] . ($this->config->get('config_product_count') ? ' (' . $product_total . ')' : ''),
					'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url),
					'thumb' => $this->model_tool_image->resize(($result['image']=='' ? 'no_image.jpg' : $result['image']), $this->config->get('config_image_category_width'), $this->config->get('config_image_category_height'))
				);
			}
			
			$this->data['products'] = array();
			
			$data = array(
				'filter_category_id' => $category_id,
				'filter_filter'      => $filter, 
				'sort'               => $sort,
				'order'              => $order,
				'start'              => ($page - 1) * $limit,
				'limit'              => $limit
			);
					
			
			if($url_data) {
				$get = $this->request->get;
				unset($get['route']);
				unset($get['filter_id']);
				$this->request->get['filter_redirect'] = $this->url->link('product/category', http_build_query($get));
				$this->request->post = $url_data;

				$this->load->model('module/filterpro');
				list($f1, $f2, $f3, $f4, $f5, $f5, $f6, $url_data) = $this->model_module_filterpro->getData();
				$url_data['filer_news'] = false;
				$product_total = $this->model_module_filterpro->getTotalProducts($url_data);
				$results = $this->model_module_filterpro->getProducts($url_data);
			} else {
				$product_total = $this->model_catalog_product->getTotalProducts($data);
				$results = $this->model_catalog_product->getProducts($data);
			}
			//Вызов метода getFoundProducts должен проводится сразу же после getProducts
			//только тогда он выдает правильное значения количества товаров
			//$product_total = $this->model_catalog_product->getTotalProducts($data); 
			
			foreach ($results as $result) {
				if ($result['image']) {
					$image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));
				} else {
					$image = $this->model_tool_image->resize('no_image.jpg', $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));
				}
				
				if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {
					$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));
				} else {
					$price = false;
				}
				
				if ((float)$result['special']) {
					$special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')));
				} else {
					$special = false;
				}	
				
				if ($this->config->get('config_tax')) {
					$tax = $this->currency->format((float)$result['special'] ? $result['special'] : $result['price']);
				} else {
					$tax = false;
				}				
				
if ($product_total != 0)  {
			if ($result['quantity'] <= 0) {
                $rstock = $result['stock_status'];
                } elseif ($this->config->get('config_stock_display')) {
                $rstock = $result['quantity'];
                } else {
                $rstock = $this->language->get('pds_instock');
                }}
				if ($this->config->get('config_review_status')) {
					$rating = (int)$result['rating'];
				} else {
					$rating = false;
				}
								

        // module attribute to text
        $options = $this->config->get('attribute_to_text_options');
        if (isset($options['show_catalog_attributes'])) {
          $this->load->model('catalog/attributes_to_text');
          $description = $this->model_catalog_attributes_to_text->getText($result['product_id'], $options);
          if (empty($description) || $description == '<span class="attributes-text"></span>') {
            $description = utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 300) . '..';
          }
        }
        else {
          $description = utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 300) . '..';
        }
      
				$this->data['products'][] = array(

'promotion'   => $result['promotions']['category'],
      

'statuses'    => $result['statuses']['category'],
'stickers'    => $result['statuses']['category_stickers'],        
      
					'product_id'  => $result['product_id'],
'quantity'	  => $result['quantity'],
            'stock' => $result['stock_status'],
					'thumb'       => $image,
					'name'        => $result['name'],
//produc display settings
					'sku'         => $result['sku'],
					'model'       => $result['model'],
					'brand'       => $result['manufacturer'],
					'location'    => $result['location'],
					'upc'         => $result['upc'],
					'stock'       => $rstock,
					'brand_url'   => $this->url->link('product/manufacturer/product', 'manufacturer_id=' . $result['manufacturer_id']),
					//end pds
					
          'description' => $description,
        
					'price'       => $price,
					'special'     => $special,
					'tax'         => $tax,
					'rating'      => $result['rating'],
					'reviews'     => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),
					'href'        => $this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'] . $url)
				);
			}
			
			$url = '';
			
			if (isset($this->request->get['filter'])) {
				$url .= '&filter=' . $this->request->get['filter'];
			}
				
	
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
										
			$this->data['sorts'] = array();
			
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_default'),
				'value' => 'p.sort_order-ASC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url)
			);
			
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_name_asc'),
				'value' => 'pd.name-ASC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=pd.name&order=ASC' . $url)
			);

			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_name_desc'),
				'value' => 'pd.name-DESC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=pd.name&order=DESC' . $url)
			);

			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_price_asc'),
				'value' => 'p.price-ASC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.price&order=ASC' . $url)
			); 

			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_price_desc'),
				'value' => 'p.price-DESC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.price&order=DESC' . $url)
			); 
			
if ($product_total != 0)  {
			if ($result['quantity'] <= 0) {
                $rstock = $result['stock_status'];
                } elseif ($this->config->get('config_stock_display')) {
                $rstock = $result['quantity'];
                } else {
                $rstock = $this->language->get('pds_instock');
                }}
			if ($this->config->get('config_review_status')) {
				$this->data['sorts'][] = array(
					'text'  => $this->language->get('text_rating_desc'),
					'value' => 'rating-DESC',
					'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=rating&order=DESC' . $url)
				); 
				
				$this->data['sorts'][] = array(
					'text'  => $this->language->get('text_rating_asc'),
					'value' => 'rating-ASC',
					'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=rating&order=ASC' . $url)
				);
			}
			
			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_model_asc'),
				'value' => 'p.model-ASC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.model&order=ASC' . $url)
			);

			$this->data['sorts'][] = array(
				'text'  => $this->language->get('text_model_desc'),
				'value' => 'p.model-DESC',
				'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.model&order=DESC' . $url)
			);
			
			$url = '';
			
			if (isset($this->request->get['filter'])) {
				$url .= '&filter=' . $this->request->get['filter'];
			}

			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}
			
			$this->data['limits'] = array();
			
			$limits = array_unique(array($this->config->get('config_catalog_limit'), 25, 50, 75, 100));
			
			sort($limits);
	
			foreach($limits as $value){
				$this->data['limits'][] = array(
					'text'  => $value,
					'value' => $value,
					'href'  => $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&limit=' . $value)
				);
			}
			
			$url = '';
			

			if (isset($this->request->get['filter'])) {
				$url .= '&filter=' . $this->request->get['filter'];
			}

			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}
	
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
					
			$pagination = new Pagination();
			$pagination->total = $product_total;
			$pagination->page = $page;
			$pagination->limit = $limit;
			$pagination->text = $this->language->get('text_pagination');
			$pagination->url = $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&page={page}');
		
			$this->data['pagination'] = $pagination->render();
		
			$this->data['sort'] = $sort;
			$this->data['order'] = $order;
			$this->data['limit'] = $limit;
		
			$this->data['continue'] = $this->url->link('common/home');

			if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/category.tpl')) {
				$this->template = $this->config->get('config_template') . '/template/product/category.tpl';
			} else {
				$this->template = 'default/template/product/category.tpl';
			}
			
			$this->children = array(
				'common/column_left',
				'common/column_right',
				'common/content_top',
				'common/content_bottom',
				'common/footer',
				'common/header'
			);
				
			$this->response->setOutput($this->render());										
    	} else {
			$url = '';
			
			if (isset($this->request->get['path'])) {
				$url .= '&path=' . $this->request->get['path'];
			}
			
			if (isset($this->request->get['filter'])) {
				$url .= '&filter=' . $this->request->get['filter'];
			}
				
									
			if (isset($this->request->get['sort'])) {
				$url .= '&sort=' . $this->request->get['sort'];
			}	

			if (isset($this->request->get['order'])) {
				$url .= '&order=' . $this->request->get['order'];
			}
				
			if (isset($this->request->get['page'])) {
				$url .= '&page=' . $this->request->get['page'];
			}
						
			if (isset($this->request->get['limit'])) {
				$url .= '&limit=' . $this->request->get['limit'];
			}
						
			$this->data['breadcrumbs'][] = array(
				'text'      => $this->language->get('text_error'),
				'href'      => $this->url->link('product/category', $url),
				'separator' => $this->language->get('text_separator')
			);
				
			$this->document->setTitle($this->language->get('text_error'));

      		$this->data['heading_title'] = $this->language->get('text_error');

      		$this->data['text_error'] = $this->language->get('text_error');

      		$this->data['button_continue'] = $this->language->get('button_continue');

      		$this->data['continue'] = $this->url->link('common/home');

			if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {
				$this->template = $this->config->get('config_template') . '/template/error/not_found.tpl';
			} else {
				$this->template = 'default/template/error/not_found.tpl';
			}
			
			$this->children = array(
				'common/column_left',
				'common/column_right',
				'common/content_top',
				'common/content_bottom',
				'common/footer',
				'common/header'
			);
					
			$this->response->setOutput($this->render());
		}
  	}
}
?>

 

 

Интересно, что до установки нового модуля не было проблем у системы с объявлением переменной "result". А теперь вдруг появилась )

Змінено користувачем Zapuzin
Надіслати
Поділитися на інших сайтах


16 минут назад, smartcoder сказал:

Я могу исправить только платно, если вам нужно - пишите в ЛС.

Благодарю за предложение. 

Платно исправить эту проблему могут многие. И это крайний случай )

Пока любопытство сильнее платных услуг, а там будем посмотреть )

Рано, или поздно я и с этой проблемой справлюсь - с помощью форумчан, или с помощью великих и могучих поисковиков, или с помощью платной услуги )

 

Змінено користувачем Zapuzin
Надіслати
Поділитися на інших сайтах


Нет, вы просто тратите неоплаченное время других людей ради своего "любопытства", для чего оно? И так же это ваше время, вы могли бы своим делом полезным заняться, а так КПД теряется у всех.

Надіслати
Поділитися на інших сайтах

Такой уродился. Пытаюсь решать проблемы самостоятельно.

Предлагаете на этом форуме оставить только ветку "Платные услуги"? Остальные не нужны, чтобы не тратить и своё и чужое время?

Это всё демагогия. 

По-прежнему рассчитываю на любую помощь форумчан, или  хотя бы намека на решение этой проблемы.

Змінено користувачем Zapuzin
Надіслати
Поділитися на інших сайтах


Есть общие вопросы, которые задают на форуме и получают ответы на них. Ваш вопрос - это исправьте мне код бесплатно пожалуйста. 

Вам написали в каких файлах нужно смотреть решение задачи вашей.

Дело ваше конечно.

Надіслати
Поділитися на інших сайтах

Я и сам в первом сообщении привёл файлы, где искал, и где пытался исправить. 

С обнаружением проблем нет. 

Вот конкретный вопрос: почему переменная "result", которая фигурирует в данных ошибках, была всегда объявлена, а с появлением нового xml файла, стала не объявленной?

Строки нового модуля присутствуют в приведённых кеш файлах.

Не прошу мне исправить код, а прошу только помочь найти причину )

Змінено користувачем Zapuzin
Надіслати
Поділитися на інших сайтах


у вас код vqmod добавляется 2 раза перед строкой

if ($this->config->get('config_review_status')) {

в одном случае это внутри цикла foreach ($results as $result) {
в другом - вне цикла
Ошибка, видимо, возникает тогда, когда переменная $results содержит пустой массив, т.е. цикл не срабатывает

Надіслати
Поділитися на інших сайтах


thentru,

Благодарю.

 

Цикл, наверно, срабатывает, так как на сайте проблем с функционалом модуля "product-display-settings.xml" нет. Всё работает без ошибок.

Странно только то, что раньше систему всё устраивало, и этих ошибок не было.

А с появлением, предположительно, этих строчек в представленных файлах (vqcache):

'statuses'    => $result['statuses']['category'],
'stickers'    => $result['statuses']['category_stickers'],

система начала ругаться, но ошибок на сайте в границах модуля не замечено.

 

Подозреваю, что добавление в код, который отображается два раза ( это не ошибка), одной строчки исправит проблему.

Осталось только правильно её прописать. Но это, насколько понял, уже мои проблемы )

 

 

Змінено користувачем Zapuzin
Надіслати
Поділитися на інших сайтах


thentru,

Ради эксперимента убрал код дубль (нижний), на который ругалась система (изменил в xml файле, чтобы вставлялся один раз).

Функционал на сайте в пределах модуля не изменился. Ошибок пока нет.

Похоже, что повторение этого кода ниже не имеет значения.

filterpro отключил.

Мониторю )

Змінено користувачем Zapuzin
Надіслати
Поділитися на інших сайтах


  • 1 year later...

Створіть аккаунт або увійдіть для коментування

Ви повинні бути користувачем, щоб залишити коментар

Створити обліковий запис

Зареєструйтеся для отримання облікового запису. Це просто!

Зареєструвати аккаунт

Вхід

Уже зареєстровані? Увійдіть тут.

Вхід зараз
  • Зараз на сторінці   0 користувачів

    • Ні користувачів, які переглядиють цю сторінку
×
×
  • Створити...

Important Information

На нашому сайті використовуються файли cookie і відбувається обробка деяких персональних даних користувачів, щоб поліпшити користувальницький інтерфейс. Щоб дізнатися для чого і які персональні дані ми обробляємо перейдіть за посиланням . Якщо Ви натиснете «Я даю згоду», це означає, що Ви розумієте і приймаєте всі умови, зазначені в цьому Повідомленні про конфіденційність.