Guest Posted February 17, 2003 Share Posted February 17, 2003 Do you want to display the manufacturers name on the product info page? I can't see why this wasn't done by default... luckily its easy to add: In product_info.php change this query: $product_info = 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_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.language_id = '" . $languages_id . "'"); To this: $product_info = 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, m.manufacturers_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.language_id = '" . $languages_id . "' and m.manufacturers_id = p.manufacturers_id"); Around line 82 change this: <td colspan="2" class="pageHeading">' . $product_info_values['products_model'] . '</td>' to this: <td colspan="2" class="pageHeading">' . $product_info_values['manufacturers_name'] . ' (' . $product_info_values['products_model'] . ')</td>' This puts the manufacturers name first and the product model in (brackets). You can play with it to display it however you like!! Please leave me a reply if you found this useful :D Link to comment Share on other sites More sharing options...
Waza04 Posted February 19, 2003 Share Posted February 19, 2003 I cant seem to get this to work!! Whenever I go onto a product, it always show the manufacturer with ID 1 - Canon!! Whats wrong? Link to comment Share on other sites More sharing options...
Waza04 Posted February 19, 2003 Share Posted February 19, 2003 :oops: Nevermind, forgot to add the last little bit of code!! Link to comment Share on other sites More sharing options...
johnnyosc Posted February 27, 2003 Share Posted February 27, 2003 how can you get it to show a manufacture image instead of text in the product info page? Link to comment Share on other sites More sharing options...
mark_fijama Posted February 27, 2003 Share Posted February 27, 2003 how can you get it to show a manufacture image instead of text in the product info page? Hi, surelly your can do it through adding a shortcut to the image (create a new field in Your manufacturers db). I gues is as simple as the products image itself. Best Regards Mark Link to comment Share on other sites More sharing options...
Guest Posted April 24, 2003 Share Posted April 24, 2003 Can you also add the product weight for product listing. Thanks, Nora Tam Link to comment Share on other sites More sharing options...
Guest Posted April 26, 2003 Share Posted April 26, 2003 test Link to comment Share on other sites More sharing options...
Ajeh Posted April 27, 2003 Share Posted April 27, 2003 Can you also add the product weight for product listing. Thanks, Nora Tam All of the Product listing fields are configureable in Admin ... Configuration ... Product Listing ... 0= off ... 1= on ... other numbers will sort the list left to right in the number order you give. Link to comment Share on other sites More sharing options...
sk8ash Posted September 29, 2010 Share Posted September 29, 2010 Hello i am having an issue with this... i have tried to implement this mysql statement but it doesn't seem to work correctly it shows the wrong manufacturer. I was wondering if anyone could help me regarding this. Link to comment Share on other sites More sharing options...
geomilli Posted February 4, 2012 Share Posted February 4, 2012 I see where you are going with this... I wanted to do away with the boxes all over the place and integrate them into the product_info.php. Here's how I did it. First you need to call the manufacturer info up into an array, like so: $manufacturer_query = tep_db_query("select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, mi.manufacturers_url from " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on (m.manufacturers_id = mi.manufacturers_id and mi.languages_id = '" . (int)$languages_id . "'), " . TABLE_PRODUCTS . " p where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.manufacturers_id = m.manufacturers_id"); $manufacturer = tep_db_fetch_array($manufacturer_query); Put that just below $product_info_query. Next, I want to call the info to the area I want on the product_info page, like so: <? echo BOX_MANUFACTURER_PROINFO_OTHER_PRODUCTS . '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturer['manufacturers_id']) . '">' . tep_image(DIR_WS_IMAGES . $manufacturer['manufacturers_image'], $manufacturer['manufacturers_name']) . '</a>'; ?> The text called BOX_MANUFACTURER_PROINFO_OTHER_PRODUCTS is in english.php. I created a new one for this instance, like so: define('BOX_MANUFACTURER_PROINFO_OTHER_PRODUCTS', '<font color="#BABABA" size="1"><i>CLICK HERE FOR MORE PRODUCTS<br>FROM<br></i></font>'); I put that just under the original BOX_MANUFACTURER_INFO_OTHER_PRODUCTS. And that should do it. TWEAK If you want the text to be a hyperlink as well just rearrange it like this: <? echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturer['manufacturers_id']) . '">' . BOX_MANUFACTURER_PROINFO_OTHER_PRODUCTS . tep_image(DIR_WS_IMAGES . $manufacturer['manufacturers_image'], $manufacturer['manufacturers_name']) . '</a>'; ?> Then you might want to take the <font color="#BABABA">out of the english.php to keep it standard for your needs. Link to comment Share on other sites More sharing options...
Melhor Posted February 8, 2012 Share Posted February 8, 2012 the code is different in the 2.3 version ! somebody an idea how to show manufacturers name in the productpage? I also found that you can add a URL but i did'n see it in the productpage ! Why? How to fix it? thx Link to comment Share on other sites More sharing options...
johnsellinge Posted February 9, 2012 Share Posted February 9, 2012 Try these Kozak. Link to comment Share on other sites More sharing options...
Melhor Posted February 9, 2012 Share Posted February 9, 2012 is this the new way to be helpfull by sending links to nowhere? Link to comment Share on other sites More sharing options...
Oza Posted August 15, 2012 Share Posted August 15, 2012 Do you want to display the manufacturers name on the product info page? I can't see why this wasn't done by default... luckily its easy to add: In product_info.php change this query: $product_info = 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_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.language_id = '" . $languages_id . "'"); To this: $product_info = 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, m.manufacturers_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.language_id = '" . $languages_id . "' and m.manufacturers_id = p.manufacturers_id"); Around line 82 change this: <td colspan="2" class="pageHeading">' . $product_info_values['products_model'] . '</td>' to this: <td colspan="2" class="pageHeading">' . $product_info_values['manufacturers_name'] . ' (' . $product_info_values['products_model'] . ')</td>' This puts the manufacturers name first and the product model in (brackets). You can play with it to display it however you like!! Please leave me a reply if you found this useful Anyone - how to make manufacturers name a link ? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.