nicedeals Posted October 12, 2007 Share Posted October 12, 2007 My best sellers box shows the best selling items list but when you click on individual items, it says item not found. This is my best sellers file. can anyone help please? <?php /* $Id: best_sellers.php,v 1.21 2003/06/09 22:07:52 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ if (isset($current_category_id) && ($current_category_id > 0)) { $best_sellers_query = tep_db_query("select distinct p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and '" . (int)$current_category_id . "' in (c.categories_id, c.parent_id) order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS); } else { $best_sellers_query = tep_db_query("select distinct p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS); } if (tep_db_num_rows($best_sellers_query) >= MIN_DISPLAY_BESTSELLERS) { ?> <!-- best_sellers //--> <tr> <td><?php echo tep_image(DIR_WS_IMAGES . 'theme/best_sellers_top.jpg'); ?></td> </tr> <tr> <td background="images/theme/infobox_back_rg.jpg" align="center" width="182"> <table width="80%" cellpadding="0" cellspacing="0"> <tr> <td colspan="2" height="10"></td> </tr> <?php $rows = 0; while ($best_sellers = tep_db_fetch_array($best_sellers_query)) { $rows++; echo '<tr><td class="infoBoxContents7" valign="top">' . tep_row_number_format($rows) . '.</td><td class="infoBoxContents7"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id']) . '">' . $best_sellers['products_name'] . '</a></td></tr>'; } ?> </table></td> </tr> <tr> <td><?php echo tep_image(DIR_WS_IMAGES . 'theme/infobox_footer_right.jpg'); ?></td> </tr> <tr> <td><?php echo tep_image(DIR_WS_IMAGES . 'theme/infobox_spacer.jpg'); ?></td> </tr> <!-- best_sellers_eof //--> <?php } ?> Link to comment Share on other sites More sharing options...
Nullachtfuffzehn Posted October 12, 2007 Share Posted October 12, 2007 What does the generated link to the products page look like? Link to comment Share on other sites More sharing options...
Guest Posted October 12, 2007 Share Posted October 12, 2007 What does the generated link to the products page look like? And, do your category links work? Link to comment Share on other sites More sharing options...
nicedeals Posted October 12, 2007 Author Share Posted October 12, 2007 And, do your category links work? It says product not found as shown in this link. I clicked the first best seller in the list http://www.nicedeals.co.uk/product_info.ph...8fuf7mqphhtshr6 categories and other libks etc work fine. Link to comment Share on other sites More sharing options...
Nullachtfuffzehn Posted October 12, 2007 Share Posted October 12, 2007 As far as I can see there is nothing working at all. No matter where I click, either I'm directed to the front page or to product not found. Did you check if there was any update on PHP/MySQL lately? Link to comment Share on other sites More sharing options...
nicedeals Posted October 12, 2007 Author Share Posted October 12, 2007 As far as I can see there is nothing working at all. No matter where I click, either I'm directed to the front page or to product not found. Did you check if there was any update on PHP/MySQL lately? yeh you're right. I think the host has done some updating on their server..best get them to fix it asap. thanks for responding so quickly every1 :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.