Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Изменение размера изображений категорий


betonkarton
 Share

Recommended Posts

Добрый гдень! Как изменить размер изображений категорий? При загрузке изображения категории картинка обрезается до размера 80х80. 

В редакторе шаблонов картинка категории выводится ик 

 

<img src="{{ thumb }}" alt="{{ heading_title }}" title="{{ heading_title }}"  />

 

т.е. {{ thumb }} - адрес миниатюры категории. Как можно поменять, чтобы выводилась не миниатюра, а полное изображение

 

Спасипотому что

 

Edited by betonkarton
Link to comment
Share on other sites


catalog\controller\product\category.php

if ($category_info['image']) {
                $data['thumb'] = $this->model_tool_image->resize($category_info['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 {
                $data['thumb'] = '';
            }

заменить на

if ($category_info['image']) {
     if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {
           $data['thumb'] =  return $this->config->get('config_ssl') . 'image/' . $category_info['image'];
        }
        else {
           $data['thumb'] =  return $this->config->get('config_url') . 'image/' . $category_info['image'];
     }
            } else {
                $data['thumb'] = '';
            }

 

  • +1 1
Link to comment
Share on other sites

поменяйте размер изображения в админке.

полное изображение гделать нельзя по прилине того что они все разного размера и у вас бугдет каша, размер должен быть одинаковым

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • 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.