discxpress Posted November 23, 2009 Share Posted November 23, 2009 Hmm, that's strange. I could see that happenning if it were loading in all of the categories/products but it is only loading six. I don't see anything wrong with the code though. Jack. There isn't anything wrong with your code, it works perfectly. Since I have a large shop, I needed to reduce the amount of queries so the pages can load faster. On a much smaller shop the code is perfect. I have over a thousand categories. There was some code that was querying the DB for each category separately. The code that was suggested to me simplifies this. Here's the suggested code for your viewing: $products_query = tep_db_query("SELECT pd.products_head_title_tag, p.products_id FROM " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c INNER JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON pd.products_id = p2c.products_id AND pd.language_id = '" . (int)$languages_id . "' INNER JOIN " . TABLE_PRODUCTS . " p ON p.products_id = p2c.products_id AND p.products_status = '1' WHERE p2c.categories_id = '" . (int)$catID . "' ORDER BY p.products_ordered LIMIT " . (int)$silo['max_links'] . ""); I was worried about losing possible buyers due to slow page loads. I imagine if I only had 25,000 products or less then the page load times would be minimal. Thanks Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.