Community Forums

[SOLVED] how to hide a category in category menu sidebar

Template support & advice for OpenCart v1.x

[SOLVED] how to hide a category in category menu sidebar

Postby Ulf » Mon Jul 02, 2012 7:32 am

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 9:59 am, edited 1 time in total.
Ulf
 
Posts: 47
Joined: Sat Oct 16, 2010 8:41 am

Re: how to hide a category in category menu sidebar

Postby alin » Mon Jul 02, 2012 8:59 am

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: http://goleo.vn / Store: http://opencart.goleo.vn or http://exopencart.com
User avatar
alin
 
Posts: 112
Joined: Fri Jun 10, 2011 12:16 pm

Re: how to hide a category in category menu sidebar

Postby Ulf » Mon Jul 02, 2012 9:57 am

Thanks Alin for your xml file.
It was exactly what I was looking for.
I have sent you a donation.
Ulf
 
Posts: 47
Joined: Sat Oct 16, 2010 8:41 am

Re: [SOLVED] how to hide a category in category menu sidebar

Postby sugarbyte » Thu Aug 02, 2012 1:23 am

@Alin

Thank you so much for taking the time to create this. You're a serious life saver!
sugarbyte
 
Posts: 1
Joined: Thu Aug 02, 2012 1:21 am

Re: [SOLVED] how to hide a category in category menu sidebar

Postby aviatedman » Fri Dec 14, 2012 4:34 pm

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?
aviatedman
 
Posts: 18
Joined: Tue Sep 25, 2012 10:48 pm

Re: [SOLVED] how to hide a category in category menu sidebar

Postby Ulf » Fri Dec 14, 2012 5:17 pm

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
 
Posts: 47
Joined: Sat Oct 16, 2010 8:41 am

Re: [SOLVED] how to hide a category in category menu sidebar

Postby alexdog1805 » Fri Mar 01, 2013 1:04 pm

how to do this in opencart 1.5.5.1 ?
alexdog1805
 
Posts: 99
Joined: Fri May 27, 2011 5:51 pm

Re: [SOLVED] how to hide a category in category menu sidebar

Postby alexdog1805 » Fri Mar 01, 2013 1:29 pm

i reach excluding from both category box and header, but I want to show only in header.
alexdog1805
 
Posts: 99
Joined: Fri May 27, 2011 5:51 pm

Re: [SOLVED] how to hide a category in category menu sidebar

Postby prizm » Fri Apr 19, 2013 12:37 pm

Anyone checked on opencart 1.5.5.1? For me doesn't work.
After installing all categories are missing on side category
prizm
 
Posts: 2
Joined: Fri Apr 19, 2013 12:34 pm

Re: [SOLVED] how to hide a category in category menu sidebar

Postby prizm » Fri Apr 19, 2013 12:39 pm

in opencar 1.5.5.1 all categories are missing from side category? any ideas how to repair this?
prizm
 
Posts: 2
Joined: Fri Apr 19, 2013 12:34 pm

Re: [SOLVED] how to hide a category in category menu sidebar

Postby justquerious » Thu May 09, 2013 1:39 pm

Perfect solution.. thanks and you can ignore some glue heads
justquerious
 
Posts: 1
Joined: Thu May 09, 2013 1:37 pm

Re: [SOLVED] how to hide a category in category menu sidebar

Postby i2Paq » Thu May 09, 2013 2:24 pm

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.

First Things First: Opencart Check List.
Documentation: Our Documentation section.
BUGs?: Known BUGS for All OC Versions.

Problemen met de BTW?: [How to] BTW + Verzend & betaalmethodes.
User avatar
i2Paq
Global Moderator
 
Posts: 9756
Joined: Mon Nov 09, 2009 11:00 am
Location: Winkel - The Netherlands


Return to Template Support

Who is online

Users browsing this forum: xlam and 22 guests

Hosted by Arvixe Web Hosting