Hi,
I figured out how to display the category name instead of "Let's see what we have here." But I have a question for any gurus out there.
First, here's the fix for those of you interested:
********************************************
Changeing "Let's see what we have here" to show the category.
When you open default.php in dreamweaver you'll see three tables. In the second table
where it says "echo HEADING_TITLE" on line two-hundred-something in code view, replace
that with this mumbo jumbo:
<?php
if ($cPath) {
if (!ereg('_', $cPath)) {
$cPath_array = array($cPath);
}
$cPath_new = '';
for($i=0; $i<sizeof($cPath_array); $i++) {
if ($cPath_new == '') {
$cPath_new .= $cPath_array[$i];
} else {
$cPath_new .= '_' . $cPath_array[$i];
}
$categories_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . $cPath_array[$i] . "' and language_id='" . $languages_id . "'");
$categories = tep_db_fetch_array($categories_query);
echo $categories['categories_name'];
}
} elseif ($HTTP_GET_VARS['manufacturers_id']) {
$manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . $HTTP_GET_VARS['manufacturers_id'] . "'");
$manufacturers = tep_db_fetch_array($manufacturers_query);
echo $manufacturers['manufacturers_name'];
}
if ($HTTP_GET_VARS['products_id']) {
$model = tep_db_query("select products_model from " . TABLE_PRODUCTS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "'");
$model_values = tep_db_fetch_array($model);
echo $model_values['products_model'];
}
if ($location) {
echo $location;
}
?>
********************************************
Now, here's my question. This code works for main categories, but when it displays subcategories, it runs the category and subcategory together. For example: CategorynameSubcategoryname instead of Categoryname space Subcategoryname. I'd like to modify the above code to insert a break tag <br> after the man category name.
The code I posted I took from header.php and modified it. Anyone want to modify further and see what you can come up with?
Thanks!!
If I can fix it, I'll post it as a follow up.
-Web *****




LinkBack URL
About LinkBacks






Bookmarks