This is a discussion on adding manufacturer name to product_info within the osCMax v1.7 Discussion forums, part of the osCMax v1.7 Forums category; There was a post about this before, but I'm still having trouble. I'm trying to add the manufacturer's name to ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| 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; ?> The only thing I have been successfully able to grab is the manufacturers_id, which is just a numeric value. Any suggestsions? |
| Sponsored Links | ||
| ||
|
#2
| |||
| |||
| 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 majsiddiki@yahoo.com 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>'; |
| Sponsored Links | ||
| ||
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Modifying Product_info.php | Migraine | osCommerce 2.2 Modification Help | 0 | 05-04-2005 03:23 AM |
| product_info.php | Migraine | osCommerce 2.2 Modification Help | 1 | 04-20-2005 08:18 AM |
| how to add manufacturer to product_info.php | atech | osCommerce 2.2 Modification Help | 0 | 04-14-2004 09:03 PM |
| changing name of product_info.php | Anonymous | osCMax v1.7 Discussion | 1 | 03-26-2004 06:20 AM |
| Adding another Manufacturer type box | Lalla | osCommerce 2.2 Modification Help | 3 | 02-09-2004 05:17 PM |