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?
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?
Thank you,
autoace
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.
Ok, please let me know what settings you used so I can help you figure out how to add "See All" to it.
Ok, thanks. In Configuration > Layout Settings > 'Categories - Always Show on Main Page' -- You just set it to 1 instead of 0.
Thank you,
autoace
Oh, I see what you're saying now! I was picturing the category list as it appears in sideboxes, not the product listing
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:
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:Code:<a class="category-links" href="<?php echo zen_href_link(FILENAME_PRODUCTS_ALL); ?>"><?php echo CATEGORIES_BOX_HEADING_PRODUCTS_ALL; ?></a>
Code:<?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 } ?>
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?
Thank you,
autoace
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
Bookmarks