Page 1 of 4

Subcatagory

Posted: Thu Feb 19, 2009 7:42 pm
by pawanesh
Anyone please help!

1. How Can I display extended subcategories within a category in categories module ?

2. How can i remove BRANDS BOX from front end ?

pawanesh

Re: Subcatagory

Posted: Sun Feb 22, 2009 6:44 pm
by pawanesh
How can i display sub category list after main category list ?

Re: Subcatagory

Posted: Sun Feb 22, 2009 7:32 pm
by mal-schauen
Here in the forum, it is already described, I think! You have to be in the web directory each tpl-file. You can find them under opencart-> catalog-> view-> template

Re: Subcatagory

Posted: Sun Feb 22, 2009 9:57 pm
by pawanesh
I will be great full, if you provide link for that section or post the modification required. Thanks.

Re: Subcatagory

Posted: Mon Jun 15, 2009 12:50 pm
by jeffc
Looks like this is what you're looking for:
http://forum.opencart.com/viewtopic.php?t=1669

Re: Subcatagory

Posted: Mon Jun 15, 2009 7:21 pm
by Qphoria
jeffc wrote:Looks like this is what you're looking for:
http://forum.opencart.com/viewtopic.php?t=1669

EH.. no .. that is for the old version of OpenCart. No longer relevant here.

Re: Subcatagory

Posted: Mon Jun 15, 2009 9:10 pm
by readyman
1. How Can I display extended subcategories within a category in categories module ?
What do you mean? Do you want them all to display 'open' - if so, you will need to open the categories module file - ie. catalog\controller\module\category.php & loop through the top level category and then loop through all sub categories as well.
2. How can i remove BRANDS BOX from front end ?
Go to the admin->extensions->modules and uninstall the 'Manufacturers' module.

Re: Subcatagory

Posted: Thu Jul 09, 2009 6:43 pm
by WeNDoR
please, coul someone tell me how to solve this problem ? I need the caregories to be expanded as default (if they have subcategories)

Re: Subcatagory

Posted: Thu Aug 06, 2009 12:28 am
by TAurus
WeNDoR wrote:please, coul someone tell me how to solve this problem ? I need the caregories to be expanded as default (if they have subcategories)
open catalog\controller\module\category.php
and replace

Code: Select all

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

Code: Select all

//if ($category_id == $result['category_id']) { //hack to display all subcategories
				$children = $this->getCategories($result['category_id'], $new_path);
//}

Re: Subcatagory

Posted: Tue Sep 29, 2009 11:08 pm
by GreEnergy Living
I've been playing around with this issue for sometime now. Thanks so much for the post!

Re: Subcatagory

Posted: Thu Nov 19, 2009 4:17 pm
by liyen
TAurus wrote:
WeNDoR wrote:please, coul someone tell me how to solve this problem ? I need the caregories to be expanded as default (if they have subcategories)
open catalog\controller\module\category.php
and replace

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

with

//if ($category_id == $result['category_id']) { //hack to display all subcategories
$children = $this->getCategories($result['category_id'], $new_path);
//}
Hi, Is it possible to only display the first two levels of the category?

eg:
Beauty > For Her > Accessories>
Beauty > For Her > Bags>
Beauty > For Him > Bags>
Beauty > For Baby > Bags>
I only want to display:
Beauty
- For Her
- For Him
- For Baby

Re: Subcatagory

Posted: Thu Nov 19, 2009 8:39 pm
by Qphoria
It already only displays like that on the category sidebox. It just shows the full path in the admin area

Re: Subcatagory

Posted: Fri Nov 20, 2009 10:00 am
by liyen
Thanks for your reply, Qphoria ,


As I do the following amendment, the 3rd level category will be displayed. Ids there any way to only show the 1st two levels?
//if ($category_id == $result['category_id']) { //hack to display all subcategories
$children = $this->getCategories($result['category_id'], $new_path);
//}

Re: Subcatagory

Posted: Fri Nov 20, 2009 10:24 am
by Qphoria
Try this:

Change:

Code: Select all

$children = $this->getCategories($result['category_id'], $new_path);
To:

Code: Select all

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

Re: Subcatagory

Posted: Fri Nov 20, 2009 10:31 am
by liyen
It is working!!!

Thanks so much Qphoria ~ ;)

Re: Subcatagory

Posted: Sat Nov 28, 2009 6:01 am
by moggiex
This would be one of those things that would be fantastic as a user configurable setting within OpenCart.

Matt

Re: Subcatagory

Posted: Sun Dec 27, 2009 12:44 pm
by superuser
May I know how to change the controller to display the category and sub category in this format?
<ul>
<li>Main-Category1</li>
<li>SubCategory1a</li>
<li>SubCategory1b
<ul>
<li>SubCategory2a</li>
<li>SubCategory2b</li>
</ul>
</li>
<li>Main-Category2</li>
</ul>
The default formatting is like this (if i not mistaken...) :
<ul>
<li>Main-Category1
<ul><li>SubCategory1a</li>
<li>SubCategory1b
<ul>
<li>SubCategory2a</li>
<li>SubCategory2b</li>
</ul>
</li></ul></li>
<li>Main-Category2</li>
</ul>

Re: Subcatagory

Posted: Tue Dec 29, 2009 2:30 pm
by superuser
superuser wrote:May I know how to change the controller to display the category and sub category in this format?
<ul>
<li>Main-Category1</li>
<li>SubCategory1a</li>
<li>SubCategory1b
<ul>
<li>SubCategory2a</li>
<li>SubCategory2b</li>
</ul>
</li>
<li>Main-Category2</li>
</ul>
The default formatting is like this (if i not mistaken...) :
<ul>
<li>Main-Category1
<ul><li>SubCategory1a</li>
<li>SubCategory1b
<ul>
<li>SubCategory2a</li>
<li>SubCategory2b</li>
</ul>
</li></ul></li>
<li>Main-Category2</li>
</ul>

Any idea?

Re: Subcatagory

Posted: Wed Jan 20, 2010 9:55 am
by jkungfu
this has another problem, it is only the first catelory can use SEO urls, other catelogies would not !

Re: Subcatagory

Posted: Wed Jan 20, 2010 10:52 am
by Qphoria
all categories work with SEO for me.. even 4 levels deep