Перейти к публикации
Поиск в
  • Дополнительно...
Искать результаты, содержащие...
Искать результаты в...

Поиск по сайту

Результаты поиска по тегам 'название категорий'.

  • Поиск по тегам

    Введите теги через запятую.
  • Поиск по автору

Тип публикаций


Категории и разделы

  • Основной
    • Новости и анонсы
    • Предложения и пожелания
    • Акции, подарки, конкурсы и награды
  • Opencart 4.x
    • Opencart 4.x: Общие вопросы
    • Opencart 4.x: Установка и обновление
    • Opencart 4.x: Локализация
    • Opencart 4.x: Настройка и оптимизация
    • Opencart 4.x: Песочница
    • Opencart 4.x: Поиск модулей
    • Opencart 4.x: Отчёты об ошибках
  • Opencart 3.x
    • Opencart 3.x: Общие вопросы
    • Opencart 3.x: Установка и обновление
    • Opencart 3.x: Локализация
    • Opencart 3.x: Настройка и оптимизация
    • Opencart 3.x: Песочница
    • Opencart 3.x: Поиск модулей
    • Opencart 3.x: Отчёты об ошибках
  • Opencart 2.x
    • Opencart 2.x: Общие вопросы
    • Opencart 2.x: Установка и обновление
    • Opencart 2.x: Локализация
    • Opencart 2.x: Настройка и оптимизация
    • Opencart 2.x: Песочница
    • Opencart 2.x: Поиск модулей
    • Opencart 2.x / ocStore 2.x: Отчёты об ошибках
  • Реклама и продвижение
    • SEO-вопросы (оптимизация и продвижение магазина)
    • Контекстная реклама
    • Торговые площадки
    • E-commerce tracking и бизнес аналитика
    • Разное
  • Поддержка и ответы на вопросы
    • Общие вопросы
    • Установка, обновление, настройка
    • Шаблоны, дизайн и оформление магазина
    • Модули и дополнения
    • Помощь программистам и разработчикам
    • Мобильная витрина
    • Вопросы безопасности
    • Перевод
    • Отчёты об ошибках
    • Интернет-магазины и электронная коммерция
    • Песочница
  • Services
    • Создание магазинов под ключ
    • Design, layout and templates
    • Programming, creating modules, changing functionality
    • Setting up and minor work on an existing site
    • Обновление версии движка магазина
    • Наполнение магазина
    • Системное администрирование (настройка хостинга, серверов, ПО)
    • Другие услуги
  • Разное
    • Пользовательские обзоры дополнений
    • Примеры сайтов на OpenCart (ocStore)
    • Курилка
    • Предложения по улучшению

Категории

  • Шаблоны
    • Бесплатные шаблоны
    • Платные шаблоны
  • Фильтры
  • Цены, скидки, акции, подарки
  • Реклама и продвижение
  • Бонусы, купоны, программы лояльности
  • Блоги, новости, статьи
  • Покупки, оформление заказа, корзина
  • Опции
  • Атрибуты
  • Серии, Комплекты
  • Поиск
  • SEO, карта сайта, оптимизация
  • Кэширование, сжатие, ускорение
  • Платежные системы
  • Доставки
  • Редакторы
  • Меню, дизайн, внешний вид
  • Слайдшоу, баннеры, галереи
  • Письма, почта, рассылки, sms
  • Обратная связь, звонки
  • Обмен данными
  • Учет в заказе
  • Сравнения, закладки
  • Социальные сети
  • Парсеры
  • Модули
  • Инструменты, утилиты
  • Лицензии
  • Языковые пакеты
  • Прочее
  • Отчеты
  • Сборки
    • ocStore
  • Услуги
    • Графика и дизайн
    • Маркетинг

Категории

  • Служебные документы
  • Оплата
  • Документация Opencart

Категории

  • Общие вопросы
  • Покупка дополнений
  • Для разработчиков
  • Аккаунт
  • Техническая поддержка
  • Финансовый отдел

