Guest Posted December 8, 2005 Share Posted December 8, 2005 Hi, is there a way when a product is shown to show the manufacturer as well? This is when product_info.php is called up. I'd like to have 'Manufacturer:' replaced with 'Authour:' since I am setting up a used bookstore. I'm very new to OS Commerce with hardly any coding experience. Thanks. Link to comment Share on other sites More sharing options...
wheeloftime Posted December 8, 2005 Share Posted December 8, 2005 Hi, is there a way when a product is shown to show the manufacturer as well? This is when product_info.php is called up. I'd like to have 'Manufacturer:' replaced with 'Authour:' since I am setting up a used bookstore. I'm very new to OS Commerce with hardly any coding experience. Thanks. If you attach a manufacturer to a product the manufacturer will be shown as soon as someone goes to the product info page. You assign a manufacturer, or whatever you want to name it, while creating new products for your shop (or edit existing ones). To change the word 'manufacturer' to something else you just have to go through all the language files and definitions you will find in, for english ie., (catalog)/includes/languages/english.php and the other english language files you will find under (catalog)/includes/languages/english Open the files in a text editor (DO NOT use the build in osC file manager) and look, for example in english.php, for // manufacturers box text in includes/boxes/manufacturers.php define('BOX_HEADING_MANUFACTURERS', 'Manufacturers'); and change that to ie. // manufacturers box text in includes/boxes/manufacturers.php define('BOX_HEADING_MANUFACTURERS', 'Authors'); HTH Link to comment Share on other sites More sharing options...
MarthaD Posted December 8, 2005 Share Posted December 8, 2005 Plop this in your product info page (you can decide where it best fits): <?php $manufacturers_query = tep_db_query("select a.manufacturers_name, a.manufacturers_id from manufacturers a, " . TABLE_PRODUCTS . " m where a.manufacturers_id = m.manufacturers_id and m.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); $manufacturers = tep_db_fetch_array($manufacturers_query) ?> <tr> <td class="main" align="left"><b><?php echo TEXT_MANUFACTURER; ?>:</b> <a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id']); ?>"><?php echo $manufacturers['manufacturers_name']; ?></a></td> </tr> That will produce: Manufacturer: Name "name" is a link which is clickable and will prduce the same result as clicking the name in the manufacturers dropdown - hence a list of all products associated with said manufacturer. Change the word "Manufacturer" to "Author" in languages/english.php :thumbsup: Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.