Post by Ulf » Mon Jul 02, 2012 3:32 pm

How to hide a category to show in the category menu sidebar?
I mean hide like it go to do with categories in top menu bar.
Oc version 1.5.2.1
Last edited by Ulf on Mon Jul 02, 2012 5:59 pm, edited 1 time in total.

Ulf
New member

Posts

Joined
Sat Oct 16, 2010 4:41 pm

Post by alin » Mon Jul 02, 2012 4:59 pm

If you want side bar to display any category as the same to top menu bar then just simple change as following:
catalog/controller/module/category.php
Find

Code: Select all

foreach ($categories as $category) {
insert after

Code: Select all

if ($category['top']) {
Find:

Code: Select all

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/category.tpl')) {
insert before it:

Code: Select all

}
If you want sidebar category be controlled seaparatelly then do as following

First You need to add "top" equivalent selector to admin side for example "Side".

Edit your model file to store it value

Then edit your category.php module file (catalog/module/category.php) to display categories if "Side" selector is checked.

Just make xml for you all for free here: http://opencart.goleo.vn/Side_bar_category

GOLDEN LEOPARD SYSTEM SOLUTION
An ICT System Solution Company in Vietnam
Website: Store: http://opencart.goleo.vn or http://www.opencart.com/index.php?route ... rname=alin


User avatar
Active Member

Posts

Joined
Fri Jun 10, 2011 8:16 pm

Post by Ulf » Mon Jul 02, 2012 5:57 pm

Thanks Alin for your xml file.
It was exactly what I was looking for.
I have sent you a donation.

Ulf
New member

Posts

Joined
Sat Oct 16, 2010 4:41 pm

Post by sugarbyte » Thu Aug 02, 2012 9:23 am

@Alin

Thank you so much for taking the time to create this. You're a serious life saver!

Newbie

Posts

Joined
Thu Aug 02, 2012 9:21 am

Post by aviatedman » Sat Dec 15, 2012 12:34 am

I'm not understanding. How is he a lifesaver? He just said what to do, not HOW to do it!? He only have the first simple set of code to add to the category controller file...he didn't leave any steps on the second half of the equation so how did you get it to work?

Newbie

Posts

Joined
Wed Sep 26, 2012 6:48 am

Post by Ulf » Sat Dec 15, 2012 1:17 am

aviatedman wrote:I'm not understanding. How is he a lifesaver? He just said what to do, not HOW to do it!? He only have the first simple set of code to add to the category controller file...he didn't leave any steps on the second half of the equation so how did you get it to work?

follow this link
http://opencart.goleo.vn/Side_bar_category

Ulf
New member

Posts

Joined
Sat Oct 16, 2010 4:41 pm

Post by alexdog1805 » Fri Mar 01, 2013 9:04 pm

how to do this in opencart 1.5.5.1 ?

Active Member

Posts

Joined
Sat May 28, 2011 1:51 am

Post by alexdog1805 » Fri Mar 01, 2013 9:29 pm

i reach excluding from both category box and header, but I want to show only in header.

Active Member

Posts

Joined
Sat May 28, 2011 1:51 am

Post by prizm » Fri Apr 19, 2013 8:37 pm

Anyone checked on opencart 1.5.5.1? For me doesn't work.
After installing all categories are missing on side category

Newbie

Posts

Joined
Fri Apr 19, 2013 8:34 pm

Post by prizm » Fri Apr 19, 2013 8:39 pm

in opencar 1.5.5.1 all categories are missing from side category? any ideas how to repair this?

Newbie

Posts

Joined
Fri Apr 19, 2013 8:34 pm

Post by justquerious » Thu May 09, 2013 9:39 pm

Perfect solution.. thanks and you can ignore some glue heads

Newbie

Posts

Joined
Thu May 09, 2013 9:37 pm

Post by i2Paq » Thu May 09, 2013 10:24 pm


Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by virtualgeorge » Thu Jun 13, 2013 6:23 am

Does this in fact work in 1.5.5.1 ? Just tried on a clean install & didn't seem work for me?

Active Member

Posts

Joined
Wed Jun 18, 2008 5:57 am
Who is online

Users browsing this forum: No registered users and 10 guests