Post by faria » Tue Oct 10, 2017 9:48 pm

Hi,
I'm using Opencart Version 3.0.2.0, and need to display image/thumb on sub category page.

Tray to change file ...\catalog\controller\product\category.php

after

Code: Select all

'name'=> $result['name'],
add

Code: Select all

'image'=> $this->model_tool_image->resize($result['image'], 80,80),
and change file .... \catalog\view\theme\default\template\product\category.twig

after

Code: Select all

{% for category in categories %}
<li><a href="{{ category.href }}">{{ category.name }}</a></li>
{% endfor %}
add

Code: Select all

 {% for category in categories %}
{% if thumb %}
<div class="col-sm-3"><img src="{{ thumb }}" alt="{{ heading_title }}" title="{{ heading_title }}" class="img-thumbnail" /></div>
 {% endif %}
<li><a href="{{ category.href }}">{{ category.name }}</a></li>
{% endfor %}
but nothing hapend ! ???

Anyone?

Newbie

Posts

Joined
Mon Oct 09, 2017 11:23 pm

Post by yodapt » Tue Oct 10, 2017 10:59 pm

Code: Select all

'thumb'=> $this->model_tool_image->resize($result['image'], 80,80),

Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com


User avatar
Active Member

Posts

Joined
Fri Jun 17, 2011 6:39 pm


Post by faria » Wed Oct 11, 2017 12:04 am

yodapt wrote:
Tue Oct 10, 2017 10:59 pm

Code: Select all

'thumb'=> $this->model_tool_image->resize($result['image'], 80,80),
dont work :(

Newbie

Posts

Joined
Mon Oct 09, 2017 11:23 pm

Post by yodapt » Wed Oct 11, 2017 12:14 am

Did you clear cache?

Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com


User avatar
Active Member

Posts

Joined
Fri Jun 17, 2011 6:39 pm

Who is online

Users browsing this forum: No registered users and 5 guests