Results 1 to 2 of 2

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

      
  1. #1
    Lurker
    Join Date
    Nov 2002
    Posts
    2
    Rep Power
    0


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

  2. #2
    Member
    Join Date
    Oct 2002
    Posts
    40
    Rep Power
    0


    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",)

Similar Threads

  1. Does your "Buy Now" button work in category view?
    By treb in forum osCmax v2 Installation issues
    Replies: 7
    Last Post: 06-21-2005, 12:45 PM
  2. Creating "list price" listing category
    By southwestseas in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 06-30-2004, 07:57 PM
  3. Get "n" showing when I click on a category after r
    By Lord in forum osCommerce 2.2 Modification Help
    Replies: 7
    Last Post: 04-15-2004, 04:45 PM
  4. pictures won't show "https" is culprit
    By bushman in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 03-24-2004, 05:06 PM
  5. "All Products" Category (and other stuff)
    By JazzKatt in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 03-05-2003, 12:48 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •