Zen Cart Logo

"See all links" option?

Views: 643

Results 1 to 8 of 8
8 Jul 2011, 3:59 PM
#1
autoace avatar

autoace

Totally Zenned

Join Date:
Jun 2009
Posts:
618
Plugin Contributions:
0

"See all links" option?

I've been searching on the forum for this to no avail. Might anyone know how to code in 'See all' links on the home page for the Categories in the center column?

8 Jul 2011, 11:26 PM
#2
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Re: "See all links" option?

Are you using a custom template? As far as I know, Zen Cart shows categories on the left hand side, with an "All Products" link by default. I don't recall there being an option for categories in the middle of the homepage.

12 Jul 2011, 1:38 AM
#3
autoace avatar

autoace

Totally Zenned

Join Date:
Jun 2009
Posts:
618
Plugin Contributions:
0

Re: "See all links" option?

jackie.taferner:

Are you using a custom template? As far as I know, Zen Cart shows categories on the left hand side, with an "All Products" link by default. I don't recall there being an option for categories in the middle of the homepage.

You can get the categories to show in the middle thru controls in the admin, its all about the settings you use.

12 Jul 2011, 3:51 PM
#4
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Re: "See all links" option?

Ok, please let me know what settings you used so I can help you figure out how to add "See All" to it.

12 Jul 2011, 9:15 PM
#5
autoace avatar

autoace

Totally Zenned

Join Date:
Jun 2009
Posts:
618
Plugin Contributions:
0

Re: "See all links" option?

Ok, thanks. In Configuration > Layout Settings > 'Categories - Always Show on Main Page' -- You just set it to 1 instead of 0.

12 Jul 2011, 10:02 PM
#6
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Re: "See all links" option?

Oh, I see what you're saying now! I was picturing the category list as it appears in sideboxes, not the product listing :blush:

The categories index template is located here: /includes/templates/YOUR_TEMPLATE/templates/tpl_index_categories.php

You can add a link to "All Products" like so:

<a class="category-links" href="<?php echo zen_href_link(FILENAME_PRODUCTS_ALL); ?>"><?php echo CATEGORIES_BOX_HEADING_PRODUCTS_ALL; ?></a>

But, that will change ALL categories pages (not just the main page). If you want homepage only, you can wrap it in an IF statement like so:

<?php if ($this_is_home_page) { ?>
<a class="category-links" href="<?php echo zen_href_link(FILENAME_PRODUCTS_ALL); ?>"><?php echo CATEGORIES_BOX_HEADING_PRODUCTS_ALL; ?></a>
<?php } ?>
12 Jul 2011, 10:20 PM
#7
autoace avatar

autoace

Totally Zenned

Join Date:
Jun 2009
Posts:
618
Plugin Contributions:
0

Re: "See all links" option?

Thank you, but that is not exactly what I'm trying to do. I have my Top level categories in the center column and they all have at least 5 more sub-cats under them. What I'd like to do is create a bulleted list of the next sub cats under the parent cat and then have a link under the bulleted list that reads 'See all'. Any ideas?

12 Jul 2011, 10:35 PM
#8
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Re: "See all links" option?

Well that's going to be much more involved. I know of a module to do so on the categories sidebox, but not in the actual categories page.

First, you'll need to split out the category index template so you can make changes on the homepage and not on the regular categories page (unless you want it on both), then you'll have to modify the category tree and code.

Use this thread as a reference, and before you begin, BACKUP all your files in case something goes wrong. http://www.zen-cart.com/forum/showthread.php?t=45710