Post by NewMethod » Fri Apr 16, 2010 5:07 am

Hi,

Can somebody please tell me where I can modify the category list on the left to stop it show any levels deeper than 2. For example.

If I have a menu structure such as:
Dog -> Black Dog -> Big Black Dogs
Small Black Dogs
Rabbit -> Our Rabbits
Cat - Our Cats

I would want to be able to see not see the last level (or any further), although the main category selection images would still show big black dogs and small black dogs (in the middle).

Sorry if that makes no sense, it's been an extremely long day! Just tell me and I'll try elaborate. O0

New member

Posts

Joined
Sun Jan 17, 2010 11:12 pm


Post by trait » Fri Apr 16, 2010 5:16 pm

Modify \opencart_v1.4.7\catalog\controller\module\category.php

Find these codes, and remove.

Code: Select all

if ($category_id == $result['category_id']) {
				$children = $this->getCategories($result['category_id'], $new_path);
			}

TRAIT-TECH.COM Wholesale electronics with factory price, dropshipper from China


User avatar
New member

Posts

Joined
Sat Apr 03, 2010 10:38 am


Post by NewMethod » Mon Apr 19, 2010 9:43 pm

Hi, thanks - thats very close (it doesn't display any children), however I'd like to display the first level child, just no further. :-\

New member

Posts

Joined
Sun Jan 17, 2010 11:12 pm


Post by trait » Wed May 12, 2010 1:24 am

There is a way to do so..

Code: Select all

if ($category_id == $result['category_id']) {
	$children = $this->getCategories($result['category_id'], $new_path);
}
change to

Code: Select all

if ($parent_id == 0 || $category_id == $result['category_id']) {
	$children = $this->getCategories($result['category_id'], $new_path);
}
if the parent if top(parent_id=0), show the sub catalog, and also show the current subcatalog.

TRAIT-TECH.COM Wholesale electronics with factory price, dropshipper from China


User avatar
New member

Posts

Joined
Sat Apr 03, 2010 10:38 am


Post by ile » Tue Jun 15, 2010 1:27 am

Hi! I have a problem. If i change the code like this

Code: Select all

if ($parent_id == 0 || $category_id == $result['category_id']) {
   $children = $this->getCategories($result['category_id'], $new_path);
}
the menu shows the main category and the first subcat (they are directly visible), but if i click on the subcat it shows me the second one that i don't want. Why?
I need to have only the main category directly visible in menu and if i click, i want to appear the first subcat, and stop. I don't want the second one if i click on the first subcat.
Is it possible?

Thanks very much! :)

ile
Newbie

Posts

Joined
Mon May 03, 2010 8:04 pm

Post by discoid » Sun Feb 12, 2012 3:19 pm

Hi everybody,
how to make visible 2nd or 3rd level only in side categories?

I have now:
Man --> Shoes --> Classic

I'd like to show:
Shoes --> Classic

I have v1.5.1.3, thanks!

Newbie

Posts

Joined
Mon Feb 06, 2012 3:50 pm
Who is online

Users browsing this forum: No registered users and 3 guests