Originally Posted by
gjh42
The file would probably be /includes/templates/your_template/sideboxes/tpl_categories.php.
Compare it to /includes/templates/template_default/sideboxes/tpl_categories.php to find the differences.
Thank you gjh42. Yes, you're right. I've changed sth, and what it looks like pls see my site www.letovn.com for reference. But it's not in the line of the category name. May I know what I should modify next? Pls see the following code for reference. Tks!!
Code:
/**
* 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"><ul id="cat">' ;
$ul_close='YES';//YES NO
for ($i=0;$i<sizeof($box_categories_array);$i++) {
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';
// break;
case ($box_categories_array[$i]['top'] == 'true'):
$new_style = 'category-top';
break;
case ($box_categories_array[$i]['has_sub_cat']):
$new_style = 'category-subs';
break;
default:
$new_style = 'category-products';
}
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 {
/////////////////////////////1.1/////////////////////////
if($box_categories_array[$i]['has_sub_cat'] && $new_style == 'category-top' ){
if($ul_close=='NO'){
$content =$content.'</ul></li>';
$ul_close='YES';
}
$content .= '<li><a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';
$content .= $box_categories_array[$i]['name'];
$content =$content.'</a><ul>';
}//new addon for <li>
/////////////////1.2///////////////////////////////
elseif($box_categories_array[$i]['has_sub_cat']==false && $new_style == 'category-products'){// for child
$content .= '<li><a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';
$content .= $box_categories_array[$i]['name'];
$content =$content.'</a></li>';
if($i==(sizeof($box_categories_array)-1)){ //last li ele
$content =$content.'</ul></li>';
}
//////////////////1.3/////////////////
elseif($box_categories_array[$i]['has_sub_cat']==false&&$new_style == 'category-top'){
if($ul_close=='NO'){
$content =$content.'</ul></li>';
$ul_close='YES';
}
$content .= '<li><a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';
$content .= $box_categories_array[$i]['name'];
$content =$content.'</a></li>';
}
////////////////////////////
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;
}
}
}//eof new adds on
}//end of else
}//eof for loop
///////////////////////////////////////////////////////////////////////////////////////////
Bookmarks