Post by lordohtu » Fri Oct 27, 2023 11:38 pm

I would like to be able to use images or text in my category module. I have enable the module to show on the left side of the store and it works fine. However, I would like to be able to use an image instead of text for a couple of brands that I really want to highlight.

Can someone tell me the easiest way to get this done or point me in the right direction if this has been already discussed?

Check the attachment to see what I am talking about...

Thanks in advance

Attachments

Categories.png

Categories.png (25.9 KiB) Viewed 3153 times


Newbie

Posts

Joined
Tue Feb 28, 2017 4:50 am

Post by IP_CAM » Sat Oct 28, 2023 1:33 am

Please mention your exact OC Version and Theme used.

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by lordohtu » Sat Oct 28, 2023 2:18 am

I am using Opencart 2.3.0.2 and I am using the default theme.

Newbie

Posts

Joined
Tue Feb 28, 2017 4:50 am

Post by halfhope » Sat Oct 28, 2023 5:43 am

lordohtu wrote:
Sat Oct 28, 2023 2:18 am
I am using Opencart 2.3.0.2 and I am using the default theme.
Hi!
You may use "category wall" extensions for this.

My FREE extensions in marketplace. [ security | flexibility | speedup ]


User avatar
Active Member

Posts

Joined
Tue Dec 10, 2013 9:44 pm
Location - San Diego

Post by lordohtu » Sat Oct 28, 2023 11:48 pm

halfhope wrote:
Sat Oct 28, 2023 5:43 am
Hi!
You may use "category wall" extensions for this.
I don't think that is what I need. Please check the attached image in this post to see what I am trying to accomplish. See how I added a drill next to the drilling category. That is what I am trying to do. Use an image instead of text on a specific category. I don't want to use tiles or anything like it.

Attachments

Categories.png

Categories.png (40.36 KiB) Viewed 3027 times


Newbie

Posts

Joined
Tue Feb 28, 2017 4:50 am

Post by Cue4cheap » Sun Oct 29, 2023 3:41 am

You'd need to adjust theme/default/template/extension/module/category.tpl to display the image file next to the category name. Then you'll need to apply css to the image to make sure it doesn't display wonky.
You'll also need to adjust the /catalog/controller/extension/module/category.php
to add in this section the adds the $data['thumb'] that is called in the tpl file.

A suggestion is to take a look at the <?php if ($thumb) { ?> section of catalog/view/theme/default/template/product/category.tpl
where it uses the image you put as the category image.
and the /catalog/controller/product/category.php
for examples.

Mike

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am
Who is online

Users browsing this forum: No registered users and 10 guests