That's very true.. However, if you are using the main page to create a "splash page", you probably would NOT display the categories there. You may want to create a separate "landing page" with just the top level categories.
Originally Posted by bunyip
And yes I could create a very separate page and link it to Zen.. Though I've done it once, I prefer not to create a "splash/opening page" outside of Zen Cart. (Makes things messy IMO) So I'll often use the main page to create a "splash/opening page" and the top level category to create a "landing page".
Like edwardtilbury, I have always used: http://www.yourdomain.com/index.php?...=index&cPath=0 to create this "landing page".
However both edwardtilbury and I have recently discovered that SEO apps will undo this. Some treat http://www.yourdomain.com/index.php?...=index&cPath=0 as being = to http://www.yourdomain.com/. Which leaves us to seek out another option to achieve the same end result..
So here's what I did:
I used the "ZenCart Define Page Generator" application
Using this tool, I created a defined page called "store_main"
These are the files the "ZenCart Define Page Generator" application generated:
I edited the "includes/templates/custom_template/templates/tpl_store_main_default.php" file and just below this code:
I added the following:
* require the html_define for the store_main page
I uploaded everything to my site, added whatever text I wanted added to the new defined page, and that was it..
$categories_query = "SELECT c.categories_id, cd.categories_name, c.categories_image, c.parent_id
FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
WHERE c.parent_id = :parentID
AND c.categories_id = cd.categories_id
AND cd.language_id = :languagesID
AND c.categories_status= '1'
ORDER BY sort_order, cd.categories_name";
$categories_query = $db->bindVars($categories_query, ':parentID', $cat_id, 'integer');
$categories_query = $db->bindVars($categories_query, ':languagesID', $_SESSION['languages_id'], 'integer');
$categories = $db->Execute($categories_query);
$number_of_categories = $categories->RecordCount();
require($template->get_template_dir('tpl_modules_category_row.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_category_row.php');
The only other tasks after this were making sure I changed the various menus (I'm using a dropdown menu and a site map in the footer..) and editing the breadcrumbs so that the "Home" link pointed to my new landing page.. Though I'm not using them for the site I am working on now, if I was using EZPages or the navMain links the "home" links would have to be edited as well to point to the new landing page..
Hope this all makes sense..
BTW, for anyone who stumbles across this who might ask why this can't be done with an EZ Page.. You can't add PHP code to an EZ Page.
See this in action:
http://clients.overthehillweb.com/hairisle/ - Main Page
http://clients.overthehillweb.com/hairisle/store_main - New Landing Page
Add top level categories to another page
Insert top level categories