Post by majki1975 » Mon Aug 06, 2018 7:48 pm

Hi there!

Need help with removing category image from category page in OC 3.0.2.0.
I'm pretty sure that I need to modify /catalog/view/theme/default/template/product/category.twig file, but I'm not sure if, or what to modify...
Any help please?
Thank you

Newbie

Posts

Joined
Mon Aug 06, 2018 7:42 pm

User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by majki1975 » Mon Aug 06, 2018 10:41 pm

Well for some reason, I must have picture of the category, but it shouldn't be visible on category page...

Newbie

Posts

Joined
Mon Aug 06, 2018 7:42 pm

Post by straightlight » Mon Aug 06, 2018 11:28 pm

majki1975 wrote:
Mon Aug 06, 2018 10:41 pm
Well for some reason, I must have picture of the category, but it shouldn't be visible on category page...
Removing images while wanting to make them invisible may not provide the solution that you need. See this post for an alternate route for your store: viewtopic.php?f=184&t=206182#p731086

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by majki1975 » Mon Aug 06, 2018 11:49 pm

Thanks for reply

Unfortunately, in the link that you provide, I don't see solution, it seems that is not even related to what I'm searching for (maybe I didn't understand it well).
As I recall, for 2.3.0.2, .tpl file was modified with some code (I did it some time ago with help of this forum), and thought that similar solution can be applied with .twig file in 3.x version.
So, can it?

P.S. I must have image since menus of my theme (Journal) are showing those pictures. I just don't want them on the category page, since I'm using custom code.

Thanks

Newbie

Posts

Joined
Mon Aug 06, 2018 7:42 pm

Post by straightlight » Tue Aug 07, 2018 12:22 am

As I recall, for 2.3.0.2, .tpl file was modified with some code (I did it some time ago with help of this forum), and thought that similar solution can be applied with .twig file in 3.x version.
Source unprovided.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by majki1975 » Tue Aug 07, 2018 12:28 am

Thank you for reply
So, If I did understand right, it can't be done via code modification? Can it be done anyhow?

Regards

Newbie

Posts

Joined
Mon Aug 06, 2018 7:42 pm

Post by xxvirusxx » Tue Aug 07, 2018 1:03 am

So you want to show or remove??
]If you want to remove..then edit category and remove image from category..

Active Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - RO

Post by majki1975 » Tue Aug 07, 2018 1:32 am

Thanks for reply

I want category image in admin page, but i don't want it in the front end. There are 2 pictures in attachment that I think are showing what I need
Similar topics were
viewtopic.php?t=27041
viewtopic.php?t=38206
but those are for earlier versions of OC, I need it for 3.0.2.0. And I think that they involving code change in /catalog/view/theme/default/template/product/category.tpl
My guess was that it should be changed in /catalog/view/theme/default/template/product/category.twig this time (since it's OC 3) but so far - no luck

Thank you all for efforts

Attachments

picture_2.jpg

picture_2.jpg (76.59 KiB) Viewed 603 times

picture_1.jpg

picture_1.jpg (54.33 KiB) Viewed 603 times


Newbie

Posts

Joined
Mon Aug 06, 2018 7:42 pm

Post by cyclops12 » Tue Aug 07, 2018 1:40 am

You can open the catalog/view/theme/default/template/product/category.twig file and remove

Code: Select all

{% if thumb or description %}
      <div class="row"> {% if thumb %}
        <div class="col-sm-2"><img src="{{ thumb }}" alt="{{ heading_title }}" title="{{ heading_title }}" class="img-thumbnail" /></div>
        {% endif %}
        {% if description %}
        <div class="col-sm-10">{{ description }}</div>
        {% endif %}</div>
      <hr>
      {% endif %}
Or better still make a vqmod to do this

Expert Member
Online

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by majki1975 » Tue Aug 07, 2018 2:07 am

Not so crafty with vqmod, so I'll try this solution, it looks ok

Thank you very very much!
Will update what I did
Thanks again

Newbie

Posts

Joined
Mon Aug 06, 2018 7:42 pm
Who is online

Users browsing this forum: paulfeakins and 25 guests