Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Is it possible to have 2 Category boxes?

Is it possible to have 2 Category boxes?

Locked

Views: 18,542

Results 61 to 66 of 66
This thread is locked. New replies are disabled.
20 Jan 2010, 12:10 AM
#61
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Is it possible to have 2 Category boxes?

In the stock tpl_categories.php, this is the value that is used to test whether a category belongs in the categories sidebox:```php
if (zen_get_product_types_to_category($box_categories_array[$i]['path']) == 3 ...

20 Jan 2010, 12:20 AM
#62
khopek avatar

khopek

Totally Zenned

Join Date:
Aug 2006
Location:
portlandish, oregon
Posts:
795
Plugin Contributions:
0

Re: Is it possible to have 2 Category boxes?

+----------------------------------------------------------------------+
// $Id: tpl_categories_css.php 2004/06/23 00:00:00 DrByteZen Exp $
//
$content = '';

// Load containing UL and content
$content .= '<ul class="bullet-menu" id="siteMenu">';
// get the menu tree (see the modules/sideboxes/YOURTEMPLATE/categories_css.php), strip off containing UL
$content .= preg_replace('%^\s*<ul>(.+)</ul>\s*$%sim', '\1', $menulist);

if (SHOW_CATEGORIES_BOX_SPECIALS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true') {
//$content .= '<hr />'; // insert a blank line/box in the menu
if (SHOW_CATEGORIES_BOX_SPECIALS == 'true') {
$content .= ' <li><a href="' . zen_href_link(FILENAME_SPECIALS) . '">' . CATEGORIES_BOX_HEADING_SPECIALS . '</a></li>'."\n";
}
if (SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true') {
$content .= ' <li><a 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 .= ' <li><a href="' . zen_href_link(FILENAME_FEATURED_PRODUCTS) . '">' . CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS . '</a></li>'."\n";
}
}
if (SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
$content .= ' <li><a href="' . zen_href_link(FILENAME_PRODUCTS_ALL) . '">' . CATEGORIES_BOX_HEADING_PRODUCTS_ALL . '</a></li>'."\n";
}

$content .= "</ul>\n";

// Load JS file if this sidebox is enabled
$content .= '<script type="text/javascript" src="' . $template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/categories_css.js"></script>'."\n";

// Preload menu images when page loads (won't affect IE, which never caches CSS images)
$m = $template->get_template_dir('.gif', DIR_WS_TEMPLATE, $current_page_base,'images/menu').'/';
$content .= '<script type="text/javascript">addDOMEvent(window,"load",function() {preloadImages("'.$m.'branch.gif","'.$m.'leaf-end-on.gif","'.$m.'leaf-end.gif","'.$m.'leaf-on.gif","'.$m.'leaf.gif","'.$m.'node-end-on.gif","'.$m.'node-end.gif","'.$m.'node-on.gif","'.$m.'node-open-end-on.gif","'.$m.'node-open-end.gif","'.$m.'node-open-on.gif","'.$m.'node-open.gif","'.$m.'node.gif")}, false);</script>'."\n";
?>

This is the whole page for categories_css.php, the code you show does not appear...thus my previous statment of no option for it.:blink:

12 Feb 2010, 4:36 AM
#63
supplyman avatar

supplyman

New Zenner

Join Date:
Feb 2008
Location:
Alabama
Posts:
12
Plugin Contributions:
0

Re: Is it possible to have 2 Category boxes?

I have a similar question concerning 2 Catagory boxes. I would like one to be for specific catagories like Toner, Ink, Ribbons, etc. This catagory would take the customer to a sub-catagory which has the brand name of the product, ie Apple, Brother, HP. The second catagory box would be for specific brand like Apple, HP, Brother. I thought about using the Manufacturers Sidebox but don't want it scroll but list all them.

Which is the easiest and most effective way to handle this problem. Thanks in advance for any advice.:frusty:

12 Feb 2010, 11:25 AM
#64
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Is it possible to have 2 Category boxes?

tpl_categories_css.php does not do the assembly of the categories output; that is handled by categories_css.php, which is thus the file to look at for the box choice.

12 Feb 2010, 6:11 PM
#65
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Is it possible to have 2 Category boxes?

The two category box look can be handled in a couple of different ways by Categories Dressing. See its support thread for a recent discussion of such a case.

21 May 2010, 11:05 PM
#66
khopek avatar

khopek

Totally Zenned

Join Date:
Aug 2006
Location:
portlandish, oregon
Posts:
795
Plugin Contributions:
0

Re: Is it possible to have 2 Category boxes?

gjh42:

tpl_categories_css.php does not do the assembly of the categories output; that is handled by categories_css.php, which is thus the file to look at for the box choice.

You think i'd catch on, but alas, every time I try to come back to this nothing works. :D

I would just use a regular category box, but the JS version is just so much nicer as I have lots of subcategories.