Forums / Templates, Stylesheets, Page Layout / Skip Page showing sub categories, go straight to first sub category

Skip Page showing sub categories, go straight to first sub category

Locked

Views: 2,655

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
8 May 2009, 2:24 PM
#1
helensama avatar

helensama

New Zenner

Join Date:
Dec 2006
Location:
Northwest Connecticut
Posts:
87
Plugin Contributions:
0

Skip Page showing sub categories, go straight to first sub category

Is there any way, a switch in admin, an add on or using the override template system to set up zen cart to go straight to the first subcategory rather than show the page which has all the subcategories on it? This is sort of like what happens when there is just one product in a category, you can go right to that product page.

8 May 2009, 2:40 PM
#2
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Skip Page showing sub categories, go straight to first sub category

hmmmm might be easier to add the sub categories to a favourites menu, which you can add to your shortcut bar :-) That way you can access all sub categories right from any page from your browsers drop down menu.

8 May 2009, 3:29 PM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Skip Page showing sub categories, go straight to first sub category

You can set the home page to open with a particular subcategory, if that is what you are wanting.

If you want a global "go to the first product-holding subcat when a top cat is clicked" function, that will take some real coding.

8 May 2009, 3:41 PM
#4
helensama avatar

helensama

New Zenner

Join Date:
Dec 2006
Location:
Northwest Connecticut
Posts:
87
Plugin Contributions:
0

Re: Skip Page showing sub categories, go straight to first sub category

Thank you both for replies..... but don't know exactly what to do re: favorites or coding, I thought it would help, it always helps to send you a link to the site I am working on ---- http://peterfasano.com/zen

So, what I need to be able to do is maybe what Glenn identifies as requiring a bit of coding --- when someone clicks on Fabrics or Wallcoverings, the two categories that have sub categories, you should go straight to the first subcategory page , skipping the page that shows the different subcategories, going straight to the page that shows the products within the sub category. As Seen In is also a category but it does not have sub categories.... so it doesn't have this requirement.

Glenn, if the only or best way to do this is coding, is it extensive? Is it something you can help me work out or are available to do for hire?

8 May 2009, 4:04 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Skip Page showing sub categories, go straight to first sub category

That would require some SQL queries to find the right subcat, and I don't have much experience with MySQL. I could figure it out if I took the time, but others here could do it better.

You could hard-code it, but that would not be flexible and I don't think you want to worry about recoding if a category changes.

If you do want to hard-code, for this very simple application you could just point the header link to the desired subcat instead of the named topcat. I haven't checked to see what you are using for the header nav, but if it is the ez-pages bar this would be easy :)

8 May 2009, 4:13 PM
#6
helensama avatar

helensama

New Zenner

Join Date:
Dec 2006
Location:
Northwest Connecticut
Posts:
87
Plugin Contributions:
0

Re: Skip Page showing sub categories, go straight to first sub category

Glenn, Hard coding would be OK in this case because thre are not going to be additional sub catecories added, I know famous last words, but this is not that type of dynamic situation and if there were sub categories added, then the code could be adjusted....

If the code would be something like

If Fabrics,

goto Prints (i.e. the internal link to go directly to that page...

This would work! Do you know where this code should be placed?

8 May 2009, 4:16 PM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Skip Page showing sub categories, go straight to first sub category

OK, you are using ez-pages links for the top nav, so just change the internal link path from

index.php?main_page=index&cPath=1

to

index.php?main_page=index&cPath=1_9