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

greychatte

Newbie
  
  • Posts

    8
  • Joined

  • Last visited

Recent Profile Visitors

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

greychatte's Achievements

Rookie

Rookie (2/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In
  • Conversation Starter

Recent Badges

0

Reputation

  1. Спасибо! Но теперь вот такое в консоли выдает: Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check xhr.spec.whatwg.org.
  2. Добрый день, уважаемые! Прикрутила простейший скрипт ajax для загрузки товаров в product/category.tpl. <script> $('.sliderArrow').on('click', '.toPageButton', function(){ $.ajax({ url: '/catalog/controller/product/category.php', type: "get", data: $('.toPageButton').attr('href') , success: function(data){ alert(data); }, error: function() {} }); }); </script> А в результате он мне пишет: Fatal error: Class 'Controller' not found in /catalog/controller/product/category.php on line 3. Файл category.php не меняла. Что я делаю не так?
  3. Очистила, теперь все еще хуже - изображение вообще не подтягиваются в подкатегории. Изменения в category.php делала и через Дизайн/редактор шаблона и через FTP - и ничего...
  4. Еще вариант - если оборачиваю картинку в ссылку {% for category in categories %} <li> <a href="{{ category.href }}"><img src="{{ category.thumb}} " alt="{{ category.name }}" title="{{ category.name }}" class="img-responsive" /></a> <a href="{{ category.href }}">{{ category.name }}</a> </li> {% endfor %} тогда становится src="_"
  5. Да, кеш чистила. Мне кажется, что проблема где-то в пути к картинкам, но я не настолько хорошо знаю opencart, чтобы понять где именно проблема.
  6. <img src="{{ category.thumb }}" alt="{{ category.name }}" title="{{ category.name }}" class="img-2-thumbnail" /> Делала и так, тогда вообще не выводит картинки - src пустой.
  7. Добрый день! Помогите, пожалуйста, вывести подкатегории картинками в Opencart 3. В /catalog/controller/product/category.php перед $data['categories'][] = array добавила строчки: if ($result['image']) { $image = $this->model_tool_image->resize($result['image'], $this->config->get('theme_' . $this->config->get('config_theme') . '_image_category_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_category_height')); } else { $image = $this->model_tool_image->resize('placeholder.png', $this->config->get('theme_' . $this->config->get('config_theme') . '_image_category_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_category_height')); } В $data['categories'][] = array добавила 'thumb' => $image В /template/extension/module/category.twig после {% if categories %} <h3>{{ text_refine }}</h3> {% if categories|length <= 5 %} добавила {% for category in categories %} <li> {% if thumb %} <img src="{{ thumb }}" alt="{{ category.name }}" title="{{ category.name }}" class="img-2-thumbnail" /> {% endif %} <a href="{{ category.href }}">{{ category.name }}</a> </li> {% endfor %} Выводит картинки категории вместо картинок подкатегории. Что я делаю не правильно?
×
×
  • 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.