Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Show sidebox based on Product Type

Show sidebox based on Product Type

Locked

Views: 1,103

Results 1 to 1 of 1
This thread is locked. New replies are disabled.
1 Jan 2009, 1:46 AM
#1
harbpaul avatar

harbpaul

New Zenner

Join Date:
Jan 2009
Posts:
1
Plugin Contributions:
0

Show sidebox based on Product Type

This is my first post and first zen cart website. I have learned so much from reading all the posts...it's nice to see so many people coming together and helping each other out. Mayve someone can help me...

I found from numerous posts that the best way to have 2 category trees is to utilize the documents category as a second tree. What I have been trying to do is figure out how to get the category list to only show-up when the visitor clicks on a particuler EZ page, and the documents category list show up when they click on a second EZ page. I got it to work up until I click on a sub-category and the list disappears.

Is there a code like if statement that says if we are looking at a certain product type, to show one list, and if it's another statement to show the other list.

I found a items by searching google where people mentioned having been able to do this, but never explained how.

Here is the if statement from my categories.php file under includes/modules/sideboxes/my_theme/categories.php


<?php /** * categories sidebox - prepares content for the main categories sidebox * * @package templateSystem * @copyright Copyright 2003-2005 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: categories.php 2718 2005-12-28 06:42:39Z drbyte $ */ $main_category_tree = new category_tree; $row = 0; $box_categories_array = array(); // don't build a tree when no categories $check_categories = $db->Execute("select categories_id from " . TABLE_CATEGORIES . " where categories_status=1 limit 1"); if ($check_categories->RecordCount() > 0) { $box_categories_array = $main_category_tree->zen_category_tree(); } if( $_GET['main_page'] == 'page' && $_GET['id'] == 5) { require($template->get_template_dir('tpl_categories.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_categories.php'); $title = BOX_HEADING_CATEGORIES; $title_link = false; require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default); } ?>

I hope I was clear enough. And sorry for the long post.

Thanks In advance and Happy New Year to all!

-Paul