-
Публікації
60 -
З нами
-
Відвідування
Тип публікації
Профілі
Форум
Маркетплейс
Статті
FAQ
Наші новини
Магазин
Блоги
module__dplus_manager
Усі публікації користувача vlad9bu
-
Спасибо. Файл: catalog/view/theme/default/template/product/search.tpl Передал: 129. url = 'index.php?route=product/search&model=1&filter_description=1'; Так же передал без &model=1 В Обеих случаях чистил кеш и куки броузера. Увы, проблема не решена...((
-
129. url = 'index.php?route=product/search&model=1&description=1'; - таким способом я хотел решить вопрос поиска по описанию, ну заодно и по модели. Все это не я придумал, а выискал со сторонних ресурсов и этого форума. Увы, языками программирования я не владею (малость HTML & CSS). По этому вынужден обращаться к Вам, дорогие форумчане. Предоставляю метод из файла catalog/model/catalog/product.php public function getProducts($data = array()) { if ($this->customer->isLogged()) { $customer_group_id = $this->customer->getCustomerGroupId(); } else { $customer_group_id = $this->config->get('config_customer_group_id'); } $cache = md5(http_build_query($data)); $product_data = $this->cache->get('product.' . (int)$this->config->get('config_language_id') . '.' . (int)$this->config->get('config_store_id') . '.' . (int)$customer_group_id . '.' . $cache); if (!$product_data) { $sql = "SELECT p.product_id, (SELECT AVG(rating) AS total FROM " . DB_PREFIX . "review r1 WHERE r1.product_id = p.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating FROM " . DB_PREFIX . "product p LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (p.product_id = p2s.product_id)"; if (!empty($data['filter_category_id'])) { $sql .= " LEFT JOIN " . DB_PREFIX . "product_to_category p2c ON (p.product_id = p2c.product_id)"; } $sql .= " WHERE pd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "'"; if (!empty($data['filter_category_id'])) { if (!empty($data['filter_sub_category'])) { $implode_data = array(); $implode_data[] = (int)$data['filter_category_id']; $this->load->model('catalog/category'); $categories = $this->model_catalog_category->getCategoriesByParentId($data['filter_category_id']); foreach ($categories as $category_id) { $implode_data[] = (int)$category_id; } $sql .= " AND p2c.category_id IN (" . implode(', ', $implode_data) . ")"; } else { $sql .= " AND p2c.category_id = '" . (int)$data['filter_category_id'] . "'"; } } if (!empty($data['filter_name']) || !empty($data['filter_tag'])) { $sql .= " AND ("; if (!empty($data['filter_name'])) { if (!empty($data['filter_description'])) { $sql .= "LCASE(pd.name) LIKE '%" . $this->db->escape(utf8_strtolower($data['filter_name'])) . "%' OR MATCH(pd.description) AGAINST('" . $this->db->escape(utf8_strtolower($data['filter_name'])) . "')"; } else { $sql .= "LCASE(pd.name) LIKE '%" . $this->db->escape(utf8_strtolower($data['filter_name'])) . "%'"; } } if (!empty($data['filter_name']) && !empty($data['filter_tag'])) { $sql .= " OR "; } if (!empty($data['filter_tag'])) { $sql .= "MATCH(pd.tag) AGAINST('" . $this->db->escape(utf8_strtolower($data['filter_tag'])) . "')"; } $sql .= ")"; if (!empty($data['filter_name'])) { $sql .= " OR LCASE(p.model) = '" . $this->db->escape(utf8_strtolower($data['filter_name'])) . "'"; } if (!empty($data['filter_name'])) { $sql .= " OR LCASE(p.sku) = '" . $this->db->escape(utf8_strtolower($data['filter_name'])) . "'"; } if (!empty($data['filter_name'])) { $sql .= " OR LCASE(p.upc) = '" . $this->db->escape(utf8_strtolower($data['filter_name'])) . "'"; } if (!empty($data['filter_name'])) { $sql .= " OR LCASE(p.ean) = '" . $this->db->escape(utf8_strtolower($data['filter_name'])) . "'"; } if (!empty($data['filter_name'])) { $sql .= " OR LCASE(p.jan) = '" . $this->db->escape(utf8_strtolower($data['filter_name'])) . "'"; } if (!empty($data['filter_name'])) { $sql .= " OR LCASE(p.isbn) = '" . $this->db->escape(utf8_strtolower($data['filter_name'])) . "'"; } if (!empty($data['filter_name'])) { $sql .= " OR LCASE(p.mpn) = '" . $this->db->escape(utf8_strtolower($data['filter_name'])) . "'"; } } if (!empty($data['filter_manufacturer_id'])) { $sql .= " AND p.manufacturer_id = '" . (int)$data['filter_manufacturer_id'] . "'"; } $sql .= " GROUP BY p.product_id"; $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); if (isset($data['sort']) && in_array($data['sort'], $sort_data)) { if ($data['sort'] == 'pd.name' || $data['sort'] == 'p.model') { $sql .= " ORDER BY LCASE(" . $data['sort'] . ")"; } else { $sql .= " ORDER BY " . $data['sort']; } } else { $sql .= " ORDER BY p.sort_order"; } if (isset($data['order']) && ($data['order'] == 'DESC')) { $sql .= " DESC, LCASE(pd.name) DESC"; } else { $sql .= " ASC, LCASE(pd.name) ASC"; } if (isset($data['start']) || isset($data['limit'])) { if ($data['start'] < 0) { $data['start'] = 0; } if ($data['limit'] < 1) { $data['limit'] = 20; } $sql .= " LIMIT " . (int)$data['start'] . "," . (int)$data['limit']; } $product_data = array(); $query = $this->db->query($sql); foreach ($query->rows as $result) { $product_data[$result['product_id']] = $this->getProduct($result['product_id']); } $this->cache->set('product.' . (int)$this->config->get('config_language_id') . '.' . (int)$this->config->get('config_store_id') . '.' . (int)$customer_group_id . '.' . $cache, $product_data); } return $product_data; }
-
1. Изменялся но не сильно. Убрал отображение "список/секта". По умолчанию поставил "сетка" путем изменения всех product-list на product-grid. Так же замени строку С 129. url = 'index.php?route=product/search'; НА 129. url = 'index.php?route=product/search&model=1&description=1'; . Ничего криминального. Но Вашим советом воспользовался и заменил мой файл, файлом из архива. Почистил куки и кэш броузера,.. УВЫ. Проблему это не решило... 2. Предоставляю код search.php (в кэше vqmod'a нет такого файла). <?php class ControllerProductSearch extends Controller { public function index() { $this->language->load('product/search'); $this->load->model('catalog/category'); $this->load->model('catalog/product'); $this->load->model('tool/image'); if (isset($this->request->get['filter_name'])) { $filter_name = $this->request->get['filter_name']; } else { $filter_name = ''; } if (isset($this->request->get['tag'])) { $filter_tag = $this->request->get['filter_tag']; } elseif (isset($this->request->get['filter_name'])) { $filter_tag = $this->request->get['filter_name']; } else { $filter_tag = ''; } if (isset($this->request->get['filter_description'])) { $filter_description = $this->request->get['filter_description']; } else { $filter_description = ''; } if (isset($this->request->get['filter_category_id'])) { $filter_category_id = $this->request->get['filter_category_id']; } else { $filter_category_id = 0; } if (isset($this->request->get['filter_sub_category'])) { $filter_sub_category = $this->request->get['filter_sub_category']; } else { $filter_sub_category = ''; } 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'); } if (isset($this->request->get['filter_name'])) { $this->document->setTitle($this->language->get('heading_title') . ' - ' . $this->request->get['filter_name']); } else { $this->document->setTitle($this->language->get('heading_title')); } $this->data['breadcrumbs'] = array(); $this->data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/home'), 'separator' => false ); $url = ''; if (isset($this->request->get['filter_name'])) { $url .= '&filter_name=' . urlencode(html_entity_decode($this->request->get['filter_name'], ENT_QUOTES, 'UTF-8')); } if (isset($this->request->get['tag'])) { $url .= '&filter_tag=' . urlencode(html_entity_decode($this->request->get['filter_tag'], ENT_QUOTES, 'UTF-8')); } if (isset($this->request->get['filter_description'])) { $url .= '&filter_description=' . $this->request->get['filter_description']; } if (isset($this->request->get['filter_category_id'])) { $url .= '&filter_category_id=' . $this->request->get['filter_category_id']; } if (isset($this->request->get['filter_sub_category'])) { $url .= '&filter_sub_category=' . $this->request->get['filter_sub_category']; } 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('heading_title'), 'href' => $this->url->link('product/search', $url), 'separator' => $this->language->get('text_separator') ); if (isset($this->request->get['filter_name'])) { $this->data['heading_title'] = $this->language->get('heading_title') . ' - ' . $this->request->get['filter_name']; } else { $this->data['heading_title'] = $this->language->get('heading_title'); } $this->data['text_empty'] = $this->language->get('text_empty'); $this->data['text_critea'] = $this->language->get('text_critea'); $this->data['text_search'] = $this->language->get('text_search'); $this->data['text_keyword'] = $this->language->get('text_keyword'); $this->data['text_category'] = $this->language->get('text_category'); $this->data['text_sub_category'] = $this->language->get('text_sub_category'); $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['entry_search'] = $this->language->get('entry_search'); $this->data['entry_description'] = $this->language->get('entry_description'); $this->data['button_search'] = $this->language->get('button_search'); $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['compare'] = $this->url->link('product/compare'); $this->load->model('catalog/category'); // 3 Level Category Search $this->data['categories'] = array(); $categories_1 = $this->model_catalog_category->getCategories(0); foreach ($categories_1 as $category_1) { $level_2_data = array(); $categories_2 = $this->model_catalog_category->getCategories($category_1['category_id']); foreach ($categories_2 as $category_2) { $level_3_data = array(); $categories_3 = $this->model_catalog_category->getCategories($category_2['category_id']); foreach ($categories_3 as $category_3) { $level_3_data[] = array( 'category_id' => $category_3['category_id'], 'name' => $category_3['name'], ); } $level_2_data[] = array( 'category_id' => $category_2['category_id'], 'name' => $category_2['name'], 'children' => $level_3_data ); } $this->data['categories'][] = array( 'category_id' => $category_1['category_id'], 'name' => $category_1['name'], 'children' => $level_2_data ); } $this->data['products'] = array(); if (isset($this->request->get['filter_name']) || isset($this->request->get['tag'])) { $data = array( 'filter_name' => $filter_name, 'filter_tag' => $filter_tag, 'filter_description' => $filter_description, 'filter_category_id' => $filter_category_id, 'filter_sub_category' => $filter_sub_category, 'sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $limit, 'limit' => $limit ); $product_total = $this->model_catalog_product->getTotalProducts($data); $results = $this->model_catalog_product->getProducts($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, 100) . '..', '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', $url . '&product_id=' . $result['product_id']) ); } $url = ''; if (isset($this->request->get['filter_name'])) { $url .= '&filter_name=' . urlencode(html_entity_decode($this->request->get['filter_name'], ENT_QUOTES, 'UTF-8')); } if (isset($this->request->get['filter_tag'])) { $url .= '&filter_tag=' . urlencode(html_entity_decode($this->request->get['filter_tag'], ENT_QUOTES, 'UTF-8')); } if (isset($this->request->get['filter_description'])) { $url .= '&filter_description=' . $this->request->get['filter_description']; } if (isset($this->request->get['filter_category_id'])) { $url .= '&filter_category_id=' . $this->request->get['filter_category_id']; } if (isset($this->request->get['filter_sub_category'])) { $url .= '&filter_sub_category=' . $this->request->get['filter_sub_category']; } 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/search', '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/search', '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/search', '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/search', '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/search', '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/search', 'sort=rating&order=DESC' . $url) ); $this->data['sorts'][] = array( 'text' => $this->language->get('text_rating_asc'), 'value' => 'rating-ASC', 'href' => $this->url->link('product/search', '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/search', '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/search', 'sort=p.model&order=DESC' . $url) ); $url = ''; if (isset($this->request->get['filter_name'])) { $url .= '&filter_name=' . urlencode(html_entity_decode($this->request->get['filter_name'], ENT_QUOTES, 'UTF-8')); } if (isset($this->request->get['filter_tag'])) { $url .= '&filter_tag=' . urlencode(html_entity_decode($this->request->get['filter_tag'], ENT_QUOTES, 'UTF-8')); } if (isset($this->request->get['filter_description'])) { $url .= '&filter_description=' . $this->request->get['filter_description']; } if (isset($this->request->get['filter_category_id'])) { $url .= '&filter_category_id=' . $this->request->get['filter_category_id']; } if (isset($this->request->get['filter_sub_category'])) { $url .= '&filter_sub_category=' . $this->request->get['filter_sub_category']; } 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(); $this->data['limits'][] = array( 'text' => $this->config->get('config_catalog_limit'), 'value' => $this->config->get('config_catalog_limit'), 'href' => $this->url->link('product/search', $url . '&limit=' . $this->config->get('config_catalog_limit')) ); $this->data['limits'][] = array( 'text' => 40, 'value' => 40, 'href' => $this->url->link('product/search', $url . '&limit=40') ); $this->data['limits'][] = array( 'text' => 60, 'value' => 60, 'href' => $this->url->link('product/search', $url . '&limit=60') ); $this->data['limits'][] = array( 'text' => 80, 'value' => 80, 'href' => $this->url->link('product/search', $url . '&limit=80') ); $this->data['limits'][] = array( 'text' => 100, 'value' => 100, 'href' => $this->url->link('product/search', $url . '&limit=100') ); $url = ''; if (isset($this->request->get['filter_name'])) { $url .= '&filter_name=' . urlencode(html_entity_decode($this->request->get['filter_name'], ENT_QUOTES, 'UTF-8')); } if (isset($this->request->get['filter_tag'])) { $url .= '&filter_tag=' . urlencode(html_entity_decode($this->request->get['filter_tag'], ENT_QUOTES, 'UTF-8')); } if (isset($this->request->get['filter_description'])) { $url .= '&filter_description=' . $this->request->get['filter_description']; } if (isset($this->request->get['filter_category_id'])) { $url .= '&filter_category_id=' . $this->request->get['filter_category_id']; } if (isset($this->request->get['filter_sub_category'])) { $url .= '&filter_sub_category=' . $this->request->get['filter_sub_category']; } 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/search', $url . '&page={page}'); $this->data['pagination'] = $pagination->render(); } $this->data['filter_name'] = $filter_name; $this->data['filter_description'] = $filter_description; $this->data['filter_category_id'] = $filter_category_id; $this->data['filter_sub_category'] = $filter_sub_category; $this->data['sort'] = $sort; $this->data['order'] = $order; $this->data['limit'] = $limit; if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/search.tpl')) { $this->template = $this->config->get('config_template') . '/template/product/search.tpl'; } else { $this->template = 'default/template/product/search.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()); } } ?>
-
Осталось решить вопрос с поисковиком. Мне кажется, что как и с футером, где то, что то незначительное и все уже не так работает. Все еще жду Вашей помощи. Спасибо.
-
БОЛЬШОЕ СПАСИБО! Очень ясный и расширенный ответ)) Всю голову сломал... Наверное из за модулей. Грешу на модуль "недавно просмотренные товары". Тегов </div> вообще не было. Было вот так: $('.time').timepicker({timeFormat: 'h:m'}); //--></script> <?php echo $footer; ?> Еще раз спасибо. Напишите в ЛС номер ВМ отблагодарю!
-
Исходник моего search.tpl <?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?> <div id="content"><?php echo $content_top; ?> <div class="breadcrumb"> <?php foreach ($breadcrumbs as $breadcrumb) { ?> <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a> <?php } ?> </div> <h1><?php echo $heading_title; ?></h1> <b><?php echo $text_critea; ?></b> <div class="content"> <p><?php echo $entry_search; ?> <?php if ($filter_name) { ?> <input type="text" name="filter_name" value="<?php echo $filter_name; ?>" /> <?php } else { ?> <input type="text" name="filter_name" value="<?php echo $filter_name; ?>" onclick="this.value = '';" onkeydown="this.style.color = '000000'" style="color: #999;" /> <?php } ?> <select name="filter_category_id"> <option value="0"><?php echo $text_category; ?></option> <?php foreach ($categories as $category_1) { ?> <?php if ($category_1['category_id'] == $filter_category_id) { ?> <option value="<?php echo $category_1['category_id']; ?>" selected="selected"><?php echo $category_1['name']; ?></option> <?php } else { ?> <option value="<?php echo $category_1['category_id']; ?>"><?php echo $category_1['name']; ?></option> <?php } ?> <?php foreach ($category_1['children'] as $category_2) { ?> <?php if ($category_2['category_id'] == $filter_category_id) { ?> <option value="<?php echo $category_2['category_id']; ?>" selected="selected"> <?php echo $category_2['name']; ?></option> <?php } else { ?> <option value="<?php echo $category_2['category_id']; ?>"> <?php echo $category_2['name']; ?></option> <?php } ?> <?php foreach ($category_2['children'] as $category_3) { ?> <?php if ($category_3['category_id'] == $filter_category_id) { ?> <option value="<?php echo $category_3['category_id']; ?>" selected="selected"> <?php echo $category_3['name']; ?></option> <?php } else { ?> <option value="<?php echo $category_3['category_id']; ?>"> <?php echo $category_3['name']; ?></option> <?php } ?> <?php } ?> <?php } ?> <?php } ?> </select> <?php if ($filter_sub_category) { ?> <input type="checkbox" name="filter_sub_category" value="1" id="sub_category" checked="checked" /> <?php } else { ?> <input type="checkbox" name="filter_sub_category" value="1" id="sub_category" /> <?php } ?> <label for="sub_category"><?php echo $text_sub_category; ?></label> </p> <?php if ($filter_description) { ?> <input type="checkbox" name="filter_description" value="1" id="description" checked="checked" /> <?php } else { ?> <input type="checkbox" name="filter_description" value="1" id="description" /> <?php } ?> <label for="description"><?php echo $entry_description; ?></label> </div> <div class="buttons"> <div class="right"><input type="button" value="<?php echo $button_search; ?>" id="button-search" class="button" /></div> </div> <h2><?php echo $text_search; ?></h2> <?php if ($products) { ?> <div class="product-filter"> <!--<div class="display"><b><?php echo $text_display; ?></b> <?php echo $text_list; ?> <b>/</b> <a onclick="display('grid');"><?php echo $text_grid; ?></a></div>--> <div class="limit"><?php echo $text_limit; ?> <select onchange="location = this.value;"> <?php foreach ($limits as $limits) { ?> <?php if ($limits['value'] == $limit) { ?> <option value="<?php echo $limits['href']; ?>" selected="selected"><?php echo $limits['text']; ?></option> <?php } else { ?> <option value="<?php echo $limits['href']; ?>"><?php echo $limits['text']; ?></option> <?php } ?> <?php } ?> </select> </div> <div class="sort"><?php echo $text_sort; ?> <select onchange="location = this.value;"> <?php foreach ($sorts as $sorts) { ?> <?php if ($sorts['value'] == $sort . '-' . $order) { ?> <option value="<?php echo $sorts['href']; ?>" selected="selected"><?php echo $sorts['text']; ?></option> <?php } else { ?> <option value="<?php echo $sorts['href']; ?>"><?php echo $sorts['text']; ?></option> <?php } ?> <?php } ?> </select> </div> </div> <!--<div class="product-compare"><a href="<?php echo $compare; ?>" id="compare-total"><?php echo $text_compare; ?></a></div>--> <div class="product-list"> <?php foreach ($products as $product) { ?> <div> <?php if ($product['thumb']) { ?> <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div> <?php } ?> <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div> <div class="description"><?php echo $product['description']; ?></div> <?php if ($product['price']) { ?> <div class="price"> <?php if (!$product['special']) { ?> <?php echo $product['price']; ?> <?php } else { ?> <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span> <?php } ?> <?php if ($product['tax']) { ?> <br /> <span class="price-tax"><?php echo $text_tax; ?> <?php echo $product['tax']; ?></span> <?php } ?> </div> <?php } ?> <?php if ($product['rating']) { ?> <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div> <?php } ?> <div class="cart"><input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" /></div> <div class="wishlist"><a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><?php echo $button_wishlist; ?></a></div> <!--<div class="compare"><a onclick="addToCompare('<?php echo $product['product_id']; ?>');"><?php echo $button_compare; ?></a></div>--> </div> <?php } ?> </div> <div class="pagination"><?php echo $pagination; ?></div> <?php } else { ?> <div class="content"><?php echo $text_empty; ?></div> <?php }?> <?php echo $content_bottom; ?></div> <script type="text/javascript"><!-- $('#content input[name=\'filter_name\']').keydown(function(e) { if (e.keyCode == 13) { $('#button-search').trigger('click'); } }); $('#button-search').bind('click', function() { url = 'index.php?route=product/search&model=1&description=1'; var filter_name = $('#content input[name=\'filter_name\']').attr('value'); if (filter_name) { url += '&filter_name=' + encodeURIComponent(filter_name); } var filter_category_id = $('#content select[name=\'filter_category_id\']').attr('value'); if (filter_category_id > 0) { url += '&filter_category_id=' + encodeURIComponent(filter_category_id); } var filter_sub_category = $('#content input[name=\'filter_sub_category\']:checked').attr('value'); if (filter_sub_category) { url += '&filter_sub_category=true'; } var filter_description = $('#content input[name=\'filter_description\']:checked').attr('value'); if (filter_description) { url += '&filter_description=true'; } location = url; }); function display(view) { if (view == 'list') { $('.product-grid').attr('class', 'product-list'); $('.product-list > div').each(function(index, element) { html = '<div class="right">'; html += ' <div class="cart">' + $(element).find('.cart').html() + '</div>'; html += ' <div class="wishlist">' + $(element).find('.wishlist').html() + '</div>'; <!--html += ' <div class="compare">' + $(element).find('.compare').html() + '</div>';--> html += '</div>'; html += '<div class="left">'; var image = $(element).find('.image').html(); if (image != null) { html += '<div class="image">' + image + '</div>'; } var price = $(element).find('.price').html(); if (price != null) { html += '<div class="price">' + price + '</div>'; } html += ' <div class="name">' + $(element).find('.name').html() + '</div>'; html += ' <div class="description">' + $(element).find('.description').html() + '</div>'; var rating = $(element).find('.rating').html(); if (rating != null) { html += '<div class="rating">' + rating + '</div>'; } html += '</div>'; $(element).html(html); }); $('.display').html('<b><?php echo $text_display; ?></b> <?php echo $text_list; ?> <b>/</b> <a onclick="display(\'grid\');"><?php echo $text_grid; ?></a>'); $.cookie('display', 'list'); } else { $('.product-list').attr('class', 'product-grid'); $('.product-grid > div').each(function(index, element) { html = ''; var image = $(element).find('.image').html(); if (image != null) { html += '<div class="image">' + image + '</div>'; } html += '<div class="name">' + $(element).find('.name').html() + '</div>'; html += '<div class="description">' + $(element).find('.description').html() + '</div>'; var price = $(element).find('.price').html(); if (price != null) { html += '<div class="price">' + price + '</div>'; } var rating = $(element).find('.rating').html(); if (rating != null) { html += '<div class="rating">' + rating + '</div>'; } html += '<div class="cart">' + $(element).find('.cart').html() + '</div>'; html += '<div class="wishlist">' + $(element).find('.wishlist').html() + '</div>'; <!--html += '<div class="compare">' + $(element).find('.compare').html() + '</div>';--> $(element).html(html); }); $('.display').html('<b><?php echo $text_display; ?></b> <a onclick="display(\'list\');"><?php echo $text_list; ?></a> <b>/</b> <?php echo $text_grid; ?>'); $.cookie('display', 'grid'); } } view = $.cookie('display'); if (view) { display(view); } else { display('grid'); } //--></script> <?php echo $footer; ?>
-
Здравствуйте дорогие форумчане. Вот, все время находил ответы на данном форуме, но случай вынудил меня создать тему. Практически готов мой магазин, вот сейчас провожу финальную настройку и проверку систем, устанавливаю необходимые модули и т.д. Во время проверки обнаружил, что поиск не ищет по описанию товара. По модели ищет, по названию ищет, по категориям ищет, а по описанию товара не ищет. Вот мой сайт http://alcosale.org. P.S. Так же, если не сложно, не могу понять в чем причина - футер как то странно себя ведет на странице с товаром http://alcosale.org/grant-s-william-1l-viski-grants-1l?filter_name=484-01&filter_description=true&filter_sub_category=true (в любом товаре такая ерунда). На всех остальных страницах все гуд. Не пойму в чем причина. P.S.S. Если необходимо, готов отблагодарить, да и просто тоже готов) Заранее спасибо за ответ.