Тут уже сложнее, ибо это не штатный функционал. По логике функция должна быть в модели catalog/model/catalog/manufacturer.php Попробуйте поискать по файлам проекта вот эту "фразу" - manufacturer_description
Вот что выдает у меня файл catalog/model/catalog/manufacturer.php Спойлер <?php class ModelCatalogManufacturer extends Model { public function getManufacturer($manufacturer_id) { $query = $this->db->query("SELECT DISTINCT *, md.name AS name FROM " . DB_PREFIX . "manufacturer m LEFT JOIN " . DB_PREFIX . "manufacturer_description md ON (m.manufacturer_id = md.manufacturer_id) LEFT JOIN " . DB_PREFIX . "manufacturer_to_store m2s ON (m.manufacturer_id = m2s.manufacturer_id) WHERE md.language_id = '" . (int)$this->config->get('config_language_id') . "' && m.manufacturer_id = '" . (int)$manufacturer_id . "' AND m2s.store_id = '" . (int)$this->config->get('config_store_id') . "'"); return $query->row; } public function getManufacturers($data = array()) { if ($data) { $sql = "SELECT * FROM " . DB_PREFIX . "manufacturer m LEFT JOIN " . DB_PREFIX . "manufacturer_to_store m2s ON (m.manufacturer_id = m2s.manufacturer_id) LEFT JOIN " . DB_PREFIX . "manufacturer_description md ON (m.manufacturer_id = md.manufacturer_id) WHERE md.language_id = '" . (int)$this->config->get('config_language_id') . "' && m2s.store_id = '" . (int)$this->config->get('config_store_id') . "'"; $sort_data = array( 'name', 'sort_order' ); if (isset($data['sort']) && in_array($data['sort'], $sort_data)) { $sql .= " ORDER BY " . $data['sort']; } else { $sql .= " ORDER BY md.name"; } if (isset($data['order']) && ($data['order'] == 'DESC')) { $sql .= " DESC"; } else { $sql .= " 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']; } $query = $this->db->query($sql); return $query->rows; } else { $manufacturer_data = $this->cache->get('manufacturer.' . (int)$this->config->get('config_language_id').'.'. (int)$this->config->get('config_store_id')); if (!$manufacturer_data) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "manufacturer m LEFT JOIN " . DB_PREFIX . "manufacturer_to_store m2s ON (m.manufacturer_id = m2s.manufacturer_id) LEFT JOIN " . DB_PREFIX . "manufacturer_description md ON (m.manufacturer_id = md.manufacturer_id) WHERE md.language_id = '" . (int)$this->config->get('config_language_id') . "' && m2s.store_id = '" . (int)$this->config->get('config_store_id') . "' ORDER BY md.name"); $manufacturer_data = $query->rows; $this->cache->set('manufacturer.' . (int)$this->config->get('config_language_id') . '.'. (int)$this->config->get('config_store_id'), $manufacturer_data); } return $manufacturer_data; } } }
Тогда возвращаемся к посту выше - http://forum.opencart-russia.ru/threads/opisanie-proizvoditelja.705/page-3#post-39014
Я не понял ! мне нужно вставить часть кода после Эту часть кода ? Только подскажите где именно? Спойлер public function info() { $this->load->language('product/manufacturer'); $this->load->model('catalog/manufacturer'); $this->load->model('catalog/product'); $this->load->model('tool/image'); if (isset($this->request->get['manufacturer_id'])) { $manufacturer_id = (int)$this->request->get['manufacturer_id']; } else { $manufacturer_id = 0; } if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } if (isset($this->request->get['page'])) { $page = $this->request->get['page']; } else { $page = 1; } if (isset($this->request->get['limit'])) { $limit = (int)$this->request->get['limit']; } else { $limit = (int)$this->config->get($this->config->get('config_theme') . '_product_limit'); } $data['breadcrumbs'] = array(); $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/home') ); $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_brand'), 'href' => $this->url->link('product/manufacturer') ); $manufacturer_info = $this->model_catalog_manufacturer->getManufacturer($manufacturer_id); if ($manufacturer_info) { $this->document->setTitle($manufacturer_info['name']); $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']; } $data['breadcrumbs'][] = array( 'text' => $manufacturer_info['name'], 'href' => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . $url) ); $data['heading_title'] = $manufacturer_info['name']; $data['text_empty'] = $this->language->get('text_empty'); $data['text_quantity'] = $this->language->get('text_quantity'); $data['text_manufacturer'] = $this->language->get('text_manufacturer'); $data['text_model'] = $this->language->get('text_model'); $data['text_price'] = $this->language->get('text_price'); $data['text_tax'] = $this->language->get('text_tax'); $data['text_points'] = $this->language->get('text_points'); $data['text_compare'] = sprintf($this->language->get('text_compare'), (isset($this->session->data['compare']) ? count($this->session->data['compare']) : 0)); $data['text_sort'] = $this->language->get('text_sort'); $data['text_limit'] = $this->language->get('text_limit'); $data['button_cart'] = $this->language->get('button_cart'); $data['button_wishlist'] = $this->language->get('button_wishlist'); $data['button_compare'] = $this->language->get('button_compare'); $data['button_continue'] = $this->language->get('button_continue'); $data['button_list'] = $this->language->get('button_list'); $data['button_grid'] = $this->language->get('button_grid'); $data['quick_view'] = $this->language->get('quick_view'); $data['compare'] = $this->url->link('product/compare'); $data['products'] = array(); $filter_data = array( 'filter_manufacturer_id' => $manufacturer_id, 'sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $limit, 'limit' => $limit ); $product_total = $this->model_catalog_product->getTotalProducts($filter_data); $results = $this->model_catalog_product->getProducts($filter_data); foreach ($results as $result) { if ($result['image']) { $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')); } else { $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')); }
Перед строчкой PHP: $data['compare'] = $this->url->link('product/compare'); вставьте PHP: $data['description'] = .......
Спойлер public function info() { $this->load->language('product/manufacturer'); $this->load->model('catalog/manufacturer'); $this->load->model('catalog/product'); $this->load->model('tool/image'); if (isset($this->request->get['manufacturer_id'])) { $manufacturer_id = (int)$this->request->get['manufacturer_id']; } else { $manufacturer_id = 0; } if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } if (isset($this->request->get['page'])) { $page = $this->request->get['page']; } else { $page = 1; } if (isset($this->request->get['limit'])) { $limit = (int)$this->request->get['limit']; } else { $limit = (int)$this->config->get($this->config->get('config_theme') . '_product_limit'); } $data['breadcrumbs'] = array(); $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/home') ); $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_brand'), 'href' => $this->url->link('product/manufacturer') ); $manufacturer_info = $this->model_catalog_manufacturer->getManufacturer($manufacturer_id); if ($manufacturer_info) { $this->document->setTitle($manufacturer_info['name']); $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']; } $data['breadcrumbs'][] = array( 'text' => $manufacturer_info['name'], 'href' => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $this->request->get['manufacturer_id'] . $url) ); $data['heading_title'] = $manufacturer_info['name']; $data['text_empty'] = $this->language->get('text_empty'); $data['text_quantity'] = $this->language->get('text_quantity'); $data['text_manufacturer'] = $this->language->get('text_manufacturer'); $data['text_model'] = $this->language->get('text_model'); $data['text_price'] = $this->language->get('text_price'); $data['text_tax'] = $this->language->get('text_tax'); $data['text_points'] = $this->language->get('text_points'); $data['text_compare'] = sprintf($this->language->get('text_compare'), (isset($this->session->data['compare']) ? count($this->session->data['compare']) : 0)); $data['text_sort'] = $this->language->get('text_sort'); $data['text_limit'] = $this->language->get('text_limit'); $data['button_cart'] = $this->language->get('button_cart'); $data['button_wishlist'] = $this->language->get('button_wishlist'); $data['button_compare'] = $this->language->get('button_compare'); $data['button_continue'] = $this->language->get('button_continue'); $data['button_list'] = $this->language->get('button_list'); $data['button_grid'] = $this->language->get('button_grid'); $data['quick_view'] = $this->language->get('quick_view'); $data['description'] = html_entity_decode($manufacturer_info['description'], ENT_QUOTES, 'UTF-8'); $data['compare'] = $this->url->link('product/compare'); $data['products'] = array(); $filter_data = array( 'filter_manufacturer_id' => $manufacturer_id, 'sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $limit, 'limit' => $limit ); $product_total = $this->model_catalog_product->getTotalProducts($filter_data); $results = $this->model_catalog_product->getProducts($filter_data); foreach ($results as $result) { if ($result['image']) { $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')); } else { $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')); } //added for image swap $images = $this->model_catalog_product->getProductImages($result['product_id']); if(isset($images[0]['image']) && !empty($images)){ $images = $images[0]['image']; }else { $images = $image; } // if ($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')), $this->session->data['currency']); } 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')), $this->session->data['currency']); } else { $special = false; }
Урааа!!! Заработало!! я уже многие варианты перепробовал и наконец то , только осталось ошибку убрать! только что попробовал поставить как раньше ставил перед [$data['products'] = array(); Так же работает в чем тогда проблема была что не работал и модификаторы и кеши чистил а не работал!!! А сейчас работает непонятно! Единственное что шрифт не тот и ошибка с vcmod - ом
По шрифтам смотрите стили, а с vqmod-ом не могу помочь. Его и быть не должно на новых версиях этой cms. А так то у вас там ошибки указывают на то, что переменные не могут быть определены. То бишь на витрину их выводят, а в контроллере про них ни слуху ни духу.
там просто есть несколько модулей которые нужны, но они с vcmob-ом а переносить модули пока не умею для меня признаться сейчас некоторые моменты с опенкартом загоняют в тупик что вообще не понимаю что и как. До этого работал с Престошопом честно там все проще и понятней Большое Спасибо что помогли разрешить задачку а то я ходи по кругу ! Что я должен?
Ребята смотрите что получилось!!! Все вроде как отображается на самом производителе ( бренде) фотография маленькая и на странице бренды получил 2 ошибки https://vizitm.com/index.php?route=product/manufacturer Подскажите кто знает что они означают как можно их исправить и сделать нормальными картинки на станице производителя
Круто, только есть возможность подсказать как описание производителя вывести на страницу товара? Изменил переменную на descriptionmanufacturer и задать в контроллере product.php а затем просто вывести в product.tpl??