osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Show Category instead of "let's see.."

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 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Modification Help

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 11-29-2002, 08:05 AM
Lurker
 
Join Date: Nov 2002
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
WebBitch
Default Show Category instead of "let's see.."

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 *****
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 12-03-2002, 04:08 PM
Member
 
Join Date: Oct 2002
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
stan
Default

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",)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 03:34 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax