Thank you so much for looking at this.
What version of Zen Cart?:
Zen Cart 1.3.8a
Database Patch Level: 1.3.8
v1.3.8 [2009-07-02 14:34:11] (Fresh Installation)
v1.3.8 [2009-07-02 14:34:11] (Fresh Installation)
Clean or Fresh Install?
Developed locally and then uploaded according to instructions, using fix_cache_key. But now I see the problem exists on the local version as well. I deleted all the categories on the local version, and put new ones in, but it does the same thing, if you navigate from the top level of the ctegory page ( the one with thumbnails and text links of the subcategories)
What Add-Ons?
Manufacturers box modifaction to display manufacturers as list and not drop downs (but I can't think that would affect the categories). I also used the following solution
Code:
<?php
/**
* Side Box Template
*
* @package templateSystem
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_categories.php 4162 2006-08-17 03:55:02Z ajeh $
*/
$content = "";
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";
for ($i=0;$i<sizeof($box_categories_array);$i++)
{
$cPath_array = explode('_', $box_categories_array[$i]['path']);
$level = count($cPath_array);
switch(true)
{
// to make a specific category stand out define a new class in the stylesheet example: A.category-holiday
// uncomment the select below and set the cPath=3 to the cPath= your_categories_id
// many variations of this can be done
// case ($box_categories_array[$i]['path'] == 'cPath=3'):
// $new_style = 'category-holiday level'.$level;
// break;
case ($box_categories_array[$i]['top'] == 'true'):
$new_style = 'category-top level'.$level;
break;
case ($box_categories_array[$i]['has_sub_cat']):
$new_style = 'category-subs level'.$level;
break;
default:
$new_style = 'category-products level'.$level;
}
if (zen_get_product_types_to_category($box_categories_array[$i]['path']) == 3 or ($box_categories_array[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1))
{
// skip if this is for the document box (==3)
}
else
{
$content .= '<a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';
if ($box_categories_array[$i]['current']) {
if ($box_categories_array[$i]['has_sub_cat']) {
$content .= '<span class="category-subs-parent level'.$level.'">' . $box_categories_array[$i]['name'] . '</span>';
} else {
$content .= '<span class="category-subs-selected level'.$level.'">' . $box_categories_array[$i]['name'] . '</span>';
}
} else {
$content .= $box_categories_array[$i]['name'];
}
if ($box_categories_array[$i]['has_sub_cat']) {
$content .= CATEGORIES_SEPARATOR;
}
$content .= '</a>';
if (SHOW_COUNTS == 'true') {
if ((CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) {
$content .= CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX;
}
}
$content .= '' . "\n";
}
}
if (SHOW_CATEGORIES_BOX_SPECIALS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true' or SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
// display a separator between categories and links
if (SHOW_CATEGORIES_SEPARATOR_LINK == '1') {
$content .= '<hr id="catBoxDivider" />' . "\n";
}
if (SHOW_CATEGORIES_BOX_SPECIALS == 'true') {
$show_this = $db->Execute("select s.products_id from " . TABLE_SPECIALS . " s where s.status= 1 limit 1");
if ($show_this->RecordCount() > 0) {
$content .= '<a class="category-links level'.$level.'" href="' . zen_href_link(FILENAME_SPECIALS) . '">' . CATEGORIES_BOX_HEADING_SPECIALS . '</a>' . '' . "\n";
}
}
if (SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true') {
// display limits
// $display_limit = zen_get_products_new_timelimit();
$display_limit = zen_get_new_date_range();
$show_this = $db->Execute("select p.products_id
from " . TABLE_PRODUCTS . " p
where p.products_status = 1 " . $display_limit . " limit 1");
if ($show_this->RecordCount() > 0) {
$content .= '<a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_NEW) . '">' . CATEGORIES_BOX_HEADING_WHATS_NEW . '</a>' . '' . "\n";
}
}
if (SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true') {
$show_this = $db->Execute("select products_id from " . TABLE_FEATURED . " where status= 1 limit 1");
if ($show_this->RecordCount() > 0) {
$content .= '<a class="category-links" href="' . zen_href_link(FILENAME_FEATURED_PRODUCTS) . '">' . CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS . '</a>' . '' . "\n";
}
}
if (SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
$content .= '<a class="category-links level'.$level.'" href="' . zen_href_link(FILENAME_PRODUCTS_ALL) . '">' . CATEGORIES_BOX_HEADING_PRODUCTS_ALL . '</a>' . "\n";
}
}
$content .= '</div>';
?>
in tpl_categories.php file to indent the subcategories. I found this here: http://www.zen-cart.com/forum/showthread.php?p=765438, and am beginning to wonder if that may be a problem.
Do you Manually add Products and Categories or do you Import?
I manually added the products on the local installation, and then imported into the www version. But the problem is also on the local version.
categories_id 60 is somehow not behaving correctly on your site ...
I added another one that will go below it, (Veterinary, or categories_id 62) and now category 60 is behaving properly, and 62 is not.
how many categories_id have the parent_id of 60 ...
none, it looks like to me (or 62) but I am not sure if I am checking correctly. But, if I go to phpMyAdmin, I see the following warning:
The following indexes appear to be equal and one of them should be removed: PRIMARY, categories_id
I am sooooooooooo confused!