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


Post by ralphmitchell » Tue Dec 19, 2017 3:38 am

Yes, I think that the main problem is in the cache too

I just made my first tattoo. This is couple of pearl dolphins. I was waiting for that for a long time


Newbie

Posts

Joined
Mon Dec 18, 2017 8:47 pm

Post by gitbro » Sat Jan 20, 2018 11:44 pm

faria, did you ever get this to work.

New member

Posts

Joined
Sat Oct 31, 2015 6:58 am
Who is online

Users browsing this forum: No registered users and 18 guests