rnt Posted July 9, 2003 Share Posted July 9, 2003 Hi I?m testing contribuition " Display Rondom Products w/Description". How can i put only products from one categorie or manufacturer. Thks for the help.. ----CODE--- <? $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 . "'"); $new_products_query = tep_db_query("select substring(pd.products_description, 1, 598) as products_description, p.products_id, p.products_image, p.manufacturers_id, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_status = '1' and pd.products_description != '' order by rand() DESC limit " . '5'); $new_products = tep_db_fetch_array($new_products_query); $new_products['products_name'] = tep_get_products_name($new_products['products_id']); ?> <div align="center"> <center> <table border="1" cellpadding="20" cellspacing="0" style="border-collapse: collapse" width="100%" bordercolor="#2799E2" id="AutoNumber1"> <tr> <td> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#2799E2" id="AutoNumber1"> <tr> <td> <div align="center"> <center> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber2"> <tr> <td align="center"><div align="center"> <center> <table border="0" width="100%" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1"> <tr> <td class="main"> <? echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a>'; ?></td> <td align="right"><table border="5" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111"> <tr> <td><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], 'Newest Anime', 210, 138) . '</a>'; ?></td> </tr> </table> </td> </tr> </table> </center> </div> </td> </tr> <tr> <td class="main"> <? echo $new_products['products_description'] ?> ...<a href=" <? echo tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']); ?> ">Read More</a> </td></tr></table> </center> </div> </td> </tr> </table> </td> </tr> </table> </center> </div> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.