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

Gudro

Користувачі
  
  • Публікації

    696
  • З нами

  • Відвідування

Повідомлення, опубліковані користувачем Gudro

  1. Для Gudro и redya:

     

     

    в языковых пакетах в симпле (/catalog/language/ukrainian/checkout/simplecheckout.php) нужно заменить  

     

    "$_['text_items']                     = 'Товаров: %s (%s)';" 

     

    на:

     

    "$_['text_items']                     = '<div class="products"><b>%s</b> товаров, </div><div class="prices">на <b>%s</b></div>';"

    спасибо. как кстати плюсики ставить?

  2. 1. Стилизация под другой шаблон как убрать, в симпле даже выскакивает ?

    a1f0b992f02e.jpg

    e6fd6c0eeca2.jpg

    2. при НЕЗАПОЛНЕНИИ поля в быстром заказе. Как исправить?

    bb5701aebe60.jpg

    3. Нет возможности настроить стили. исправляю одно ползет другое.

    6cdf185b8d89.jpg

    04ef8c1e3f82.jpg

    db0a42229627.jpg

     

    версия модуля последняя. только обновил

    Все исправлено, автор встроил модуль в дизайн шаблона. спасибо.

  3. 1. Стилизация под другой шаблон как убрать, в симпле даже выскакивает ?

    a1f0b992f02e.jpg

    e6fd6c0eeca2.jpg

    2. при НЕЗАПОЛНЕНИИ поля в быстром заказе. Как исправить?

    bb5701aebe60.jpg

    3. Нет возможности настроить стили. исправляю одно ползет другое.

    6cdf185b8d89.jpg

    04ef8c1e3f82.jpg

    db0a42229627.jpg

     

    версия модуля последняя. только обновил

  4. +1. Давай

    считаем 1000 уже есть. ждем еще участников.

    а пока для придания соответствующего вида курсору при наведении на слово "ОЧИСТИТЬ" внесть в файл /catalog/view/theme/coloring/stylesheet/filterpro.css выделенное жирным

     

    #filterpro_box .clear_filter {

        border-bottom: 1px dashed;

        text-decoration: none;

        float: right;

       cursor: pointer

  5. У меня тоже слетает. НО:

     

    Все работает отлично когда просматриваем товар в виде "сетка" - и ничего не слетает

    А вот когда переключаемся на просмотр товара в виде "Список" при переходе на следующую или любую другую страницу отфильтрованного товара, слетают настройки фильтра.

    подтверждаю на списке слетают настройки

  6. 1. где сделать прозрачный фон как в демо шаблоне,  у меня белый. все излазил в демо админке не могу найти. 

    2. где сделать меню категория как в демо шаблоне 

    разобрался

  7. Странная у Вас ошибка, Вам  самому не кажется?

    отсутствие product_id  на странице категорий...

    Это родная переменная движка

    Шаблон файлов движка не заменяет

    Как Вы без этой переменной раньше жили? Может, предыдущий шаблон заменил контроллер страницы категорий

    Можете из установочного архива OCSTORE ( не шаблона) обновить файл catalog/controller/product/category.tpl

     

    Шаблон такие ошибки не выдаёт

    заменил все равно ошибка, при чем колличество ошибок пропорционально количеству подкатегорий. А сами ошибки выскакивают в тех категориях где есть подкатегории.
  8. Ну и где эти строки?

     

    Есть куча он-лайн сервисов которые номеруют строки кода

    ух ты, прикольные сервисы я и не зал :-)

    1. <?php

    2. class ControllerProductCategory extends Controller {

    3.  

    4. // menu 3rd level

    5. private function getChildrenData2( $ctg_id, $path_prefix ){

    6. $children_data = array();

    7. $children = $this->model_catalog_category->getCategories($ctg_id);

    8.  

    9. foreach ($children as $child) {

    10. $data = array(

    11. 'filter_category_id' => $child['category_id'],

    12. 'filter_sub_category' => true

    13. );

    14.  

    15. $product_total = $this->model_catalog_product->getTotalProducts($data);

    16.  

    17. $children_data[] = array(

    18. 'name' => $child['name'] .($this->config->get('config_product_count') ? ' (' . $product_total . ')' : ''),

    19. 'href' => $this->url->link('product/category', 'path=' . $path_prefix . '_' . $child['category_id'])

    20. );

    21. }

    22. return $children_data;

    23. }

    24.  

    25. public function index() {

    26. if ($this->request->server['REQUEST_METHOD'] == 'POST' && isset($this->request->post['fp_redirect'])){

    27. $this->session->data['fp_data'] = $this->request->post;

    28. $this->redirect($this->request->post['fp_redirect']);

    29. }

    30. $fp_data = false;

    31. if(isset($this->session->data['fp_data'])) {

    32. $fp_data = $this->session->data['fp_data'];

    33. }

    34.  

    35. $this->language->load('product/product');

    36.  

    37. $this->language->load('product/category');

    38.  

    39. $this->load->model('catalog/category');

    40.  

    41. $this->load->model('catalog/product');

    42. $this->load->model('catalog/set');

    43.  

    44. $this->load->model('tool/image');

    45.  

    46.  

    47. $this->document->addScript('catalog/view/javascript/jquery/colorbox/jquery.colorbox-min.js');

    48. $this->document->addStyle('catalog/view/javascript/jquery/colorbox/colorbox.css');

    49.  

    50.  

    51.  

    52. if (isset($this->request->get['filter'])) {

    53. $filter = $this->request->get['filter'];

    54. } else {

    55. $filter = '';

    56. }

    57.  

    58.  

    59. if (isset($this->request->get['sort'])) {

    60. $sort = $this->request->get['sort'];

    61. } else {

    62. $sort = 'p.sort_order';

    63. }

    64.  

    65. if (isset($this->request->get['order'])) {

    66. $order = $this->request->get['order'];

    67. } else {

    68. $order = 'ASC';

    69. }

    70.  

    71. if (isset($this->request->get['page'])) {

    72. $page = $this->request->get['page'];

    73. } else {

    74. $page = 1;

    75. }

    76.  

    77. if (isset($this->request->get['limit'])) {

    78. $limit = $this->request->get['limit'];

    79. } else {

    80. $limit = $this->config->get('config_catalog_limit');

    81. }

    82.  

    83.  

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

    85.  

    86. $this->data['breadcrumbs'][] = array(

    87. 'text' => $this->language->get('text_home'),

    88. 'href' => $this->url->link('common/home'),

    89. 'separator' => false

    90. );

    91.  

    92. if (isset($this->request->get['path'])) {

    93. $url = '';

    94.  

    95.  

    96. // Option FIlter

    97. if (isset($this->request->get['option_filter'])) {

    98. $url .= '&option_filter=' . $this->request->get['option_filter'];

    99. $option_filter = $this->request->get['option_filter'];

    100. } else {

    101. $option_filter = '';

    102. }

    103. // Option FIlter

    104.  

    105. if (isset($this->request->get['sort'])) {

    106. $url .= '&sort=' . $this->request->get['sort'];

    107. }

    108.  

    109. if (isset($this->request->get['order'])) {

    110. $url .= '&order=' . $this->request->get['order'];

    111. }

    112.  

    113. if (isset($this->request->get['limit'])) {

    114. $url .= '&limit=' . $this->request->get['limit'];

    115. }

    116.  

    117.  

    118. $path = '';

    119.  

    120. $parts = explode('_', (string)$this->request->get['path']);

    121.  

    122. $category_id = (int)array_pop($parts);

    123.  

    124. foreach ($parts as $path_id) {

    125. if (!$path) {

    126. $path = (int)$path_id;

    127. } else {

    128. $path .= '_' . (int)$path_id;

    129. }

    130.  

    131. $category_info = $this->model_catalog_category->getCategory($path_id);

    132.  

    133. if ($category_info) {

    134. $this->data['breadcrumbs'][] = array(

    135. 'text' => $category_info['name'],

    136. 'href' => $this->url->link('product/category', 'path=' . $path . $url),

    137. 'separator' => $this->language->get('text_separator')

    138. );

    139. }

    140.  

    141. }

    142.  

    143.  

    144. } else {

    145. $category_id = 0;

    146. }

    147.  

    148. $filterpro_seo = false;

    149. $url_data = false;

    150. if(isset($this->request->get['filter_id'])) {

    151. $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "filterpro_seo WHERE `url`='" . $this->db->escape("filter_id=" . $this->request->get['filter_id']) . "'");

    152. if($query->num_rows) {

    153. $filterpro_data = unserialize($query->row['data']);

    154. $filterpro_seo = $filterpro_data['lang'][(int)$this->config->get('config_language_id')];

    155. parse_str(str_replace("&", "&", $filterpro_data['url']), $url_data);

    156. if(!isset($url_data['category_id']) || $url_data['category_id'] != $category_id) {

    157. $this->redirect($this->url->link('error/not_found'));

    158. }

    159. }

    160. }

    161.  

    162.  

    163. $category_info = $this->model_catalog_category->getCategory($category_id);

    164.  

    165. if ($category_info) {

    166. if ($category_info['seo_title']) {

    167. $this->document->setTitle($category_info['seo_title']);

    168. } else {

    169. $this->document->setTitle($category_info['name']);

    170. }

    171.  

    172. $this->document->setDescription($category_info['meta_description']);

    173. $this->document->setKeywords($category_info['meta_keyword']);

    174. $this->document->addScript('catalog/view/javascript/jquery/jquery.total-storage.min.js');

    175.  

    176. if ($category_info['seo_h1']) {

    177. $this->data['heading_title'] = $category_info['seo_h1'];

    178. } else {

    179. $this->data['heading_title'] = $category_info['name'];

    180. }

    181.  

    182. $this->data['text_refine'] = $this->language->get('text_refine');

    183. $this->data['text_empty'] = $this->language->get('text_empty');

    184. $this->data['text_quantity'] = $this->language->get('text_quantity');

    185. $this->data['text_manufacturer'] = $this->language->get('text_manufacturer');

    186. $this->data['text_model'] = $this->language->get('text_model');

    187. $this->data['text_price'] = $this->language->get('text_price');

    188. $this->data['text_tax'] = $this->language->get('text_tax');

    189. $this->data['text_points'] = $this->language->get('text_points');

    190. $this->data['text_compare'] = sprintf($this->language->get('text_compare'), (isset($this->session->data['compare']) ? count($this->session->data['compare']) : 0));

    191. $this->data['text_display'] = $this->language->get('text_display');

    192. $this->data['text_list'] = $this->language->get('text_list');

    193. $this->data['text_grid'] = $this->language->get('text_grid');

    194. $this->data['text_sort'] = $this->language->get('text_sort');

    195. $this->data['text_limit'] = $this->language->get('text_limit');

    196.  

    197. $this->data['button_cart'] = $this->language->get('button_cart');

    198. $this->data['button_wishlist'] = $this->language->get('button_wishlist');

    199. $this->data['button_compare'] = $this->language->get('button_compare');

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

    201.  

    202. // Set the last category breadcrumb

    203. $url = '';

    204.  

    205. if (isset($this->request->get['sort'])) {

    206. $url .= '&sort=' . $this->request->get['sort'];

    207. }

    208.  

    209. if (isset($this->request->get['order'])) {

    210. $url .= '&order=' . $this->request->get['order'];

    211. }

    212.  

    213. if (isset($this->request->get['page'])) {

    214. $url .= '&page=' . $this->request->get['page'];

    215. }

    216.  

    217. if (isset($this->request->get['limit'])) {

    218. $url .= '&limit=' . $this->request->get['limit'];

    219. }

    220.  

    221. $this->data['breadcrumbs'][] = array(

    222. 'text' => $category_info['name'],

    223. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path']),

    224. 'separator' => $this->language->get('text_separator')

    225. );

    226.  

    227.  

    228. if ($category_info['image']) {

    229. $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'));

    230. $this->document->setOgImage($this->data['thumb']);

    231. } else {

    232. $this->data['thumb'] = '';

    233. }

    234.  

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

    236. if($filterpro_seo) {

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

    238. $this->data['heading_title'] = $filterpro_seo['h1'];

    239. $this->document->setTitle($filterpro_seo['title']);

    240. $this->document->setDescription($filterpro_seo['meta_description']);

    241. $this->document->setKeywords($filterpro_seo['meta_keywords']);

    242. }

    243. $this->data['compare'] = $this->url->link('product/compare');

    244.  

    245. $url = '';

    246.  

    247. if (isset($this->request->get['filter'])) {

    248. $url .= '&filter=' . $this->request->get['filter'];

    249. }

    250.  

    251.  

    252. // Option FIlter

    253. if (isset($this->request->get['option_filter'])) {

    254. $url .= '&option_filter=' . $this->request->get['option_filter'];

    255. $option_filter = $this->request->get['option_filter'];

    256. } else {

    257. $option_filter = '';

    258. }

    259. // Option FIlter

    260.  

    261.  

    262. // Price Filter

    263. if (isset($this->request->get['minprice']) && isset($this->request->get['maxprice']) ) {

    264. $url .= '&minprice=' . $this->request->get['minprice'].'&maxprice='.$this->request->get['maxprice'];

    265.  

    266. $max_price = $this->request->get['minprice'];

    267. $min_price = $this->request->get['maxprice'];

    268. } else {

    269. $max_price = '';

    270. $min_price = '';

    271. }

    272. // Price Filter

    273.  

    274. if (isset($this->request->get['sort'])) {

    275. $url .= '&sort=' . $this->request->get['sort'];

    276. }

    277.  

    278. if (isset($this->request->get['order'])) {

    279. $url .= '&order=' . $this->request->get['order'];

    280. }

    281.  

    282. if (isset($this->request->get['limit'])) {

    283. $url .= '&limit=' . $this->request->get['limit'];

    284. }

    285.  

    286. $this->data['categories'] = array();

    287.  

    288. $results = $this->model_catalog_category->getCategories($category_id);

    289.  

    290. foreach ($results as $result) {

    291.  

    292. // Level 3

    293. $children_data = array();

    294. $children = $this->model_catalog_category->getCategories($result['category_id']);

    295. foreach ($children as $child) {

    296. $children_data[] = array(

    297. 'name' => $child['name'],

    298. 'href' => $this->url->link('product/category', 'path='. $this->request->get['path']. '_' . $result['category_id'] . '_' . $child['category_id']),

    299. 'children' => $this->getChildrenData2($child['category_id'], $result['category_id']),

    300. );

    301. }

    302. if ($result['image']) {

    303. $pic = $this->model_tool_image->resize($result['image'], 80,80);

    304. } else {

    305. $pic = false;

    306. }

    307.  

    308. $data = array(

    309. 'filter_category_id' => $result['category_id'],

    310. 'filter_sub_category' => true

    311. );

    312.  

    313. $product_total = $this->model_catalog_product->getTotalProducts($data);

    314.  

    315.  

    316.  

    317. $results_img = $this->model_catalog_product->getProductImages($result['product_id']);

    318. $dop_img = array();

    319. foreach ($results_img as $result_img) {

    320. if ($result_img['image']) {

    321. $image_dop = $this->model_tool_image->resize($result_img['image'], $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));

    322. } else {

    323. $image_dop = $this->model_tool_image->resize('no_image.jpg', $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));

    324. }

    325. $dop_img[] = $image_dop;

    326. }

    327.  

    328.  

    329. if ($result['image']) {

    330. $image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_category_width'), $this->config->get('config_image_category_height'));

    331. } else {

    332. $image = $this->model_tool_image->resize('no_image.jpg', $this->config->get('config_image_category_width'), $this->config->get('config_image_category_height'));

    333. }

    334. $this->data['categories'][] = array(

    335. 'thumb' => $image,

    336.  

    337.  

    338. 'pic' => $pic,

    339. 'children' => $children_data,

    340.  

    341. 'name' => $result['name'] . ($this->config->get('config_product_count') ? ' (' . $product_total . ')' : ''),

    342. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url),

    343. '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'))

    344. );

    345. }

    346.  

    347. $this->data['products'] = array();

    348.  

    349. $data = array(

    350. 'filter_category_id' => $category_id,

    351.  

    352. // Price Filter

    353. 'maxprice' => $max_price,

    354. 'minprice' => $min_price,

    355. // Price Filter

    356.  

    357.  

    358. // Option FIlter

    359. 'option_filter' => $option_filter,

    360. // Option FIlter

    361.  

    362. 'filter_filter' => $filter,

    363. 'sort' => $sort,

    364. 'order' => $order,

    365. 'start' => ($page - 1) * $limit,

    366. 'limit' => $limit

    367. );

    368.  

    369. if($url_data) {

    370. $get = $this->request->get;

    371. unset($get['route']);

    372. unset($get['filter_id']);

    373. $this->request->get['filter_redirect'] = $this->url->link('product/category', http_build_query($get));

    374. $this->request->post = $url_data;

    375.  

    376. $this->load->model('module/filterpro');

    377. list($f1, $f2, $f3, $f4, $f5, $f6, $f7, $f8, $url_data) = $this->model_module_filterpro->getData();

    378. $results = $this->model_module_filterpro->getProducts($url_data);

    379. $product_total = $this->model_module_filterpro->getTotalProducts($url_data);

    380. } elseif($fp_data) {

    381. $this->request->post = $fp_data;

    382.  

    383. $this->load->model('module/filterpro');

    384. list($f1, $f2, $f3, $f4, $f5, $f6, $f7, $f8, $url_data) = $this->model_module_filterpro->getData();

    385.  

    386. $results = $this->model_module_filterpro->getProducts($url_data);

    387. $product_total = $this->model_module_filterpro->getTotalProducts($url_data);

    388. } else {

    389. $results = $this->model_catalog_product->getProducts($data);

    390. //חמג לועמהא getFoundProducts המכזום ןנמגמהטעס סנאחף זו ןמסכו getProducts

    391. //עמכךמ עמדהא מם גהאוע ןנאגטכםמו חםאקוםט ךמכטקוסעגא עמגאנמג

    392. $product_total = $this->model_catalog_product->getFoundProducts();

    393. }

    394.  

    395. foreach ($results as $result) {

    396.  

    397. $results_img = $this->model_catalog_product->getProductImages($result['product_id']);

    398. $dop_img = array();

    399. foreach ($results_img as $result_img) {

    400. if ($result_img['image']) {

    401. $image_dop = $this->model_tool_image->resize($result_img['image'], $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));

    402. } else {

    403. $image_dop = $this->model_tool_image->resize('no_image.jpg', $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));

    404. }

    405. $dop_img[] = $image_dop;

    406. }

    407.  

    408.  

    409. if ($result['image']) {

    410. $image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));

    411. } else {

    412. $image = $this->model_tool_image->resize('no_image.jpg', $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));

    413. }

    414.  

    415. if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {

    416. $price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));

    417. } else {

    418. $price = false;

    419. }

    420.  

    421. if ((float)$result['special']) {

    422. $special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')));

    423. } else {

    424. $special = false;

    425. }

    426.  

    427.  

    428.  

    429. if ((float)$result['special']) {

    430. $mmr_savings = $this->currency->format((($result['special'])-($result['price']))*(-1));

    431. } else {

    432. $mmr_savings = false;

    433. }

    434.  

    435.  

    436. if ($this->config->get('config_tax')) {

    437. $tax = $this->currency->format((float)$result['special'] ? $result['special'] : $result['price']);

    438. } else {

    439. $tax = false;

    440. }

    441.  

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

    443. $rating = (int)$result['rating'];

    444. } else {

    445. $rating = false;

    446. }

    447.  

    448. $this->data['products'][] = array(

    449.  

    450. 'model' => $result['model'],

    451. 'sku' => $result['sku'],

    452. 'upc' => $result['upc'],

    453. 'jan' => $result['jan'],

    454. 'ean' => $result['ean'],

    455. 'isbn' => $result['isbn'],

    456. 'mpn' => $result['mpn'],

    457. 'meta_description'=> $this->config->get('mmr_common_catalog_metadescriptions_enabled') ? $result['meta_description'] : 0,

    458. 'review_count'=> $result['reviews'],

    459. 'viewed'=> $result['viewed'],

    460. 'date_available'=> $result['date_available'],

    461. 'quantity'=> $result['quantity'],

    462. 'stock'=> ($result['quantity']<=0) ? $result['stock_status'] : $this->language->get('text_instock'),

    463. 'mmr_savings'=> $mmr_savings,

    464. 'attribute_groups' => $this->config->get('mmr_common_catalog_attributes_enabled') ? $this->model_catalog_product->getProductAttributes($result['product_id']) : 0,

    465.  

    466.  

    467. 'dop_img' => $dop_img,

    468.  

    469.  

    470. 'product_id' => $result['product_id'],

    471. 'thumb' => $image,

    472. 'is_set' => $this->model_catalog_set->isSetExist($result['product_id']),

    473. 'name' => $result['name'],

    474. 'description' => $this->config->get('mmr_common_catalog_descriptions_enabled') ? utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get('mmr_common_descriptions_limit')) . '..' : 0,

    475. 'price' => $price,

    476. 'special' => $special,

    477.  

    478. 'saving' => round((($result['price'] - $result['special'])/($result['price'] + 0.01))*100, 0),

    479.  

    480. 'tax' => $tax,

    481. 'rating' => $result['rating'],

    482. 'reviews' => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),

    483.  

    484. 'quickview' => $this->url->link('product/quickview', 'product_id=' . $result['product_id']),

    485.  

    486. 'href' => $this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'] . $url)

    487. );

    488. }

    489.  

    490. $url = '';

    491.  

    492. if (isset($this->request->get['filter'])) {

    493. $url .= '&filter=' . $this->request->get['filter'];

    494. }

    495.  

    496.  

    497.  

    498. // Option FIlter

    499. if (isset($this->request->get['option_filter'])) {

    500. $url .= '&option_filter=' . $this->request->get['option_filter'];

    501. }

    502. // Option FIlter

    503.  

    504.  

    505. // Price Filter

    506. if (isset($this->request->get['minprice']) && isset($this->request->get['maxprice']) ) {

    507. $url .= '&minprice=' . $this->request->get['minprice'].'&maxprice='.$this->request->get['maxprice'];

    508. }

    509. // Price Filter

    510.  

    511. if (isset($this->request->get['limit'])) {

    512. $url .= '&limit=' . $this->request->get['limit'];

    513. }

    514.  

    515. $this->data['sorts'] = array();

    516.  

    517. $this->data['sorts'][] = array(

    518. 'text' => $this->language->get('text_default'),

    519. 'value' => 'p.sort_order-ASC',

    520. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url)

    521. );

    522.  

    523. $this->data['sorts'][] = array(

    524. 'text' => $this->language->get('text_name_asc'),

    525. 'value' => 'pd.name-ASC',

    526. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=pd.name&order=ASC' . $url)

    527. );

    528.  

    529. $this->data['sorts'][] = array(

    530. 'text' => $this->language->get('text_name_desc'),

    531. 'value' => 'pd.name-DESC',

    532. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=pd.name&order=DESC' . $url)

    533. );

    534.  

    535. $this->data['sorts'][] = array(

    536. 'text' => $this->language->get('text_price_asc'),

    537. 'value' => 'p.price-ASC',

    538. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.price&order=ASC' . $url)

    539. );

    540.  

    541. $this->data['sorts'][] = array(

    542. 'text' => $this->language->get('text_price_desc'),

    543. 'value' => 'p.price-DESC',

    544. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.price&order=DESC' . $url)

    545. );

    546.  

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

    548. $this->data['sorts'][] = array(

    549. 'text' => $this->language->get('text_rating_desc'),

    550. 'value' => 'rating-DESC',

    551. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=rating&order=DESC' . $url)

    552. );

    553.  

    554. $this->data['sorts'][] = array(

    555. 'text' => $this->language->get('text_rating_asc'),

    556. 'value' => 'rating-ASC',

    557. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=rating&order=ASC' . $url)

    558. );

    559. }

    560.  

    561. $this->data['sorts'][] = array(

    562. 'text' => $this->language->get('text_model_asc'),

    563. 'value' => 'p.model-ASC',

    564. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.model&order=ASC' . $url)

    565. );

    566.  

    567. $this->data['sorts'][] = array(

    568. 'text' => $this->language->get('text_model_desc'),

    569. 'value' => 'p.model-DESC',

    570. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.model&order=DESC' . $url)

    571. );

    572.  

    573. $url = '';

    574.  

    575. if (isset($this->request->get['filter'])) {

    576. $url .= '&filter=' . $this->request->get['filter'];

    577. }

    578.  

    579.  

    580. // Option FIlter

    581. if (isset($this->request->get['option_filter'])) {

    582. $url .= '&option_filter=' . $this->request->get['option_filter'];

    583. }

    584. // Option FIlter

    585.  

    586.  

    587. // Price Filter

    588. if (isset($this->request->get['minprice']) && isset($this->request->get['maxprice']) ) {

    589. $url .= '&minprice=' . $this->request->get['minprice'].'&maxprice='.$this->request->get['maxprice'];

    590. }

    591. // Price Filter

    592.  

    593. if (isset($this->request->get['sort'])) {

    594. $url .= '&sort=' . $this->request->get['sort'];

    595. }

    596.  

    597. if (isset($this->request->get['order'])) {

    598. $url .= '&order=' . $this->request->get['order'];

    599. }

    600.  

    601. $this->data['limits'] = array();

    602.  

    603. $limits = array_unique(array($this->config->get('config_catalog_limit'), 25, 50, 75, 100));

    604.  

    605. sort($limits);

    606.  

    607. foreach($limits as $value){

    608. $this->data['limits'][] = array(

    609. 'text' => $value,

    610. 'value' => $value,

    611. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&limit=' . $value)

    612. );

    613. }

    614.  

    615. $url = '';

    616.  

    617.  

    618. if (isset($this->request->get['filter'])) {

    619. $url .= '&filter=' . $this->request->get['filter'];

    620. }

    621.  

    622.  

    623. // Option FIlter

    624. if (isset($this->request->get['option_filter'])) {

    625. $url .= '&option_filter=' . $this->request->get['option_filter'];

    626. }

    627. // Option FIlter

    628.  

    629.  

    630. // Price Filter

    631. if (isset($this->request->get['minprice']) && isset($this->request->get['maxprice']) ) {

    632. $url .= '&minprice=' . $this->request->get['minprice'].'&maxprice='.$this->request->get['maxprice'];

    633. }

    634. // Price Filter

    635.  

    636. if (isset($this->request->get['sort'])) {

    637. $url .= '&sort=' . $this->request->get['sort'];

    638. }

    639.  

    640. if (isset($this->request->get['order'])) {

    641. $url .= '&order=' . $this->request->get['order'];

    642. }

    643.  

    644. if (isset($this->request->get['limit'])) {

    645. $url .= '&limit=' . $this->request->get['limit'];

    646. }

    647.  

    648. $pagination = new Pagination();

    649. $pagination->total = $product_total;

    650. $pagination->page = $page;

    651. $pagination->limit = $limit;

    652. $pagination->text = $this->language->get('text_pagination');

    653. $pagination->url = $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&page={page}');

    654.  

    655. $this->data['pagination'] = $pagination->render();

    656.  

    657. $this->data['sort'] = $sort;

    658. $this->data['order'] = $order;

    659. $this->data['limit'] = $limit;

    660.  

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

    662.  

    663. if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/category.tpl')) {

    664. $this->template = $this->config->get('config_template') . '/template/product/category.tpl';

    665. } else {

    666. $this->template = 'default/template/product/category.tpl';

    667. }

    668.  

    669. $this->children = array(

    670. 'common/column_left',

    671. 'common/column_right',

    672. 'common/content_top',

    673. 'common/content_bottom',

    674. 'common/footer',

    675. 'common/header'

    676. );

    677.  

    678. $this->response->setOutput($this->render());

    679. } else {

    680. $url = '';

    681.  

    682. if (isset($this->request->get['path'])) {

    683. $url .= '&path=' . $this->request->get['path'];

    684. }

    685.  

    686. if (isset($this->request->get['filter'])) {

    687. $url .= '&filter=' . $this->request->get['filter'];

    688. }

    689.  

    690.  

    691.  

    692. // Option FIlter

    693. if (isset($this->request->get['option_filter'])) {

    694. $url .= '&option_filter=' . $this->request->get['option_filter'];

    695. }

    696. // Option FIlter

    697.  

    698.  

    699. // Price Filter

    700. if (isset($this->request->get['minprice']) && isset($this->request->get['maxprice']) ) {

    701. $url .= '&minprice=' . $this->request->get['minprice'].'&maxprice='.$this->request->get['maxprice'];

    702. }

    703. // Price Filter

    704.  

    705. if (isset($this->request->get['sort'])) {

    706. $url .= '&sort=' . $this->request->get['sort'];

    707. }

    708.  

    709. if (isset($this->request->get['order'])) {

    710. $url .= '&order=' . $this->request->get['order'];

    711. }

    712.  

    713. if (isset($this->request->get['page'])) {

    714. $url .= '&page=' . $this->request->get['page'];

    715. }

    716.  

    717. if (isset($this->request->get['limit'])) {

    718. $url .= '&limit=' . $this->request->get['limit'];

    719. }

    720.  

    721. $this->data['breadcrumbs'][] = array(

    722. 'text' => $this->language->get('text_error'),

    723. 'href' => $this->url->link('product/category', $url),

    724. 'separator' => $this->language->get('text_separator')

    725. );

    726.  

    727. $this->document->setTitle($this->language->get('text_error'));

    728.  

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

    730.  

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

    732.  

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

    734.  

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

    736.  

    737. if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {

    738. $this->template = $this->config->get('config_template') . '/template/error/not_found.tpl';

    739. } else {

    740. $this->template = 'default/template/error/not_found.tpl';

    741. }

    742.  

    743. $this->children = array(

    744. 'common/column_left',

    745. 'common/column_right',

    746. 'common/content_top',

    747. 'common/content_bottom',

    748. 'common/footer',

    749. 'common/header'

    750. );

    751.  

    752. $this->response->setOutput($this->render());

    753. }

    754. }

    755. }

    756. ?>

    757.  

  9. И шаблон каким боком к ошибкам в product/category ?

    Вы хоть бы кеш файл показали

    левым, а если хотите то правым.

    странная методика общения у вас. не первый раз сталкиваюсь.

    ошибка появилась после установки шаблона

    <?php 

    class ControllerProductCategory extends Controller {  
     
                //  menu 3rd level
    private function getChildrenData2( $ctg_id, $path_prefix ){
    $children_data = array();
    $children = $this->model_catalog_category->getCategories($ctg_id);
     
    foreach ($children as $child) {
    $data = array(
    'filter_category_id'  => $child['category_id'],
    'filter_sub_category' => true
    );
     
    $product_total = $this->model_catalog_product->getTotalProducts($data);
     
    $children_data[] = array(
    'name'  => $child['name'] .($this->config->get('config_product_count') ? ' (' . $product_total . ')' : ''),
    'href'  => $this->url->link('product/category', 'path=' . $path_prefix . '_' . $child['category_id'])
    );
    }
    return $children_data;
     
    public function index() { 
    if ($this->request->server['REQUEST_METHOD'] == 'POST' && isset($this->request->post['fp_redirect'])){
    $this->session->data['fp_data'] = $this->request->post;
    $this->redirect($this->request->post['fp_redirect']);
    }
    $fp_data = false;
    if(isset($this->session->data['fp_data'])) {
    $fp_data = $this->session->data['fp_data'];
    }
     
                    $this->language->load('product/product');
                
    $this->language->load('product/category');
     
    $this->load->model('catalog/category');
     
    $this->load->model('catalog/product');
    $this->load->model('catalog/set');
     
    $this->load->model('tool/image'); 
     
                
                    $this->document->addScript('catalog/view/javascript/jquery/colorbox/jquery.colorbox-min.js');
       $this->document->addStyle('catalog/view/javascript/jquery/colorbox/colorbox.css');
                    
            
     
    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 = '';
     
     
                                // Option FIlter
                                 if (isset($this->request->get['option_filter'])) {
                    $url .= '&option_filter=' . $this->request->get['option_filter'];
                    $option_filter = $this->request->get['option_filter'];
                } else {
                    $option_filter = '';
                }
                               // Option 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'];
    }
     
     
    $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("&", "&", $filterpro_data['url']), $url_data);
      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->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');
                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'];
    }
     
     
                                // Option FIlter
                                 if (isset($this->request->get['option_filter'])) {
                    $url .= '&option_filter=' . $this->request->get['option_filter'];
                    $option_filter = $this->request->get['option_filter'];
                } else {
                    $option_filter = '';
                }
                               // Option FIlter
     
     
                                // Price Filter
                                if (isset($this->request->get['minprice']) && isset($this->request->get['maxprice']) ) {
                      $url .= '&minprice=' . $this->request->get['minprice'].'&maxprice='.$this->request->get['maxprice'];
                   
                                $max_price = $this->request->get['minprice'];
                                $min_price = $this->request->get['maxprice'];
                } else {
                    $max_price = '';
                    $min_price = '';
                }
                               // Price 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) {
     
                // Level 3
    $children_data = array();
    $children = $this->model_catalog_category->getCategories($result['category_id']);
    foreach ($children as $child) {
    $children_data[] = array(
    'name'  => $child['name'],
    'href'  => $this->url->link('product/category', 'path='. $this->request->get['path']. '_' . $result['category_id'] . '_' . $child['category_id']),
    'children' => $this->getChildrenData2($child['category_id'], $result['category_id']),
    );
    }
    if ($result['image']) {
    $pic = $this->model_tool_image->resize($result['image'], 80,80);
    } else {
    $pic = false;
    }
     
    $data = array(
    'filter_category_id'  => $result['category_id'],
    'filter_sub_category' => true
    );
     
    $product_total = $this->model_catalog_product->getTotalProducts($data);
     
     
     
    $results_img = $this->model_catalog_product->getProductImages($result['product_id']);
                    $dop_img = array();
                    foreach ($results_img as $result_img) {
                    if ($result_img['image']) {
                    $image_dop = $this->model_tool_image->resize($result_img['image'], $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));
                    } else {
                    $image_dop = $this->model_tool_image->resize('no_image.jpg', $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));
                    }
                     $dop_img[] = $image_dop;
                    }
     
     
                    if ($result['image']) {
                      $image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_category_width'), $this->config->get('config_image_category_height'));
                    } else {
                      $image = $this->model_tool_image->resize('no_image.jpg', $this->config->get('config_image_category_width'), $this->config->get('config_image_category_height'));
                    }
                    $this->data['categories'][] = array(
                      'thumb' => $image,
                    
     
                'pic' => $pic,
    'children' => $children_data,
     
    '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,
     
                                // Price Filter
                                 'maxprice' => $max_price,
                                 'minprice' => $min_price,
                               // Price Filter
     
     
                                // Option FIlter
                                 'option_filter' => $option_filter,
                               // Option FIlter
     
    '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, $f6, $f7, $f8, $url_data) = $this->model_module_filterpro->getData();
    $results = $this->model_module_filterpro->getProducts($url_data);
    $product_total = $this->model_module_filterpro->getTotalProducts($url_data);
    } elseif($fp_data) {
    $this->request->post = $fp_data;
     
    $this->load->model('module/filterpro');
    list($f1, $f2, $f3, $f4, $f5, $f6, $f7, $f8, $url_data) = $this->model_module_filterpro->getData();
     
    $results = $this->model_module_filterpro->getProducts($url_data);
    $product_total = $this->model_module_filterpro->getTotalProducts($url_data);
    } else {
    $results = $this->model_catalog_product->getProducts($data);
    //Вызов метода getFoundProducts должен проводится сразу же после getProducts
    //только тогда он выдает правильное значения количества товаров
    $product_total = $this->model_catalog_product->getFoundProducts(); 
    }
     
    foreach ($results as $result) {
     
    $results_img = $this->model_catalog_product->getProductImages($result['product_id']);
                    $dop_img = array();
                    foreach ($results_img as $result_img) {
                    if ($result_img['image']) {
                    $image_dop = $this->model_tool_image->resize($result_img['image'], $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));
                    } else {
                    $image_dop = $this->model_tool_image->resize('no_image.jpg', $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));
                    }
                     $dop_img[] = $image_dop;
                    }
     
     
    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 ((float)$result['special']) {
       $mmr_savings = $this->currency->format((($result['special'])-($result['price']))*(-1));
       } else {
       $mmr_savings = 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(
     
                    'model' => $result['model'],
                    'sku'   => $result['sku'],
                    'upc'   => $result['upc'],
                    'jan'   => $result['jan'],
                    'ean'   => $result['ean'],
                    'isbn'  => $result['isbn'],
                    'mpn'   => $result['mpn'],
                    'meta_description'=> $this->config->get('mmr_common_catalog_metadescriptions_enabled') ? $result['meta_description'] : 0,
                    'review_count'=> $result['reviews'],
                    'viewed'=> $result['viewed'],
                    'date_available'=> $result['date_available'],
                    'quantity'=> $result['quantity'],
                    'stock'=> ($result['quantity']<=0) ? $result['stock_status'] : $this->language->get('text_instock'),
                    'mmr_savings'=> $mmr_savings,
                    'attribute_groups' => $this->config->get('mmr_common_catalog_attributes_enabled') ? $this->model_catalog_product->getProductAttributes($result['product_id']) : 0,
                    
     
    'dop_img' => $dop_img,
     
     
    'product_id'  => $result['product_id'],
    'thumb'       => $image,
    'is_set' => $this->model_catalog_set->isSetExist($result['product_id']),
    'name'        => $result['name'],
    'description' => $this->config->get('mmr_common_catalog_descriptions_enabled') ? utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get('mmr_common_descriptions_limit')) . '..' : 0,
    'price'       => $price,
    'special'     => $special,
     
    'saving'      => round((($result['price'] - $result['special'])/($result['price'] + 0.01))*100, 0),
     
    'tax'         => $tax,
    'rating'      => $result['rating'],
    'reviews'     => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),
     
    'quickview'        => $this->url->link('product/quickview', 'product_id=' . $result['product_id']),
     
    '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'];
    }
     
     
     
                                // Option FIlter
                                 if (isset($this->request->get['option_filter'])) {
                    $url .= '&option_filter=' . $this->request->get['option_filter'];
                }
                               // Option FIlter
     
     
                              // Price Filter
                                 if (isset($this->request->get['minprice']) && isset($this->request->get['maxprice']) ) {
                                 $url .= '&minprice=' . $this->request->get['minprice'].'&maxprice='.$this->request->get['maxprice'];
                                }
                               // Price 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'];
    }
     
     
                                // Option FIlter
                                 if (isset($this->request->get['option_filter'])) {
                    $url .= '&option_filter=' . $this->request->get['option_filter'];
                }
                               // Option FIlter
     
     
                                  // Price Filter
                                 if (isset($this->request->get['minprice']) && isset($this->request->get['maxprice']) ) {
                                 $url .= '&minprice=' . $this->request->get['minprice'].'&maxprice='.$this->request->get['maxprice'];
                                }
                               // Price 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'];
    }
     
     
                                // Option FIlter
                                 if (isset($this->request->get['option_filter'])) {
                    $url .= '&option_filter=' . $this->request->get['option_filter'];
                }
                               // Option FIlter
     
     
                                  // Price Filter
                                 if (isset($this->request->get['minprice']) && isset($this->request->get['maxprice']) ) {
                                 $url .= '&minprice=' . $this->request->get['minprice'].'&maxprice='.$this->request->get['maxprice'];
                                }
                               // Price 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'];
    }
     
     
     
                                // Option FIlter
                                 if (isset($this->request->get['option_filter'])) {
                    $url .= '&option_filter=' . $this->request->get['option_filter'];
                }
                               // Option FIlter
     
     
                                  // Price Filter
                                 if (isset($this->request->get['minprice']) && isset($this->request->get['maxprice']) ) {
                                 $url .= '&minprice=' . $this->request->get['minprice'].'&maxprice='.$this->request->get['maxprice'];
                                }
                               // Price 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());
    }
      }
    }
    ?>
     
×
×
  • Створити...

Important Information

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