Блоги

  • Konorws (Разработка и модификация Opencart)
  • Блог mr.Kent)
  • Прожектор Бритни Спирс
  • Layk
  • Продвижение интернет-магазина, seo оптимизация
  • Записная книжка
  • Блог RGB
  • Модули которые сделают сайт лучше
  • Блог веб-студии NeoSeo
  • Useful IT
  • Записи
  • Найденные решения проблем с Opencart
  • ocdroid blog
  • Заметки на полях...
  • Pimur
  • Серж Ткач
  • О жизни, смерти, о бизнесе и Опенкарте
  • Просто мысли от laim731
  • Маркетинг и продвижение интернет-магазина
  • Мой копирайтинг
  • SEO боксинг специального назначения
  • Get-Web Dev
  • Seok
  • Блоги sitecreator-а
  • Best practice
  • Vlad-Egorov-Blog
  • Блог spectre
  • commanddotcom
  • Внимание мошенники
  • Наблюдения обычного человека
  • Блог Rassol2
  • Блог Exploits
  • блог для натуралов
  • Настюша, тут есть темы
  • Пропитано рекламой
  • Tutorial
  • ОтВинта
  • Tg chnls
  • Блог
  • Блог sv2109
  • КАК ОРГАНИЗОВАТЬ НОВОСТНЫЕ ПОДПИСКИ НА БАЗЕ API OPENCART 3/0/2
  • VDS/VPS, серверы под Linux: установка, настройка, оптимизация
  • IT блог
  • Блог
  • Opencart SEO
  • Путёвые заметки о работе магазина NiceBike на платформе OpenCart
  • Blondi Blog
  • Полезные статьи, новости.
  • Блог владельца магазина
  • разное
  • ПРОДАЖА АКАУНТОВ-binance ВЕРИФИЦИРОВАННЫe ЧИСТЫЕ УСПЕВАЙТЕ КУПИТЬ ПО НИЗКОЙ ЦЕНЕ
  • Диспансеризация
  • wozobat
  • quasarbyte
  • Мой блог
  • Igorych
  • aaaaa
  • 👌🔊Bellsouth CUSTOMER support number 1+(8O8)678=9O64-☎phone number
  • Liudmila marketer
  • Заметки реалиста
  • ocstore на ноліках
  • Про Opencart
  • Блог про рутинні процеси в магазині на ocsote
  • Radaevich
  • Плагіни Opencart
  • Крафтовий OpenCart: Старт пригоди. Ціна створення сайту на Опенкарт

Искать результаты в...

Искать результаты, содержащие...


Дата создания

  • Начать

    Конец


Последнее обновление

  • Начать

    Конец


Фильтр по количеству...

Зарегистрирован

  • Начать

    Конец


Группа


Сайт


Skype


Город:


