Hi all. So in an older version of Opencart I was able to customize my top navigation to display the sub-category thumbnails and the description. I've upgraded to the latest version and it's no longer working.
It's only returning:
[name] and [href]
How will I go about getting the thumbnail [image] link and [description] data?
Any help would be greatly appreciated!
It's only returning:
[name] and [href]
How will I go about getting the thumbnail [image] link and [description] data?
Any help would be greatly appreciated!
Nevermind. I found the solution.
For anyone wanting to put subcategory thumbnails in their top dropdown menu:
Modify:
catalog/controller/common/header.php
Change:
To:
Save, then modify:
catalog/view/theme/default/template/common/header.tpl
and under the if(isset($category['children'][$i])), (under <div id="menu">) you can call the image as such:
For anyone wanting to put subcategory thumbnails in their top dropdown menu:
Modify:
catalog/controller/common/header.php
Change:
Code: Select all
$children_data[] = array(
'name' => $child['name'] . ($this->config->get('config_product_count') ? ' (' . $product_total . ')' : ''),
'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']),
);
Code: Select all
$children_data[] = array(
'name' => $child['name'] . ($this->config->get('config_product_count') ? ' (' . $product_total . ')' : ''),
'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']),
'image' => $child['image'],
'description' => $child['description']
);
catalog/view/theme/default/template/common/header.tpl
and under the if(isset($category['children'][$i])), (under <div id="menu">) you can call the image as such:
Code: Select all
<img src="image/<?php echo $category['children'][$i]['image']; ?>" width="" />
Good Idea!
For my OC V.1.5.6.5_rc, I had to use one of the existing default Lines in order to have Product Counting working.
Info and images here:
http://ipc.li/os/subcat_menu_image156.zip
Thank you!
Ernie
PS. Only works NICE with rather FEW Subcategories!
http://www.hitline.info/shop/
For my OC V.1.5.6.5_rc, I had to use one of the existing default Lines in order to have Product Counting working.
Info and images here:
http://ipc.li/os/subcat_menu_image156.zip
Thank you!
Ernie
PS. Only works NICE with rather FEW Subcategories!

http://www.hitline.info/shop/
Last edited by IP_CAM on Tue Sep 01, 2015 10:11 am, edited 2 times in total.
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.
at best, by trail and error! See my file, in the ZIP, linked above, to compare the content with your v.2.x files, for similarities, and differences.Flysan wrote:How to make it work on OC 2.0.2.0?
Good Luck
Ernie
PS: You'll possibly find something here as well:
http://www.opencart.com/index.php?route ... y%20Images
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.
Who is online
Users browsing this forum: No registered users and 23 guests