This is a discussion on Show Category instead of "let's see.." within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Hi, I figured out how to display the category name instead of "Let's see what we have here." But I ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| 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 ***** |
|
#2
| |||
| |||
| This is just an untested guess, but you probably can get away with just changing the line that reads: echo $categories['categories_name']; to: echo $categories['categories_name'] . "<br />"; hth, -- stan c",) |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Does your "Buy Now" button work in category view? | treb | osCMax v2 Installation issues | 7 | 06-21-2005 11:45 AM |
| Creating "list price" listing category | southwestseas | osCommerce 2.2 Modification Help | 0 | 06-30-2004 06:57 PM |
| Get "n" showing when I click on a category after r | Lord | osCommerce 2.2 Modification Help | 7 | 04-15-2004 03:45 PM |
| pictures won't show "https" is culprit | bushman | osCMax v1.7 Discussion | 0 | 03-24-2004 05:06 PM |
| "All Products" Category (and other stuff) | JazzKatt | osCommerce 2.2 Modification Help | 1 | 03-05-2003 12:48 AM |