Categories Menu to show sub-cats of current cat only
34 posts
• Page 2 of 2 • 1, 2
Re: Categories Menu to show sub-cats of current cat only
Hi Marc,
I've not tested this but, as we discovered, there is no path to the category on the Home page, so you could try changing the line
to something like
Happy New Year.
Yours,
Craig
I've not tested this but, as we discovered, there is no path to the category on the Home page, so you could try changing the line
- Code: Select all
if ($top_cat_id == $sub_path_id) {
to something like
- Code: Select all
if (($top_cat_id == $sub_path_id) or ($path =='')) {
Happy New Year.
Yours,
Craig
http://scarletandjones.com/
http://sharpdressedman.co.uk/
http://coffincompany.co.uk/
http://horsesculptures.co.uk/
If I've helped you out, why not buy me a beer? http://craigmurray.me.uk
http://sharpdressedman.co.uk/
http://coffincompany.co.uk/
http://horsesculptures.co.uk/
If I've helped you out, why not buy me a beer? http://craigmurray.me.uk
-

Chones - Posts: 755
- Joined: Wed Mar 24, 2010 1:07 pm
- Location: London
Re: Categories Menu to show sub-cats of current cat only
Thanks, Craig. That did the trick. It looks much nicer now. I've included the latest vqmod file with this update and referenced your screen name as an author, as I couldn't have done it without you. I hope you don't mind.
Happy New Year to you, as well, and everyone else that I've had the pleasure of meeting so far on this board! Now that I've found OpenCart, I can tell that 2011 is going to be a very good year indeed!
Marc
Happy New Year to you, as well, and everyone else that I've had the pleasure of meeting so far on this board! Now that I've found OpenCart, I can tell that 2011 is going to be a very good year indeed!
Marc
- Attachments
-
STORE__Show_Main_Categories_in_Header__SubCats_in_Sidebar.xml- This version adds top level cats to the home page.
- (1.75 KiB) Downloaded 180 times
- marc_cole
- Posts: 217
- Joined: Tue Dec 14, 2010 3:26 am
- Location: Seattle, WA
Re: Categories Menu to show sub-cats of current cat only
Cheers Marc, I'd've minded if you hadn't credited me
Glad it worked. If you need any more help feel free to email me at craig@craigmurray.me.uk
Yours,
Craig
Glad it worked. If you need any more help feel free to email me at craig@craigmurray.me.uk
Yours,
Craig
http://scarletandjones.com/
http://sharpdressedman.co.uk/
http://coffincompany.co.uk/
http://horsesculptures.co.uk/
If I've helped you out, why not buy me a beer? http://craigmurray.me.uk
http://sharpdressedman.co.uk/
http://coffincompany.co.uk/
http://horsesculptures.co.uk/
If I've helped you out, why not buy me a beer? http://craigmurray.me.uk
-

Chones - Posts: 755
- Joined: Wed Mar 24, 2010 1:07 pm
- Location: London
Re: Categories Menu to show sub-cats of current cat only
hey guys, im trying to apply this to my openCart but i cant seem to get it working. Here are the details:
*im applying it to a fresh openCart install.
*i have installed VQMod (which is brilliant btw)
*ive placed the files attached in this thread in the VQmod folder in the root directory of my store
i dont see any change at all. Am i missing something? im very new to openCart and i haven't developed in php for almost 5 years, so im a little rusty.
*im applying it to a fresh openCart install.
*i have installed VQMod (which is brilliant btw)
*ive placed the files attached in this thread in the VQmod folder in the root directory of my store
i dont see any change at all. Am i missing something? im very new to openCart and i haven't developed in php for almost 5 years, so im a little rusty.
- jesseh
- Posts: 4
- Joined: Tue Jan 04, 2011 1:37 pm
Re: Categories Menu to show sub-cats of current cat only
Take a look vqmod.log to see what you get there.
Take a look at the vqcache folder to see if there are any files there. If vqmod detects a problem it typically fails gracefully and passes the original source through to avoid any downtime
Take a look at the vqcache folder to see if there are any files there. If vqmod detects a problem it typically fails gracefully and passes the original source through to avoid any downtime

Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
-

Qphoria - Administrator
- Posts: 18210
- Joined: Mon Jul 21, 2008 7:02 pm

Re: Categories Menu to show sub-cats of current cat only
looking at my log file i can't seem to find where the mod changes the header.tpl file even though the mod file (from this thread) seems like it should be making a change to it. i also dont have a temporary file for the header in the vqchache folder.
would it help if i attached my log file?
would it help if i attached my log file?
- jesseh
- Posts: 4
- Joined: Tue Jan 04, 2011 1:37 pm
Re: Categories Menu to show sub-cats of current cat only
jesseh wrote: i also dont have a temporary file for the header in the vqchache folder.
Then the mod is not being applied. If it was, you'd see a file named something like this:
file:///opencart/vqcache/vqcache_catalog_view_theme_default_template_common_header.tpl
in the vqcache directory.
Can you get any vqmods to work, or is it just this one that you're having problems with?
- marc_cole
- Posts: 217
- Joined: Tue Dec 14, 2010 3:26 am
- Location: Seattle, WA
Re: Categories Menu to show sub-cats of current cat only
wow sorry guys i just had a blonde moment, after looking at the mod file again i realised that i needed the default theme applied first ... everything works fine now.
was the mod from this thread supposed to hide the category menu in the sidebar? because mine was still there so i disabled it in the module settings.
was the mod from this thread supposed to hide the category menu in the sidebar? because mine was still there so i disabled it in the module settings.
- jesseh
- Posts: 4
- Joined: Tue Jan 04, 2011 1:37 pm
Re: Categories Menu to show sub-cats of current cat only
jesseh wrote:was the mod from this thread supposed to hide the category menu in the sidebar?
Yep. Check out the first post in this thread.
- marc_cole
- Posts: 217
- Joined: Tue Dec 14, 2010 3:26 am
- Location: Seattle, WA
Re: Categories Menu to show sub-cats of current cat only
Although you do need the category module enabled for this to work.
http://scarletandjones.com/
http://sharpdressedman.co.uk/
http://coffincompany.co.uk/
http://horsesculptures.co.uk/
If I've helped you out, why not buy me a beer? http://craigmurray.me.uk
http://sharpdressedman.co.uk/
http://coffincompany.co.uk/
http://horsesculptures.co.uk/
If I've helped you out, why not buy me a beer? http://craigmurray.me.uk
-

Chones - Posts: 755
- Joined: Wed Mar 24, 2010 1:07 pm
- Location: London
Re: Categories Menu to show sub-cats of current cat only
marc_cole wrote:jesseh wrote:was the mod from this thread supposed to hide the category menu in the sidebar?
Yep. Check out the first post in this thread.
My mistake. It doesn't hide it — it just removes the top level cats from all pages except home.
- marc_cole
- Posts: 217
- Joined: Tue Dec 14, 2010 3:26 am
- Location: Seattle, WA
Re: Categories Menu to show sub-cats of current cat only
Chones wrote:Although you do need the category module enabled for this to work.
still works for me after disabling the category module. I'm using the mod on this page not from page 1, maybe they work differently?
im learning the ins and outs of vqmod and opencart now so i should be good from now on

thanks to contributors to this mod and VQMod, using it is going to make my life much easier

- jesseh
- Posts: 4
- Joined: Tue Jan 04, 2011 1:37 pm
Re: Categories Menu to show sub-cats of current cat only
marc_cole wrote:marc_cole wrote:jesseh wrote:was the mod from this thread supposed to hide the category menu in the sidebar?
Yep. Check out the first post in this thread.
My mistake. It doesn't hide it — it just removes the top level cats from all pages except home.
Any chance of updating it to fit 1.5x?
It makes no sense that you have a megamenu in the header while keeping the category box below it displaying all level of cats and subs. I guess it looks very odd and stupid to visitors

"We help each other to grow". That's the opencart community!
All free mods
Home Based Ebay business Opportunity(not ads)
All free mods
Home Based Ebay business Opportunity(not ads)
-

marcelwoo - Posts: 291
- Joined: Mon Mar 28, 2011 5:45 pm
Re: Categories Menu to show sub-cats of current cat only
Hi Marcelwoo
I'm not sure if you were able to find a solution but I have come up with a solution that works using some vqMods and modifying the "refine search" portion of the menu system. This kind of stumped me for awhile because like you I find the native menu system of opencart to repetitive and wanted to cut down on the clutter for my customers and simplify things. Until 2 months ago I had never looked at a piece of code in my life and kind of learned on the fly using forums, code websites and youtube. So as you can see, I am very new and with no previous experience in programming.
I noticed that when I posted my solution (located below) on March 23, 2012 on page 2 of the thread that it has started to appear in Themeforest templates for sale as of March 26th so there must be some merit to what I have done if its starting to find its way into professional templates.
viewtopic.php?f=20&t=48805
My store is still under construction and not live but if you look at the UStore template, for example, located for sale at Themeforest and then view demo you can see the basic design of my menu system. Choose "Components" on the main menu bar and then choose "monitors" and you will see how its works presenting the different levels and if its what you are looking for. The solution would be very easy to apply to your own template.
In my case, I have designed my category templates differently using a vqMod but it's all only window dressing and I've discovered the sky's the limit where presentation is involved. I have 4 levels of menu in some places before the product page appears and it works very cleanly only showing submenu of users choice with a detailed breadcrumb to backup on (ie. Home / Living Spaces / Furniture Collections / Heritage / product detail).
I hope this is of assistance.
Susan
I'm not sure if you were able to find a solution but I have come up with a solution that works using some vqMods and modifying the "refine search" portion of the menu system. This kind of stumped me for awhile because like you I find the native menu system of opencart to repetitive and wanted to cut down on the clutter for my customers and simplify things. Until 2 months ago I had never looked at a piece of code in my life and kind of learned on the fly using forums, code websites and youtube. So as you can see, I am very new and with no previous experience in programming.
I noticed that when I posted my solution (located below) on March 23, 2012 on page 2 of the thread that it has started to appear in Themeforest templates for sale as of March 26th so there must be some merit to what I have done if its starting to find its way into professional templates.
viewtopic.php?f=20&t=48805
My store is still under construction and not live but if you look at the UStore template, for example, located for sale at Themeforest and then view demo you can see the basic design of my menu system. Choose "Components" on the main menu bar and then choose "monitors" and you will see how its works presenting the different levels and if its what you are looking for. The solution would be very easy to apply to your own template.
In my case, I have designed my category templates differently using a vqMod but it's all only window dressing and I've discovered the sky's the limit where presentation is involved. I have 4 levels of menu in some places before the product page appears and it works very cleanly only showing submenu of users choice with a detailed breadcrumb to backup on (ie. Home / Living Spaces / Furniture Collections / Heritage / product detail).
I hope this is of assistance.
Susan
- ELDecors
- Posts: 7
- Joined: Thu Jun 02, 2011 1:32 pm
34 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: 2Wayne, davidmarch, marvmen21 and 21 guests













