Jump to content

"Popular products" box, doesnt seem to use the "popularity


Chargin
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...