Sure, this will only work with text links, won't it?
But I use the mod to have category Images. How can I get those rollover effects to work with my images?
I appreciate ur help.
Sure, this will only work with text links, won't it?
But I use the mod to have category Images. How can I get those rollover effects to work with my images?
I appreciate ur help.
Rollover image swapping is something I haven't worked on yet. One way to accomplish it would be with Javascript code, which I know very little about.
Another way would be to modify the "catimgxx.gif" generator to create a custom id tag instead. This could then have a background image assigned to each category in the stylesheet, which could be swapped on hover.
I'll work on this, but no promises on timetable.
I need help got the Category Dressing working pretty well, but theres a couple of issues.
1) Now all my icons next to each category has disappeared?
I have more, but lets attack one at a time, please help, this is urgent!
Do you have BetterCategories installed? It modifies some of the same code as this, so they would need to be carefully integrated, and might not be completely compatible.
What method/code did you use to get the icons?
no I don' thave better cat installed, here is the orignal code that had the icons next to each cat for tpl_categories.php Let me know what you think. THanks for your help!
<?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 3157 2006-03-10 23:24:22Z drbyte $
*/
//$content_tm = '';
//$content_head = tm_box_head(BOX_HEADING_CATEGORIES,'','style3');
$content_tm .= '<ul class="ul2">
';
for ($i=0;$i<sizeof($box_categories_array);$i++) {
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_tm .= '<li><a 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_tm .= '<span class="category-subs-parent">' . $box_categories_array[$i]['name'] . '</span>';
} else {
$content_tm .= '<span class="category-subs-selected">' . $box_categories_array[$i]['name'] . '</span>';
}
} else {
$content_tm .= $box_categories_array[$i]['name'];
}
if ($box_categories_array[$i]['has_sub_cat']) {
$content_tm .= CATEGORIES_SEPARATOR;
}
if (SHOW_COUNTS == 'true') {
if ((CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) {
$content_tm .= CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX;
}
}
$content_tm .= '</a></li>';
// if($i + 1 != sizeof($box_categories_array))
// $content_tm .= '<br /><div class="cat_separator"></div>' . "\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_tm .= '</ul>
<br style="line-height:10px;">
<div class="h_l"><img alt="" src="images/spacer.gif" width="1" height="1"></div>
<br style="line-height:6px;">
<ul class="ul2" >' . "\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_tm .= '<li><a class="category-links" href="' . zen_href_link(FILENAME_SPECIALS) . '">' . CATEGORIES_BOX_HEADING_SPECIALS . '</a>' . '</li>' . "\n";
}
}
if (SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true') {
// display limits
$display_limit = zen_get_products_new_timelimit();
$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_tm .= '<li><a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_NEW) . '">' . CATEGORIES_BOX_HEADING_WHATS_NEW . '</a>' . '</li>' . "\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_tm .= '<li><a class="category-links" href="' . zen_href_link(FILENAME_FEATURED_PRODUCTS) . '">' . CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS . '</a>' . '</li>' . "\n";
}
}
if (SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
$content_tm .= '<li><a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_ALL) . '">' . CATEGORIES_BOX_HEADING_PRODUCTS_ALL . '</a></li>' . "\n";
}
}
$content_tm .= '</ul>';
//$content_cont = tm_box_cont($content_tm);
//$content = $content_head.$content_cont;
$content = $content_tm;
?>
Ok, you have a Template Monster template, which has added a bunch of code to the stock file, and changed how the contents are built.
If you tell me which Categories Dressing feature you are trying to use, I can probably tell you how to integrate it with this template.
I think the issue is that TM has modified the categories to display as an unordered list, and when you merged/replaced code that got eliminated.