osCmax v2.5 User Manual
Results 1 to 2 of 2

Is there a way to do this?

This is a discussion on Is there a way to do this? within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Hello. What i am trying to do is, set the browser's title to the name of the item when clicked ...

      
  1. #1
    New Member
    Join Date
    May 2003
    Posts
    11
    Rep Power
    0


    Default Is there a way to do this?

    Hello.

    What i am trying to do is, set the browser's title to the name of the item when clicked on. I would like it to go like this in the browsers title:

    mydomain.com - { item number } - { description }

    how would i go about doing this. I know you have to edit it in the products_info file

    Is this Possible?

    Any help would be great!

    Thank You!

  2. #2
    Member
    Join Date
    Nov 2002
    Location
    Pennsylvania
    Posts
    93
    Rep Power
    0


    Default

    Sorry everyone been away for awhile:

    Here is your solution:

    Works in osCommerce 2.2 MS2, should work in osCommercer 2.2 MS1

    locate product_info.php

    find:
    Code:
    ?>
    <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
    then paste this right before that line:
    Code:
    $product_title_page_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
    $product_title_page = tep_db_fetch_array($product_title_page_query);
    
    $NewTitle = HTTP_SERVER.' - { '.$product_title_page['products_model'].' } - { '.$product_title_page['products_description'].' }';
    Then replace :
    Code:
    <title><?php echo TITLE; ?></title>
    with :
    Code:
    <title><?php echo $NewTitle; ?></title>
    |3ackdraft
    There\'s something about fireman, day and night they are always fireman!

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
  •