Chargin Posted June 9, 2011 Share Posted June 9, 2011 I want to change the items listed in the Popular products box. I thought if I used phpmyadmin and set the popularity field to say 10000 for 3 products those 3 would be shown. But no, that has no effect. So I reset all views and that made the list change, so somehow it is using this field. Is there some caching going on? Ive spent about an hour looking at the various forums, there are a LOT of topics on this, but nowhere did I find a mod or explanation for this. Any help much appreciated. Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 9, 2011 Share Posted June 9, 2011 Let's look at the decision CC makes about showing popular products: if ($config['pop_products_source']) { // true is to use count of past sales $popularProds = SELECT name, productId, COUNT(I.productId) AS total FROM order_inv, inventory, category WHERE hide != '1' AND disabled != '1' AND cat_id > 0 GROUP BY name DESC ORDER BY total DESC } else { // false is to use number of views of the product description page (aka popularity) $popularProds = SELECT name, productId FROM inventory, category WHERE cat_id > 0 AND disabled = '0' AND (cat_desc != '##HIDDEN##' OR cat_desc IS NULL) ORDER BY popularity DESC } The admin screen gives you the choice of filling this box with using the number of sales or the number of views of the product to determine what products to show in the Popular Products box. The product must be visible and be assigned to a category whose catId is higher than zero (as if a catId could be zero or be missing). (Unprocessed products imported from an external file won't show.) And there is definitely caching happening, but only from results reported from past sales. Popularity based on the count of views is not cached. Quote Link to comment Share on other sites More sharing options...
Chargin Posted June 10, 2011 Author Share Posted June 10, 2011 Well when I change the popularity field to say 10000 for a product, theres no change, that product should become the top one displayed should it not? Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 10, 2011 Share Posted June 10, 2011 It should. Just to make sure the cache isn't interferring, in the Admin, General Settings screen, Styles and Misc group, set "Use SQL Query Caching" to No. What happens now? Are any of the products you are manipulating set to Hidden or Disabled? Quote Link to comment Share on other sites More sharing options...
Chargin Posted June 10, 2011 Author Share Posted June 10, 2011 Im such an idiot, the client has hidden a bunch of products and I never checked that properly. All sorted, thanks for mentioning hidden/visible.... twice! 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.