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
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.
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.1. How Can I display extended subcategories within a category in categories module ?
Go to the admin->extensions->modules and uninstall the 'Manufacturers' module.2. How can i remove BRANDS BOX from front end ?
http://www.alreadymade.com
Follow me on twitter.com/alreadymade
open catalog\controller\module\category.phpWeNDoR wrote:please, coul someone tell me how to solve this problem ? I need the caregories to be expanded as default (if they have subcategories)
and replace
Code: Select all
if ($category_id == $result['category_id']) {
$children = $this->getCategories($result['category_id'], $new_path);
}
Code: Select all
//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?TAurus wrote:open catalog\controller\module\category.phpWeNDoR wrote:please, coul someone tell me how to solve this problem ? I need the caregories to be expanded as default (if they have subcategories)
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);
//}
eg:
I only want to display:Beauty > For Her > Accessories>
Beauty > For Her > Bags>
Beauty > For Him > Bags>
Beauty > For Baby > Bags>
Beauty
- For Her
- For Him
- For Baby
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?
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);
//}
Try this:
Change:
To:
Change:
Code: Select all
$children = $this->getCategories($result['category_id'], $new_path);
Code: Select all
if (substr_count($new_path, '_') < 1) {
$children = $this->getCategories($result['category_id'], $new_path);
}
This would be one of those things that would be fantastic as a user configurable setting within OpenCart.
Matt
Matt
Code: Select all
It was like that when I found it, honest!
May I know how to change the controller to display the category and sub category in this format?
The default formatting is like this (if i not mistaken...) :<ul>
<li>Main-Category1</li>
<li>SubCategory1a</li>
<li>SubCategory1b
<ul>
<li>SubCategory2a</li>
<li>SubCategory2b</li>
</ul>
</li>
<li>Main-Category2</li>
</ul>
<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>
superuser wrote:May I know how to change the controller to display the category and sub category in this format?
The default formatting is like this (if i not mistaken...) :<ul>
<li>Main-Category1</li>
<li>SubCategory1a</li>
<li>SubCategory1b
<ul>
<li>SubCategory2a</li>
<li>SubCategory2b</li>
</ul>
</li>
<li>Main-Category2</li>
</ul>
<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?
Who is online
Users browsing this forum: No registered users and 67 guests