Full service web hosting, great prices and support. Starts at $1.99/month!
Results 1 to 2 of 2

Thread: adding manufacturer name to product_info

  1. #1
    kellbot
    Guest


    Default adding manufacturer name to product_info

    There was a post about this before, but I'm still having trouble.
    I'm trying to add the manufacturer's name to my product_info pages.

    I tried using
    Code:
    <?php echo $manufacturers_name; ?>
    , as suggested in another post, but no luck. I don't see anywhere defining $manufacturers_name in my application_top.php.

    The only thing I have been successfully able to grab is the manufacturers_id, which is just a numeric value.

    Any suggestsions?

  2. #2
    glynn
    Guest


    Default RE: adding manufacturer name to product_info

    This is a copy of a mod that worked for me you might have to look in templates for some of the files.

    [code]

    This Contribution Adds Category Name & Manufacturers name of the product on the product info. page where the model number is. It addes these two fields right after the model number to that you have the 3 fileds under the product name:
    "model number Category name Mfg:Manufacturers name"

    question or suggestions [email protected]

    General instructions:

    1- Please backup you database and the files that you will be changing in case you encounter an error and you want to backout.
    2- Please note that this has been developed against 2.2 MS 1. If you are using a different code level, then this contribution may
    not work properly.
    3- This code is released as BETA, thus I shall not be held responsible if this code does not function properly, or if this code breaks any
    functionality that results in loss of profits in your online shop.
    4- It is important to implement this to a test environment first and then to your production environment.
    5- If you have any comments on this contribution, please post them in the Contributions forum in oscommerce.com community.
    6- All the file changes are requested to be added to the bottom of the pages when possible, so it is easier to add or remove the changes.

    ************************************************** **********************************************
    In catalog/product_info.php
    RIGHT AFTER
    ================================================== ===================
    $product_check = tep_db_fetch_array($product_check_query);
    ================================================== ===================
    ADD THESE FOLLOWING LINES
    ================================================== ===================
    // Start "Category & Manufactureres Name in Product_info"
    $categories_name_query = tep_db_query("select c.categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " c where c.categories_id = '" . (int)$current_category_id . "' and c.language_id = '" . (int)$languages_id . "'");
    $category = tep_db_fetch_array($categories_name_query);
    // Start "Category & Manufactureres Name in Product_info"
    ================================================== ===================
    AND SEARCH FOR THE FOLLOWING LINE (AROUND LINE 70)
    ADD REPLACE IT WITH THIS FOLLOWING CODE BLOCK
    PLEASE NOTE I COULD NOT FIGURE OUT A WAY TO OUTER JOIN THESE TABLE USING THE GLOBAL
    DEFINES FOR THE TABLE NAMES (I am not very familiar with either php or mysql syntax, you are welcome to take a
    shot at it and update this contribution accordingly)
    ================================================== ===================
    // Start "Category & Manufactureres Name in Product_info"
    $product_info_query = tep_db_query("select products.products_id, products_description.products_name, products_description.products_description, products.products_model, products.products_quantity, products.products_image, products_description.products_url, products.products_price, products.products_tax_class_id, products.products_date_added, products.products_date_available, products.manufacturers_id, manufacturers.manufacturers_name FROM products LEFT JOIN manufacturers ON products.manufacturers_id = manufacturers.manufacturers_id left join products_description on products_description.products_id = products.products_id WHERE products.products_status = '1' and products.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and products_description.language_id = '" . (int)$languages_id . "'");
    // End "Category & Manufactureres Name in Product_info"
    ================================================== ===================
    SEARCH FOR THIS LINE
    $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';
    ================================================== ===================
    AND REPLACE IT WITH
    ================================================== ===================
    // Start "Category & Manufactureres Name in Product_info"
    $products_name = $product_info['products_name'] . '<br><span class="smallText">' . $product_info['products_model'] . ' </span>' . ' <span class="smallText"> ' . $category['categories_name'] . '</span>' . ' <span class="smallText">[Mfg:' . $product_info['manufacturers_name'] . ']</span>';
    // End "Category & Manufactureres Name in Product_info"
    ================================================== ===================
    AND SEARCH FOR THE FOLLOWING TEXT
    ================================================== ===================
    else {
    $products_name = $product_info['products_name']
    ================================================== ===================
    AND REPLACE IT WITH
    ================================================== ===================
    else {
    $products_name = $product_info['products_name'] . '<br><span class="smallText"> ' . $category['categories_name'] . '</span>' . ' <span class="smallText">[Mfg:' . $product_info['manufacturers_name'] . ']</span>';

Similar Threads

  1. Modifying Product_info.php
    By Migraine in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 05-04-2005, 02:23 AM
  2. product_info.php
    By Migraine in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 04-20-2005, 07:18 AM
  3. how to add manufacturer to product_info.php
    By atech in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 04-14-2004, 08:03 PM
  4. changing name of product_info.php
    By Anonymous in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 03-26-2004, 06:20 AM
  5. Adding another Manufacturer type box
    By Lalla in forum osCommerce 2.2 Modification Help
    Replies: 3
    Last Post: 02-09-2004, 05:17 PM

Bookmarks

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
  •