mariorr Posted March 5, 2009 Share Posted March 5, 2009 How could I add the name of manufacturers to specials page? Thanks!!! Link to comment Share on other sites More sharing options...
morehawes Posted March 8, 2009 Share Posted March 8, 2009 Hi, i've given this a go for you but wasn't 100% sure what you wanted so you may have to tweak. Also this isn't technically the best way of doing it as an additional query is being called for each specials item but it's ok as a quick-fix. In specials.php: 1) Find these lines (line 79 on a unmodified 2.2 rc2a): while ($specials = tep_db_fetch_array($specials_query)) { $row++; and add this directly below: $manu_query = tep_db_query("SELECT m.manufacturers_name FROM " . TABLE_MANUFACTURERS . " m LEFT JOIN " . TABLE_PRODUCTS . " p ON p.manufacturers_id = m.manufacturers_id WHERE p.products_id = '" . $specials['products_id'] . "'"); $manu_result = tep_db_fetch_array($manu_query); 2) Find this line (line 82 on a unmodified 2.2 rc2a): echo ' <td align="center" width="33%" class="smallText"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $specials['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $specials['products_image'], $specials['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $specials['products_id']) . '">' . $specials['products_name'] . '</a><br><s>' . $currencies->display_price($specials['products_price'], tep_get_tax_rate($specials['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($specials['specials_new_products_price'], tep_get_tax_rate($specials['products_tax_class_id'])) . '</span></td>' . "\n"; and change to: echo ' <td align="center" width="33%" class="smallText"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $specials['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $specials['products_image'], $specials['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $specials['products_id']) . '">' . $specials['products_name'] . '</a><br><s>' . $currencies->display_price($specials['products_price'], tep_get_tax_rate($specials['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($specials['specials_new_products_price'], tep_get_tax_rate($specials['products_tax_class_id'])) . '</span><br />('. $manu_result['manufacturers_name'] .')</td>' . "\n"; Hope that is of some help to you! Joe MacMan strikes again! Always backup first before listening to me! Link to comment Share on other sites More sharing options...
mariorr Posted March 9, 2009 Author Share Posted March 9, 2009 Thanks!!!!!! It's ok, this is that I need. Thanks a lot!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.