Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.90 KB | None | 0 0
  1. $data['options'] = array();
  2. foreach ($this->model_catalog_product->getProductOptions($this->request->get['product_id']) as $option) {
  3. $product_option_value_data = array();
  4. foreach ($option['product_option_value'] as $option_value) {
  5. if (!$option_value['subtract'] || ($option_value['quantity'] > 0)) {
  6. if ((($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) && (float)$option_value['price']) {
  7. $price = $this->currency->format(($this->tax->calculate($option_value['price'], $product_info['tax_class_id'], $this->config->get('config_tax') ? 'P' : false)), $this->session->data['currency']);
  8. } else {
  9. $price = false;
  10. }
  11. $product_option_value_data[] = array(
  12. 'product_option_value_id' => $option_value['product_option_value_id'],
  13. 'option_value_id' => $option_value['option_value_id'],
  14. 'name' => $option_value['name'],
  15. 'image' => $this->ave->cropsize($option_value['image'], 50, 50),
  16. 'price' => $price,
  17. 'price_prefix' => $option_value['price_prefix']
  18. );
  19. }
  20. }
  21. $data['options'][] = array(
  22. 'product_option_id' => $option['product_option_id'],
  23. 'product_option_value' => $product_option_value_data,
  24. 'option_id' => $option['option_id'],
  25. 'name' => $option['name'],
  26. 'type' => $option['type'],
  27. 'value' => $option['value'],
  28. 'required' => $option['required']
  29. );
  30. }
  31.  
  32. <?php foreach ($options as $option) { ?>
  33. <?php if ($option['type'] == 'checkbox') { ?>
  34. <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>">
  35. <label class="control-label"><?php echo $option['name']; ?></label>
  36. <div id="input-option<?php echo $option['product_option_id']; ?>">
  37. <?php foreach ($option['product_option_value'] as $option_value) { ?>
  38. div class="checkbox">
  39. <label>
  40. <input type="checkbox" name="option[<?php echo $option['product_option_id']; ?>][]" value="<?php echo $option_value['product_option_value_id']; ?>" />
  41. <?php if ($option_value['image']) { ?>
  42. <img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" class="img-thumbnail" />
  43. <?php } ?>
  44. <?php echo $option_value['name']; ?>
  45. <?php if ($option_value['price']) { ?>(<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
  46. <?php }
  47. </label>
  48. </div>
  49. <?php } ?>
  50. </div>
  51. </div>
  52. <?php } ?>
  53. <?php } ?>
  54.  
  55. <?php
  56. class ControllerProductCategory extends Controller {
  57. public function index() {
  58. $this->load->language('product/category');
  59.  
  60. $this->load->model('catalog/category');
  61.  
  62. $this->load->model('catalog/product');
  63.  
  64. $this->load->model('tool/image');
  65.  
  66. if (isset($this->request->get['filter'])) {
  67. $filter = $this->request->get['filter'];
  68. } else {
  69. $filter = '';
  70. }
  71.  
  72. if (isset($this->request->get['sort'])) {
  73. $sort = $this->request->get['sort'];
  74. } else {
  75. $sort = 'p.sort_order';
  76. }
  77.  
  78. if (isset($this->request->get['order'])) {
  79. $order = $this->request->get['order'];
  80. } else {
  81. $order = 'ASC';
  82. }
  83.  
  84. if (isset($this->request->get['page'])) {
  85. $page = $this->request->get['page'];
  86. } else {
  87. $page = 1;
  88. }
  89.  
  90. if (isset($this->request->get['limit'])) {
  91. $limit = (int)$this->request->get['limit'];
  92. } else {
  93. $limit = $this->config->get($this->config->get('config_theme') . '_product_limit');
  94. }
  95.  
  96. $data['breadcrumbs'] = array();
  97.  
  98. $data['breadcrumbs'][] = array(
  99. 'text' => $this->language->get('text_home'),
  100. 'href' => $this->url->link('common/home')
  101. );
  102.  
  103. if (isset($this->request->get['path'])) {
  104. $url = '';
  105.  
  106. if (isset($this->request->get['sort'])) {
  107. $url .= '&sort=' . $this->request->get['sort'];
  108. }
  109.  
  110. if (isset($this->request->get['order'])) {
  111. $url .= '&order=' . $this->request->get['order'];
  112. }
  113.  
  114. if (isset($this->request->get['limit'])) {
  115. $url .= '&limit=' . $this->request->get['limit'];
  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. $data['breadcrumbs'][] = array(
  135. 'text' => $category_info['name'],
  136. 'href' => $this->url->link('product/category', 'path=' . $path . $url)
  137. );
  138. }
  139. }
  140. } else {
  141. $category_id = 0;
  142. }
  143.  
  144. $category_info = $this->model_catalog_category->getCategory($category_id);
  145.  
  146. if ($category_info) {
  147. $this->document->setTitle($category_info['meta_title']);
  148. $this->document->setDescription($category_info['meta_description']);
  149. $this->document->setKeywords($category_info['meta_keyword']);
  150.  
  151. $data['heading_title'] = $category_info['name'];
  152.  
  153. $data['text_refine'] = $this->language->get('text_refine');
  154. $data['text_empty'] = $this->language->get('text_empty');
  155. $data['text_quantity'] = $this->language->get('text_quantity');
  156. $data['text_manufacturer'] = $this->language->get('text_manufacturer');
  157. $data['text_model'] = $this->language->get('text_model');
  158. $data['text_price'] = $this->language->get('text_price');
  159. $data['text_tax'] = $this->language->get('text_tax');
  160. $data['text_points'] = $this->language->get('text_points');
  161. $data['text_compare'] = sprintf($this->language->get('text_compare'), (isset($this->session->data['compare']) ? count($this->session->data['compare']) : 0));
  162. $data['text_sort'] = $this->language->get('text_sort');
  163. $data['text_limit'] = $this->language->get('text_limit');
  164.  
  165. $data['button_cart'] = $this->language->get('button_cart');
  166. $data['button_wishlist'] = $this->language->get('button_wishlist');
  167. $data['button_compare'] = $this->language->get('button_compare');
  168. $data['button_continue'] = $this->language->get('button_continue');
  169. $data['button_list'] = $this->language->get('button_list');
  170. $data['button_grid'] = $this->language->get('button_grid');
  171.  
  172. // Set the last category breadcrumb
  173. $data['breadcrumbs'][] = array(
  174. 'text' => $category_info['name'],
  175. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'])
  176. );
  177.  
  178. if ($category_info['image']) {
  179. $data['thumb'] = $this->model_tool_image->resize($category_info['image'], $this->config->get($this->config->get('config_theme') . '_image_category_width'), $this->config->get($this->config->get('config_theme') . '_image_category_height'));
  180. } else {
  181. $data['thumb'] = '';
  182. }
  183.  
  184. $data['description'] = html_entity_decode($category_info['description'], ENT_QUOTES, 'UTF-8');
  185. $data['compare'] = $this->url->link('product/compare');
  186.  
  187. $url = '';
  188.  
  189. if (isset($this->request->get['filter'])) {
  190. $url .= '&filter=' . $this->request->get['filter'];
  191. }
  192.  
  193. if (isset($this->request->get['sort'])) {
  194. $url .= '&sort=' . $this->request->get['sort'];
  195. }
  196.  
  197. if (isset($this->request->get['order'])) {
  198. $url .= '&order=' . $this->request->get['order'];
  199. }
  200.  
  201. if (isset($this->request->get['limit'])) {
  202. $url .= '&limit=' . $this->request->get['limit'];
  203. }
  204.  
  205. $data['categories'] = array();
  206.  
  207. $results = $this->model_catalog_category->getCategories($category_id);
  208.  
  209. foreach ($results as $result) {
  210. $filter_data = array(
  211. 'filter_category_id' => $result['category_id'],
  212. 'filter_sub_category' => true
  213. );
  214.  
  215. $data['categories'][] = array(
  216. 'name' => $result['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''),
  217. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url)
  218. );
  219. }
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226. $data['products'] = array();
  227.  
  228. $filter_data = array(
  229. 'filter_category_id' => $category_id,
  230. 'filter_filter' => $filter,
  231. 'sort' => $sort,
  232. 'order' => $order,
  233. 'start' => ($page - 1) * $limit,
  234. 'limit' => $limit
  235. );
  236.  
  237. $product_total = $this->model_catalog_product->getTotalProducts($filter_data);
  238.  
  239. $results = $this->model_catalog_product->getProducts($filter_data);
  240.  
  241. foreach ($results as $result) {
  242. if ($result['image']) {
  243. $image = $this->model_tool_image->resize($result['image'], $this->config->get($this->config->get('config_theme') . '_image_product_width'), $this->config->get($this->config->get('config_theme') . '_image_product_height'));
  244. } else {
  245. $image = $this->model_tool_image->resize('placeholder.png', $this->config->get($this->config->get('config_theme') . '_image_product_width'), $this->config->get($this->config->get('config_theme') . '_image_product_height'));
  246. }
  247.  
  248. if ($this->customer->isLogged() || !$this->config->get('config_customer_price')) {
  249. $price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
  250. } else {
  251. $price = false;
  252. }
  253.  
  254. if ((float)$result['special']) {
  255. $special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
  256. } else {
  257. $special = false;
  258. }
  259.  
  260. if ($this->config->get('config_tax')) {
  261. $tax = $this->currency->format((float)$result['special'] ? $result['special'] : $result['price'], $this->session->data['currency']);
  262. } else {
  263. $tax = false;
  264. }
  265.  
  266. if ($this->config->get('config_review_status')) {
  267. $rating = (int)$result['rating'];
  268. } else {
  269. $rating = false;
  270. }
  271.  
  272. $data['options'] = array();
  273.  
  274. foreach ($this->model_catalog_product->getProductOptions($this->request->get['product_id']) as $option) {
  275. $product_option_value_data = array();
  276.  
  277. foreach ($option['product_option_value'] as $option_value) {
  278. if (!$option_value['subtract'] || ($option_value['quantity'] > 0)) {
  279. if ((($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) && (float)$option_value['price']) {
  280. $price = $this->currency->format(($this->tax->calculate($option_value['price'], $product_info['tax_class_id'], $this->config->get('config_tax') ? 'P' : false)), $this->session->data['currency']);
  281. } else {
  282. $price = false;
  283. }
  284.  
  285. $product_option_value_data[] = array(
  286. 'product_option_value_id' => $option_value['product_option_value_id'],
  287. 'option_value_id' => $option_value['option_value_id'],
  288. 'name' => $option_value['name'],
  289. 'image' => $this->ave->cropsize($option_value['image'], 50, 50),
  290. 'price' => $price,
  291. 'price_prefix' => $option_value['price_prefix']
  292. );
  293. }
  294. }
  295.  
  296. $data['options'][] = array(
  297. 'product_option_id' => $option['product_option_id'],
  298. 'product_option_value' => $product_option_value_data,
  299. 'option_id' => $option['option_id'],
  300. 'name' => $option['name'],
  301. 'type' => $option['type'],
  302. 'value' => $option['value'],
  303. 'required' => $option['required']
  304. );
  305. }
  306.  
  307.  
  308. $data['products'][] = array(
  309. 'product_id' => $result['product_id'],
  310. 'thumb' => $image,
  311. 'name' => $result['name'],
  312. 'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get($this->config->get('config_theme') . '_product_description_length')) . '..',
  313. 'price' => $price,
  314. 'special' => $special,
  315. 'tax' => $tax,
  316. 'minimum' => $result['minimum'] > 0 ? $result['minimum'] : 1,
  317. 'rating' => $result['rating'],
  318. 'href' => $this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'] . $url)
  319. );
  320. }
  321.  
  322. $url = '';
  323.  
  324. if (isset($this->request->get['filter'])) {
  325. $url .= '&filter=' . $this->request->get['filter'];
  326. }
  327.  
  328. if (isset($this->request->get['limit'])) {
  329. $url .= '&limit=' . $this->request->get['limit'];
  330. }
  331.  
  332. $data['sorts'] = array();
  333.  
  334. $data['sorts'][] = array(
  335. 'text' => $this->language->get('text_default'),
  336. 'value' => 'p.sort_order-ASC',
  337. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url)
  338. );
  339.  
  340. $data['sorts'][] = array(
  341. 'text' => $this->language->get('text_name_asc'),
  342. 'value' => 'pd.name-ASC',
  343. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=pd.name&order=ASC' . $url)
  344. );
  345.  
  346. $data['sorts'][] = array(
  347. 'text' => $this->language->get('text_name_desc'),
  348. 'value' => 'pd.name-DESC',
  349. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=pd.name&order=DESC' . $url)
  350. );
  351.  
  352. $data['sorts'][] = array(
  353. 'text' => $this->language->get('text_price_asc'),
  354. 'value' => 'p.price-ASC',
  355. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.price&order=ASC' . $url)
  356. );
  357.  
  358. $data['sorts'][] = array(
  359. 'text' => $this->language->get('text_price_desc'),
  360. 'value' => 'p.price-DESC',
  361. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.price&order=DESC' . $url)
  362. );
  363.  
  364. if ($this->config->get('config_review_status')) {
  365. $data['sorts'][] = array(
  366. 'text' => $this->language->get('text_rating_desc'),
  367. 'value' => 'rating-DESC',
  368. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=rating&order=DESC' . $url)
  369. );
  370.  
  371. $data['sorts'][] = array(
  372. 'text' => $this->language->get('text_rating_asc'),
  373. 'value' => 'rating-ASC',
  374. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=rating&order=ASC' . $url)
  375. );
  376. }
  377.  
  378. $data['sorts'][] = array(
  379. 'text' => $this->language->get('text_model_asc'),
  380. 'value' => 'p.model-ASC',
  381. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.model&order=ASC' . $url)
  382. );
  383.  
  384. $data['sorts'][] = array(
  385. 'text' => $this->language->get('text_model_desc'),
  386. 'value' => 'p.model-DESC',
  387. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.model&order=DESC' . $url)
  388. );
  389.  
  390. $url = '';
  391.  
  392. if (isset($this->request->get['filter'])) {
  393. $url .= '&filter=' . $this->request->get['filter'];
  394. }
  395.  
  396. if (isset($this->request->get['sort'])) {
  397. $url .= '&sort=' . $this->request->get['sort'];
  398. }
  399.  
  400. if (isset($this->request->get['order'])) {
  401. $url .= '&order=' . $this->request->get['order'];
  402. }
  403.  
  404. $data['limits'] = array();
  405.  
  406. $limits = array_unique(array($this->config->get($this->config->get('config_theme') . '_product_limit'), 25, 50, 75, 100));
  407.  
  408. sort($limits);
  409.  
  410. foreach($limits as $value) {
  411. $data['limits'][] = array(
  412. 'text' => $value,
  413. 'value' => $value,
  414. 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&limit=' . $value)
  415. );
  416. }
  417.  
  418. $url = '';
  419.  
  420. if (isset($this->request->get['filter'])) {
  421. $url .= '&filter=' . $this->request->get['filter'];
  422. }
  423.  
  424. if (isset($this->request->get['sort'])) {
  425. $url .= '&sort=' . $this->request->get['sort'];
  426. }
  427.  
  428. if (isset($this->request->get['order'])) {
  429. $url .= '&order=' . $this->request->get['order'];
  430. }
  431.  
  432. if (isset($this->request->get['limit'])) {
  433. $url .= '&limit=' . $this->request->get['limit'];
  434. }
  435.  
  436. $pagination = new Pagination();
  437. $pagination->total = $product_total;
  438. $pagination->page = $page;
  439. $pagination->limit = $limit;
  440. $pagination->url = $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&page={page}');
  441.  
  442. $data['pagination'] = $pagination->render();
  443.  
  444. $data['results'] = sprintf($this->language->get('text_pagination'), ($product_total) ? (($page - 1) * $limit) + 1 : 0, ((($page - 1) * $limit) > ($product_total - $limit)) ? $product_total : ((($page - 1) * $limit) + $limit), $product_total, ceil($product_total / $limit));
  445.  
  446. // http://googlewebmastercentral.blogspot.com/2011/09/pagination-with-relnext-and-relprev.html
  447. if ($page == 1) {
  448. $this->document->addLink($this->url->link('product/category', 'path=' . $category_info['category_id'], true), 'canonical');
  449. } elseif ($page == 2) {
  450. $this->document->addLink($this->url->link('product/category', 'path=' . $category_info['category_id'], true), 'prev');
  451. } else {
  452. $this->document->addLink($this->url->link('product/category', 'path=' . $category_info['category_id'] . '&page='. ($page - 1), true), 'prev');
  453. }
  454.  
  455. if ($limit && ceil($product_total / $limit) > $page) {
  456. $this->document->addLink($this->url->link('product/category', 'path=' . $category_info['category_id'] . '&page='. ($page + 1), true), 'next');
  457. }
  458.  
  459. $data['sort'] = $sort;
  460. $data['order'] = $order;
  461. $data['limit'] = $limit;
  462.  
  463. $data['continue'] = $this->url->link('common/home');
  464.  
  465. $data['column_left'] = $this->load->controller('common/column_left');
  466. $data['column_right'] = $this->load->controller('common/column_right');
  467. $data['content_top'] = $this->load->controller('common/content_top');
  468. $data['content_bottom'] = $this->load->controller('common/content_bottom');
  469. $data['footer'] = $this->load->controller('common/footer');
  470. $data['header'] = $this->load->controller('common/header');
  471.  
  472. $this->response->setOutput($this->load->view('product/category', $data));
  473. } else {
  474. $url = '';
  475.  
  476. if (isset($this->request->get['path'])) {
  477. $url .= '&path=' . $this->request->get['path'];
  478. }
  479.  
  480. if (isset($this->request->get['filter'])) {
  481. $url .= '&filter=' . $this->request->get['filter'];
  482. }
  483.  
  484. if (isset($this->request->get['sort'])) {
  485. $url .= '&sort=' . $this->request->get['sort'];
  486. }
  487.  
  488. if (isset($this->request->get['order'])) {
  489. $url .= '&order=' . $this->request->get['order'];
  490. }
  491.  
  492. if (isset($this->request->get['page'])) {
  493. $url .= '&page=' . $this->request->get['page'];
  494. }
  495.  
  496. if (isset($this->request->get['limit'])) {
  497. $url .= '&limit=' . $this->request->get['limit'];
  498. }
  499.  
  500. $data['breadcrumbs'][] = array(
  501. 'text' => $this->language->get('text_error'),
  502. 'href' => $this->url->link('product/category', $url)
  503. );
  504.  
  505. $this->document->setTitle($this->language->get('text_error'));
  506.  
  507. $data['heading_title'] = $this->language->get('text_error');
  508.  
  509. $data['text_error'] = $this->language->get('text_error');
  510.  
  511. $data['button_continue'] = $this->language->get('button_continue');
  512.  
  513. $data['continue'] = $this->url->link('common/home');
  514.  
  515. $this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . ' 404 Not Found');
  516.  
  517. $data['column_left'] = $this->load->controller('common/column_left');
  518. $data['column_right'] = $this->load->controller('common/column_right');
  519. $data['content_top'] = $this->load->controller('common/content_top');
  520. $data['content_bottom'] = $this->load->controller('common/content_bottom');
  521. $data['footer'] = $this->load->controller('common/footer');
  522. $data['header'] = $this->load->controller('common/header');
  523.  
  524. $this->response->setOutput($this->load->view('error/not_found', $data));
  525. }
  526. }
  527. }
  528.  
  529. <div id="product-layout" class="row">
  530. <?php foreach ($products as $product) { ?>
  531. <div class="product-layout product-list col-xs-12">
  532.  
  533. <!-- Custom block user -->
  534.  
  535. <div style="width:100%;height: 400px;background-color: red;opacity: 0.5;">
  536.  
  537. <?php foreach ($options as $option) { ?>
  538. <?php if ($option['type'] == 'checkbox') { ?>
  539. <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>">
  540. <label class="control-label"><?php echo $option['name']; ?></label>
  541. <div id="input-option<?php echo $option['product_option_id']; ?>">
  542. <?php foreach ($option['product_option_value'] as $option_value) { ?>
  543. <div class="checkbox">
  544. <label>
  545. <input type="checkbox" name="option[<?php echo $option['product_option_id']; ?>][]" value="<?php echo $option_value['product_option_value_id']; ?>" />
  546. <?php if ($option_value['image']) { ?>
  547. <img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" class="img-thumbnail" />
  548. <?php } ?>
  549. <?php echo $option_value['name']; ?>
  550. <?php if ($option_value['price']) { ?>
  551. (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
  552. <?php } ?>
  553. </label>
  554. </div>
  555. <?php } ?>
  556. </div>
  557. </div>
  558. <?php $this->response->setOutput($this->load->view('product/category.tpl', $data)); ?>
  559. <?php } ?>
  560.  
  561. <?php } ?>
  562.  
  563. </div>
  564.  
  565. <!-- Custom block user -->
  566.  
  567.  
  568. <div class="tb-product-item">
  569. <div class="tb-image">
  570. <?php if ($product['special'] && $ave->get('category_special_label')) { ?>
  571. <span class="special_bg"><?php echo $ave->text('special_label'); ?></span>
  572. <?php } ?>
  573. <a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" title="<?php echo $product['name']; ?>" class="img-responsive" /></a>
  574. <a class="quickview btn-quick-view" data-id="<?php echo $product['product_id']; ?>" href="<?php echo $product['href']; ?>" title="<?php echo $ave->text('btn_quickview');?>" data-text="<?php echo $product['name'];?>" data-toggle="modal"><i class="fa fa-eye"></i></a>
  575. </div>
  576. <div>
  577. <div class="tb-content">
  578. <div class="tb-product-title"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
  579. <p class="desc"><?php echo $product['description']; ?></p>
  580. <div class="rating"><span class="star-<?php echo $product['rating'];?>"></span></div>
  581. <?php if ($product['price']) { ?>
  582. <div class="tb-product-wrap-price-rating">
  583. <div class="tb-product-price">
  584. <?php if (!$product['special']) { ?>
  585. <?php echo $product['price']; ?>
  586. <?php } else { ?>
  587. <span class="price-old"><?php echo $product['special']; ?></span> <span class="price-new"><?php echo $product['price']; ?></span>
  588. <?php } ?>
  589. </div>
  590. </div>
  591. <?php } ?>
  592. <div class="last-cart l-mrgn">
  593. <?php if($ave->get('category_btn_whistlist')==1){ ?>
  594. <a class="btn-wishlist other-btn" onclick="wishlist.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-heart"></i></a>
  595. <?php } ?>
  596. <?php if($ave->get('category_btn_cart')==1){ ?>
  597. <a class="las4" onclick="cart.add('<?php echo $product['product_id']; ?>');"><?php echo $button_cart; ?></a>
  598. <?php } ?>
  599. <?php if($ave->get('category_btn_compare')==1){ ?>
  600. <a class="btn-compare other-btn" onclick="compare.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-retweet"></i></a>
  601. <?php } ?>
  602. </div>
  603. </div>
  604. </div>
  605. </div>
  606. </div>
  607. <?php } ?>
  608. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement