|
I think in this case you could try the following:
Open up the categories file you are using, it may be in the templates/default folder or templates/maintemplate/boxes/ folder in your case.
Find the following:
<?php $aa = 0; $info_box_contents = array(); $info_box_contents[] = array('text' => '<font color="' . $font_color . '">' . BOX_HEADING_CATEGORIES4 . '</font>'); new $infobox_template_heading($info_box_contents, '', $column_location); $categories_string4 = ''; $categories_query = tep_db_query("SELECT c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd WHERE c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' ORDER BY sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { $foo[$categories['categories_id']] = array('name' => ($categories['categories_name'])), 'parent' => $categories['parent_id'], 'level' => 0, 'path' => $categories['categories_id'], 'next_id' => false );
and add change to this:
<?php $aa = 0; $info_box_contents = array(); $info_box_contents[] = array('text' => '<font color="' . $font_color . '">' . BOX_HEADING_CATEGORIES4 . '</font>'); new $infobox_template_heading($info_box_contents, '', $column_location); $categories_string4 = ''; $categories_query = tep_db_query("SELECT c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd WHERE c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' ORDER BY sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { $foo[$categories['categories_id']] = array('name' => ucwords(strtolower($categories['categories_name'])), 'parent' => $categories['parent_id'], 'level' => 0, 'path' => $categories['categories_id'], 'next_id' => false );
That will sort out your Main Catergory names to Capital First Letter and the rest Lowercase..
Now.. look a little further down the code and find this:
if ($cPath) { $new_path = ''; $id = split('_', $cPath); reset($id); while (list($key, $value) = each($id)) { unset($prev_id); unset($first_id); $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . $value . "' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name"); $category_check = tep_db_num_rows($categories_query); if ($category_check > 0) { $new_path .= $value; while ($row = tep_db_fetch_array($categories_query)) { $foo[$row['categories_id']] = array('name' => $row['categories_name'])), 'parent' => $row['parent_id'], 'level' => $key+1, 'path' => $new_path . '_' . $row['categories_id'], 'next_id' => false );
And replace with this:
if ($cPath) { $new_path = ''; $id = split('_', $cPath); reset($id); while (list($key, $value) = each($id)) { unset($prev_id); unset($first_id); $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . $value . "' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name"); $category_check = tep_db_num_rows($categories_query); if ($category_check > 0) { $new_path .= $value; while ($row = tep_db_fetch_array($categories_query)) { $foo[$row['categories_id']] = array('name' => ucwords(strtolower($row['categories_name'])), 'parent' => $row['parent_id'], 'level' => $key+1, 'path' => $new_path . '_' . $row['categories_id'], 'next_id' => false );
That will do the same for the sub_categories...
_________________ Italian Food - http://mdjl-demo.co.uk/mediterraneandirect
CSS Store - http://mdjl-demo.co.uk/store1 -Work in Progress
|