Page 1 of 2

[SOLVED] - sub Category image 3.0.2.0

Posted: Sat Aug 12, 2017 5:33 am
by twd247
Hi
please can you help me. I looking to show the images of the cub Category in the main Category. Like the pic below and not just a list.
Image

Thank you Mark

Re: sub Category image 3.0.2.0

Posted: Sat Aug 12, 2017 6:50 am
by WaxedPerfection
you will need a mod -
https://www.opencart.com/index.php?rout ... load_id=55

or make yourself a html module, and use the below code, changing the images and urls of course.

Code: Select all

<div class="col-md-3">
										  <div style="text-align: center; "><a href="https://demo.opencart.com/"><img src="https://demo.opencart.com/image/cache/catalog/demo/macbook_1-200x200.jpg" alt="Macs"></a></div>
										<div style="text-align: center;">
					  <a href="https://demo.opencart.com/">Macs</a>
					</div>				  
									  </div>
<div class="col-md-3">
										  <div style="text-align: center; "><a href="https://demo.opencart.com/"><img src="https://demo.opencart.com/image/cache/catalog/demo/macbook_1-200x200.jpg" alt="Macs"></a></div>
										<div style="text-align: center;">
					  <a href="https://demo.opencart.com/">Macs</a>
					</div>				  
									  </div>
<div class="col-md-3">
										  <div style="text-align: center; "><a href="https://demo.opencart.com/"><img src="https://demo.opencart.com/image/cache/catalog/demo/macbook_1-200x200.jpg" alt="Macs"></a></div>
										<div style="text-align: center;">
					  <a href="https://demo.opencart.com/">Macs</a>
					</div>				  
									  </div>
<div class="col-md-3">
										  <div style="text-align: center; "><a href="https://demo.opencart.com/"><img src="https://demo.opencart.com/image/cache/catalog/demo/macbook_1-200x200.jpg" alt="Macs"></a></div>
										<div style="text-align: center;">
					  <a href="https://demo.opencart.com/">Macs</a>
					</div>				  
									  </div>

Re: sub Category image 3.0.2.0

Posted: Sun Aug 13, 2017 11:29 pm
by twd247
Hi thank you I have just purchased the mod but it only puts the images on the homepage. The text that you have put in. will this put it in the category page for the subcategory images to show

So open wanted Grey and then I will have a list with pictures of the sub categories

Thank you
Mark

Re: sub Category image 3.0.2.0

Posted: Mon Aug 14, 2017 1:38 am
by WaxedPerfection
yes, you can place them anywhere, just create a new html module,

Home >> Extensions >> HTML Content
insert the code and enable
now go to
Home >> Design >> Layouts >> Category
and add the html module you created before and they will show in your location

Example - https://image.ibb.co/cVK7hF/sub_cats_as_images.jpg
Image

Re: sub Category image 3.0.2.0

Posted: Mon Aug 14, 2017 8:14 pm
by GoGo OpenCart
@twd247: I sent you a PM, so please check it ;)

@WaxedPerfection: I really don't understand why would someone want to create all that manually with HTML, and then to create different layouts for different categories, etc.?

Re: sub Category image 3.0.2.0

Posted: Tue Aug 15, 2017 12:27 am
by WaxedPerfection
@GoGo OpenCart

Its was free!! and the quickest way of doing it, other than a Module, you would only need to edit it once, and have it in more than one location. or you would edit it to have different ones in different locations.

Re: sub Category image 3.0.2.0

Posted: Tue Aug 15, 2017 1:05 am
by GoGo OpenCart
@WaxedPerfection: Do you even understand what @twd247 is asking for...? :) Your solution is nonsense for what's asked in this post, just waste of time, nothing else... Manually adding all the subcategories in HTML, really...? :)

Re: sub Category image 3.0.2.0

Posted: Tue Aug 15, 2017 4:11 am
by WaxedPerfection
Clearly you are more advanced than me on this subject, so I will leave it with you and take my nonsense else where. I do hope your customers of your modules receive a better service than leaving comments like that!, I was trying to help and it does clearly work as my screen shot shown!

Re: sub Category image 3.0.2.0

Posted: Tue Aug 15, 2017 4:35 am
by GoGo OpenCart
Don't get me wrong, but sometimes trying to help can do more harm than good, and all I wanted to do is to just point out that manually adding the subcategories with HTML, is just waste of time, nothing else, when the same thing can be done automatically with PHP, so your suggestion could make someone to lose a lot of time... Do you know what will happen when the categories and subcategories are added/removed/changed on a regular basis...? With your solution, all the work will need to be redone all over again, from scratch...