Интересы

  1. Добрый день. Нужна помощь по одному вопросу. Пользуюсь модулем PriceList (версия опенкарта 1.5.5.1). Нужно вывести название категории отдельно для каждого товара ( так как показано на скрине ). Если нужно, могу скинуть код контроллера. Зарание спасибо Controller <?php class ControllerMyocPricelist extends Controller { private $default_limits = array(5,10,25,50,100); public function index() { if($this->config->get('myocwpl_login') && !$this->customer->isLogged()) { $this->session->data['redirect'] = $this->url->link('product/pricelist', '', 'SSL'); $this->redirect($this->url->link('account/login', '', 'SSL')); } $this->language->load('myoc/pricelist'); $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 ); $this->data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('product/pricelist'), 'separator' => $this->language->get('text_separator') ); $this->data['heading_title'] = $this->language->get('heading_title'); $this->data['text_empty'] = $this->language->get('text_empty'); $this->data['button_continue'] = $this->language->get('button_continue'); $this->data['continue'] = $this->url->link('common/home', '', 'SSL'); if($this->config->get('myocwpl_login') && $this->customer->isLogged() && (!$this->config->get('myocwpl_customer_group') || !in_array($this->customer->getCustomerGroupId(), $this->config->get('myocwpl_customer_group')))) { $this->data['error_customer_group'] = $this->language->get('error_customer_group'); } else { $this->pricelist(); $this->document->addStyle(DIR_APPLICATION . 'view/javascript/jquery/fancybox/jquery.fancybox-1.3.4.css'); $this->document->addScript(DIR_APPLICATION . 'view/javascript/jquery/fancybox/jquery.fancybox-1.3.4.pack.js'); $this->document->addStyle(DIR_APPLICATION . 'view/javascript/jquery/colorbox/colorbox.css'); $this->document->addScript(DIR_APPLICATION . 'view/javascript/jquery/colorbox/jquery.colorbox-min.js'); } if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/myoc/pricelist.tpl')) { $this->template = $this->config->get('config_template') . '/template/myoc/pricelist.tpl'; } else { $this->template = 'default/template/myoc/pricelist.tpl'; } $this->children = array( 'common/column_left', 'common/column_right', 'common/content_top', 'common/content_bottom', 'common/footer', 'common/header' ); $this->response->setOutput($this->render()); } public function printable() { if($this->config->get('myocwpl_login') && !$this->customer->isLogged()) { $this->session->data['redirect'] = $this->url->link('product/pricelist', '', 'SSL'); $this->redirect($this->url->link('account/login', '', 'SSL')); } if($this->config->get('myocwpl_login') && $this->customer->isLogged() && (!$this->config->get('myocwpl_customer_group') || !in_array($this->customer->getCustomerGroupId(), $this->config->get('myocwpl_customer_group')))) { $this->redirect($this->url->link('product/pricelist', '', 'SSL')); } //header info if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) { $this->data['base'] = $this->config->get('config_ssl'); } else { $this->data['base'] = $this->config->get('config_url'); } $this->data['links'] = $this->document->getLinks(); $this->data['lang'] = $this->language->get('code'); $this->data['direction'] = $this->language->get('direction'); $this->data['google_analytics'] = html_entity_decode($this->config->get('config_google_analytics'), ENT_QUOTES, 'UTF-8'); if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) { $server = HTTPS_SERVER . 'image/'; } else { $server = HTTP_SERVER . 'image/'; } if ($this->config->get('config_icon') && file_exists(DIR_IMAGE . $this->config->get('config_icon'))) { $this->data['icon'] = $server . $this->config->get('config_icon'); } else { $this->data['icon'] = ''; } $this->data['name'] = $this->config->get('config_name'); if ($this->config->get('config_logo') && file_exists(DIR_IMAGE . $this->config->get('config_logo'))) { $this->data['logo'] = $server . $this->config->get('config_logo'); } else { $this->data['logo'] = ''; } $this->data['store_url'] = $this->data['base']; $this->data['store_title'] = $this->config->get('config_title'); $this->data['store_address'] = nl2br($this->config->get('config_address')); $this->data['store_email'] = $this->config->get('config_email'); $this->data['store_telephone'] = $this->config->get('config_telephone'); //pricelist $this->language->load('myoc/pricelist'); $this->document->setTitle($this->language->get('heading_title')); $this->data['title'] = $this->document->getTitle(); $this->data['heading_title'] = $this->language->get('heading_title'); $this->data['text_empty'] = $this->language->get('text_empty'); $this->pricelist(); if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/myoc/pricelist_print.tpl')) { $this->template = $this->config->get('config_template') . '/template/myoc/pricelist_print.tpl'; } else { $this->template = 'default/template/myoc/pricelist_print.tpl'; } $this->response->setOutput($this->render()); } private function pricelist() { $this->load->model('catalog/product'); $this->load->model('catalog/category'); $this->load->model('tool/image'); if (isset($this->request->get['catid'])) { $catid = $this->request->get['catid']; } else { $catid = 0; } if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'pd.name'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } if (isset($this->request->get['limit'])) { $limit = $this->request->get['limit']; } else { $limit = $this->default_limits[0]; } if (isset($this->request->get['page'])) { $page = $this->request->get['page']; } else { $page = 1; } $this->data['text_limit'] = $this->language->get('text_limit'); $this->data['text_category'] = $this->language->get('text_category'); $this->data['text_print'] = $this->language->get('text_print'); $this->data['text_sku'] = $this->language->get('text_sku'); $this->data['text_upc'] = $this->language->get('text_upc'); $this->data['text_ean'] = $this->language->get('text_ean'); $this->data['text_jan'] = $this->language->get('text_jan'); $this->data['text_isbn'] = $this->language->get('text_isbn'); $this->data['text_mpn'] = $this->language->get('text_mpn'); $this->data['text_discount'] = $this->language->get('text_discount'); $this->data['column_number'] = $this->language->get('column_number'); $this->data['column_image'] = $this->language->get('column_image'); $this->data['column_name'] = $this->language->get('column_name'); $this->data['column_model'] = $this->language->get('column_model'); $this->data['column_rating'] = $this->language->get('column_rating'); $this->data['column_price'] = $this->language->get('column_price'); $this->data['column_stock'] = $this->language->get('column_stock'); $this->data['column_qty'] = $this->language->get('column_qty'); $this->data['column_action'] = $this->language->get('column_action'); $this->data['button_cart'] = $this->language->get('button_cart'); $url = ''; //column header sort href if ($order == 'ASC') { $url .= '&order=DESC'; } else { $url .= '&order=ASC'; } if (isset($this->request->get['page'])) { $url .= '&page=' . $this->request->get['page']; } if (isset($this->request->get['limit'])) { $url .= '&limit=' . $this->request->get['limit']; } if (isset($this->request->get['catid'])) { $url .= '&catid=' . $this->request->get['catid']; } $this->data['sort_name'] = $this->url->link('product/pricelist', '&sort=pd.name' . $url, 'SSL'); $this->data['sort_model'] = $this->url->link('product/pricelist', '&sort=p.model' . $url, 'SSL'); $this->data['sort_rating'] = $this->url->link('product/pricelist', '&sort=rating' . $url, 'SSL'); $this->data['sort_price'] = $this->url->link('product/pricelist', '&sort=p.price' . $url, 'SSL'); $this->data['sort_quantity'] = $this->url->link('product/pricelist', '&sort=p.quantity' . $url, 'SSL'); $url = ''; //limits 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['catid'])) { $url .= '&catid=' . $this->request->get['catid']; } $this->data['limits'] = array(); foreach($this->default_limits as $default_limit) { $this->data['limits'][] = array( 'value' => $default_limit, 'href' => $this->url->link('product/pricelist', $url . '&limit='. $default_limit, 'SSL') ); } $url = ''; //categories 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(); $categories = $this->getCategories(0); foreach($categories as $category) { $path = $this->getPath($category['category_id']); if($path) { $this->data['categories'][$path] = array( 'category_id' => $category['category_id'], 'name' => $path, 'href' => $this->url->link('product/pricelist', $url . '&catid='. $category['category_id'], 'SSL'), ); } ksort($this->data['categories']); } array_unshift($this->data['categories'], array( 'category_id' => 0, 'name' => $this->language->get('text_all_products'), 'href' => $this->url->link('product/pricelist', $url, 'SSL'), )); $url = ''; //redirect, pagination href 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']; } if (isset($this->request->get['catid'])) { $url .= '&catid=' . $this->request->get['catid']; } $data = array( 'sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $limit, 'limit' => $limit, ); if($catid) { $data['filter_category_id'] = $catid; } $this->data['catid'] = $catid; $product_total = $this->model_catalog_product->getTotalProducts($data); if((($page - 1) * $limit) > $product_total) { $this->redirect($this->url->link('product/pricelist', $url, 'SSL')); } $this->data['products'] = array(); $products = $this->model_catalog_product->getProducts($data); foreach($products as $product_info) { if ($this->config->get('config_customer_price') && !$this->customer->isLogged()) { $product_info['price'] = false; } $discount_query = $this->model_catalog_product->getProductDiscounts($product_info['product_id']); $discounts = array(); if($product_info['price']) { foreach ($discount_query as $discount) { $discounts[] = array( 'quantity' => $discount['quantity'], 'price' => $this->currency->format($this->tax->calculate($discount['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))) ); } } $gallery = array(); if($product_info['image']) { $images = $this->model_catalog_product->getProductImages($product_info['product_id']); foreach ($images as $image) { $gallery[] = $this->model_tool_image->resize($image['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')); } } $this->data['products'][$product_info['product_id']] = array( 'image' => $product_info['image'] ? $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')) : $this->model_tool_image->resize('no_image.jpg', $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')), 'popup' => $product_info['image'] ? $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')) : false, 'gallery' => $gallery, 'href' => $this->url->link('product/product', 'product_id=' . $product_info['product_id']), 'name' => $product_info['name'], 'description' => nl2br($this->word_trim(strip_tags(html_entity_decode($product_info['description'], ENT_QUOTES, 'UTF-8')), 25, TRUE)), 'model' => $product_info['model'], 'sku' => isset($product_info['sku']) && $product_info['sku'] ? $product_info['sku'] : FALSE, 'upc' => isset($product_info['upc']) && $product_info['upc'] ? $product_info['upc'] : FALSE, 'ean' => isset($product_info['ean']) && $product_info['ean'] ? $product_info['ean'] : FALSE, 'jan' => isset($product_info['jan']) && $product_info['jan'] ? $product_info['jan'] : FALSE, 'isbn' => isset($product_info['isbn']) && $product_info['isbn'] ? $product_info['isbn'] : FALSE, 'mpn' => isset($product_info['mpn']) && $product_info['mpn'] ? $product_info['mpn'] : FALSE, 'rating' => $product_info['rating'], 'price' => $product_info['price'] ? $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))) : false, 'special' => $product_info['special'] ? $this->currency->format($this->tax->calculate($product_info['special'], $product_info['tax_class_id'], $this->config->get('config_tax'))) : false, 'discounts' => $discounts, 'quantity' => $product_info['quantity'], 'minimum' => $product_info['minimum'], ); } $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/pricelist', $url . '&page={page}', 'SSL'); $this->data['pagination'] = $pagination->render(); //print button if (isset($this->request->get['page'])) { $url .= '&page=' . $this->request->get['page']; } $this->data['print'] = $this->url->link('product/pricelist/printable', $url, 'SSL'); $this->data['sort'] = $sort; $this->data['order'] = $order; $this->data['limit'] = $limit; } private function getCategories($category_id) { $category_data = array(); $this->load->model('catalog/category'); $categories = $this->model_catalog_category->getCategories($category_id); foreach ($categories as $category) { $category_data[] = $category; $children = $this->getCategories($category['category_id']); if ($children) { $category_data = array_merge($children, $category_data); } } return $category_data; } private function getPath($category_id) { $this->load->model('catalog/category'); $category_info = $this->model_catalog_category->getCategory($category_id); if(!$category_info) { return false; } if ($category_info['parent_id']) { return $this->getPath($category_info['parent_id']) . $this->language->get('text_separator') . $category_info['name']; } return $category_info['name']; } private function word_trim($string, $count, $ellipsis = FALSE) { $words = explode(' ', $string); if (count($words) > $count){ array_splice($words, $count); $string = implode(' ', $words); if (is_string($ellipsis)){ $string .= $ellipsis; } elseif ($ellipsis){ $string .= '…'; } } return $string; } } ?>
×
×
  • Создать...

Важная информация

На нашем сайте используются файлы cookie и происходит обработка некоторых персональных данных пользователей, чтобы улучшить пользовательский интерфейс. Чтобы узнать для чего и какие персональные данные мы обрабатываем перейдите по ссылке. Если Вы нажмете «Я даю согласие», это означает, что Вы понимаете и принимаете все условия, указанные в этом Уведомлении о Конфиденциальности.