Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

martovytskyi

Newbie
  
  • Posts

    16
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

martovytskyi's Achievements

Apprentice

Apprentice (3/14)

  • First Post
  • Collaborator
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Причём тут стили? О стилях речь не идет. Мне нужно изменить карточку товара. Добавить div, class, иконки и т.д. При изменении в вышеуказанных файлах ничего не добавляется.
  2. так, ну и браузера тоже. Правильные файлы меняю? catalog/view/theme/default/template/product/product.twig и catalog/view/theme/default/template/product/special.twig Правильно?
  3. Приветствую. Не выходить изменить карточку товара. Вношу изменения (любые) в catalog/view/theme/default/template/product/product.twig, но ничего не меняется. Пробовал и через редактор шаблонов и чистил кеш везде, изменения не происходят. Пробовал и тут catalog/view/theme/default/template/product/special.twig. Что делаю не так? Как правильно редактировать. Стилизовать то, что выводится, не выход)
  4. При выводе счетчика товаров в сравнении в header.php, если товара нет в сравнении, получаю ошибку Notice: Undefined index: compare in C:\OpenServer\domains\auntie\catalog\controller\common\header.php on line 38 Вывожу так: $data['text_compare'] = count($this->session->data['compare']);
  5. Да, приблизительно так и делаю, не получается добиться результата вывода : в catalog/controller/product/compare.php $data['count_compare'] = count($this->session->data['compare']); а в header.twig {{ count_compare }} правильно?
  6. Всем привет. Прошу подсказать как вывести количество товаров, которые находятся в сравнении (счетчик) на главную. Возможно есть уже готовое решение? В гугле не нашел
  7. спасибо, код рабочий, просто не туда вставлял
  8. Кеши чищу везде. Вставляю тоже вроде туда {% if categories %} <div class="col-md-12"> <h4 class="block-title"><span>{{ text_category }}</span></h4> <ul> {% for category in categories %} {% if category.children %} <li><a href="{{ category.href }}">{{ category.name }}</a> <img src="{{ category.thumb }}" alt=""> <div> <div class="dropdown-inner"> {% for children in category.children|batch(category.children|length / category.column|round(1, 'ceil')) %} <ul class="list-unstyled"> {% for child in children %} <li><a href="{{ child.href }}">{{ child.name }}</a></li> {% endfor %} </ul> {% endfor %}</div> <a href="{{ category.href }}" class="see-all">{{ text_all }} {{ category.name }}</a> </div> </li> {% else %} <li><a href="{{ category.href }}">{{ category.name }}</a></li> {% endif %} {% endfor %} </ul> </div> {% endif %}
  9. Пробую так: в catalog/controller/common.menu.php <?php class ControllerCommonMenu extends Controller { public function index() { $this->load->language('common/menu'); // Menu $this->load->model('catalog/category'); $this->load->model('catalog/product'); $data['categories'] = array(); $categories = $this->model_catalog_category->getCategories(0); foreach ($categories as $category) { if ($category['top']) { // Level 2 $children_data = array(); $children = $this->model_catalog_category->getCategories($category['category_id']); foreach ($children as $child) { $filter_data = array( 'filter_category_id' => $child['category_id'], 'filter_sub_category' => true ); if ($child['image']) { $child_thumb = $this->model_tool_image->resize($child['image'], 50, 50); } else { $child_thumb = ''; } $children_data[] = array( 'name' => $child['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''), 'thumb' => $child_thumb, 'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']) ); } // Level 1 if ($category['image']) { $category_thumb = $this->model_tool_image->resize($category['image'], 50, 50); } else { $category_thumb = ''; } $data['categories'][] = array( 'name' => $category['name'], 'children' => $children_data, 'thumb' => $category_thumb, 'column' => $category['column'] ? $category['column'] : 1, 'href' => $this->url->link('product/category', 'path=' . $category['category_id']) ); } } return $this->load->view('common/menu', $data); } } дальше в menu.twig добавил но не вывелась картинка категории. Что делаю не так? <img src="{{ category.thumb }}" alt="">
  10. Всем привет. Прошу подсказать как правильно работать с файлами twig с помощью IDE (правки не применются). файл twig.php закомментировал if ($cache) { $config['cache'] = DIR_CACHE; } не помогло. И еще момент. Если редактирую через админку, то потом этот же файл в IDE не обновленный.
  11. В том то и дело что нет. Может проще откатить версию админки? Или заморочиться с реализацией?
×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.