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

Как сделать вывод картинок категорий в боковом меню opencart?


Recommended Posts

Добрый день уважаемые форумчане!
Очень нужна ваша помощь, ибо не понимаю куда двигаться дальше.
В стандартном модуле получается без проблем, а здесь стопор...

Добавила в нужное место в .../category.tpl

<?php if ($category['image']) { ?>
<img src="<?php echo $category['image']; ?>"/>
<?php } else { ?>
<?php } ?>

Начала добавлять в .../category.php и не пойму куда вставлять 'image' => $image

Вот часть кода:

$data['active'] = end($parts);
$data['active'] = 0;


$data['categories'] = array();

$categories = $this->model_catalog_tree_cats->getTreeCats();
foreach($categories as $id => $category){
$categories[$id]['href'] = $this->url->link('product/category', 'path=' . $category['category_id']);

$data['categories_tree'] = $this->model_catalog_tree_cats->getMapTree($categories);

return $this->load->view('extension/module/tree_cats', $data);

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

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