Also, here's another example of the same HTML suggestion from you:

viewtopic.php?f=10&t=186594#p682178

At which, as you can see, I also replied...

From what I can see, you're quite new to OpenCart (at least as a member to this forum), so get some more practice with OpenCart, become more experienced with it, and you're more than welcome to provide useful help on the forum ;)

And since you've mentioned it, speaking about my customers, feel free to check the response time of the comments, and also read all the nice and positive comments, and see all the five stars votes, for all of my modules, and you'll get the idea on what kind of a support all of my customers receive from me ;)

Re: sub Category image 3.0.2.0

Posted: Mon Apr 23, 2018 5:22 am
by lindsey80
Hello,

Is there a way to do this as I can't find any extensions compatible with 3.0.2.0?? Any help much appreciated. I would like to show the sub category images on the page when someone selects show all images. It looks rubbish showing just a list of products!

Many thanks

Re: sub Category image 3.0.2.0

Posted: Mon Apr 23, 2018 7:45 am
by xxvirusxx

Re: sub Category image 3.0.2.0

Posted: Tue Apr 24, 2018 3:57 am
by lindsey80
Hi Thanks for the link. However, this is not showing in my module list. I have successfully installed and refreshed but can't see it??

Best regards

Re: sub Category image 3.0.2.0

Posted: Tue Apr 24, 2018 3:37 pm
by xxvirusxx
Is not a module to see on Extensions--Modules.
This is a OCmod file. You can see in Extensions-Modifications and work only with Default theme.

Clear Theme and SASS cache.

On the link is for oc 2.3, my converted is for oc 3.0

Re: sub Category image 3.0.2.0

Posted: Tue Apr 24, 2018 11:07 pm
by lindsey80
Thanks so much, it was already working and I didn't even realise!!

Re: sub Category image 3.0.2.0

Posted: Wed Jul 24, 2019 10:04 pm
by pcwerks
xxvirusxx wrote:
Mon Apr 23, 2018 7:45 am
Converted to 3.0.2.0
https://www.opencart.com/index.php?rout ... n_id=30021
xxvirusxx, I downloaded and installed this modification. The upload says it's successful, and the modifications log adds this

Code: Select all

MOD: Subcategories Thumbnails

FILE: catalog/controller/product/category.php
CODE: 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url)
LINE: 148

FILE: catalog/view/theme/default/template/product/category.twig
CODE: {% if categories|length <= 5 %}
LINE: 28
CODE: {{ header }}
LINE: 23
----------------------------------------------------------------
I have clicked the refresh button under extensions->modifications, and also the 2 refresh buttons on the main dashboard to refresh the theme and sass caches, but I am still not seeing images for sub-categories. My store is using the default theme, but it is version 3.0.3.2 and not 3.0.2.0. Do you know if your modification needs to be updated to work with 3.0.3.2?

Thanks for your work by the way, I hope to get this working on my store. I can't believe that OC wouldn't make this an available option when it seems like it's just 1 or 2 lines of code!?!

Re: sub Category image 3.0.2.0

Posted: Fri Jul 26, 2019 5:45 pm
by xxvirusxx
You have added images for that categories?

Re: sub Category image 3.0.2.0

Posted: Fri Jul 26, 2019 8:14 pm
by kestas
you can try attached one....

Re: sub Category image 3.0.2.0

Posted: Sun Aug 11, 2019 6:10 am
by carlbutler7jjc
xxvirusxx wrote:
Mon Apr 23, 2018 7:45 am
Converted to 3.0.2.0
https://www.opencart.com/index.php?rout ... n_id=30021
Hi, great helpful extention!! However I've installed on pavo theme and kind of works. Looks like it wants to load an image but doesn't. Any suggestions?

Image

Re: sub Category image 3.0.2.0

Posted: Sun Aug 11, 2019 6:36 am
by carlbutler7jjc
Managed to get it to work with the second download and works flawlessly. Is there anyway to create a black border and edit the radius corners to a more rounded profile to make it look more professional?

Re: sub Category image 3.0.2.0

Posted: Mon Aug 12, 2019 1:53 pm
by xxvirusxx
Make changes in css...files theme