Imported From: http://groups.google.com/group/in-portal-bugs/browse_thread/thread/c5f623d9752037d0#
Hot category item lists is not sorted by Hits field descending. Also we should hide sorting dropdown on such type lists.
Getting issue details...
By the way all hot/top seller functionality seems to be broken. For example if I have 100 products and 50 of them were brought 5 to 10 times and other 50 were not brought at all. And I want to show all products, that were brought at least one time, then what should be that hot item threshold value in administrative console?
I set this to 1, so I thought this will give me all products with Hits value more or equals to one, but instead I got only products with maximal Hits value through all of the products. Setting threshold to 1000 resulted in showing all products no matter of it's Hits field value.
How can I get what I want? Maybe hot functionality is broken or it's just not supposed to do what I what to gain.
Hi again, anyone, please help.
How this really works, or is this on error. Please respond. It's been almost 2 weeks since last response (not counting mine of course).
First of all sorry for delay with getting back to you. Please find the logic (as we have it now) attached below:
1. Hot Items
a. We get "Threshold" from Cache table (or calculate it if empty). Cache updated every hour. b. We add "IsHot" calculated field with the following logic (MySQL operants):
IF(%1$s.'.$property_map['ClickField'].' >= '.$hot_limit.', 1, 0)
Where $property_map['ClickField'] would be "Hits" field for the Products, and $hot_limit is what we get from Cache.
c. $hot_limit is Threshold and stored in Cache as described in a) and calculated as:
$last_hot = $this->Application->ConfigValue($property_map ['MaxHotNumber']) - 1; $sql = 'SELECT '.$click_field.' FROM '.$this->Application-
Code explanation is good, but I can read that code myself. I don't understand what it does logically. For example if I have 6 products with such values of Hits field: 1, 2, 3, 3, 5, 0 and I have set that threshold to 0. In such case what products of mentioned will be shown and why (please describe in words, not in code). Same with what if I set threshold to 3.
As I've understand threshold term itself, then it should be minimal value of Hits field to count such product as "hot"/"top seller". But it works somehow different here, so please describe.
I'll try to explain verbally below:
First of all 0 is a bad example, let's take 1 as your threshold.
a. If you have your Threshold set to 1 system will take one Product with the HIGHEST Hits number (among others) and will consider that Hits number as a threshold when marking products Hot or not.
b. If you have your Threshold set to 3 system will take one product with the 3rd HIGHEST Hits number (among others) and will consider that Hits number as a threshold when marking products Hot or not.
I think there might be a better results if we GROUP BY Hits number when getting the Hits threshold in this formula:
$sql = 'SELECT '.$click_field.' FROM '.$this->Application-
If I have 5 products in database and set treshhold to 10, then it will take 10th product Hits field value and show none of the products. It's very tricky formula then. So back to my original post. Isn't top seller products the ones, that are sold at all (Hits > 0) or are sold at least in N qty (e.g. Hits > N).
What you've explained maybe is hot category item detection (items, that are viewed most), but in no case if algorithm for detecting top seller products. Also most viewed items are items, who have view count greater, then specified, not some kind related to N-th category item in database.
It looks like we have stuck with what we have. Can you please answer is what I ask really so hard to understand. I suspect, that current implementation of hot item detection stuff is a bit incorrect and don't try to explain the code for me, because it doesn't mean it is correct.
Back to my original question: isn't hot items (at least for products) supposed to display most sold products?
Looks like I have discussion with myself for now, so here is my new post:
I propose to create "QtySold" for products and update it instead of "Hits" field. Then we should use Hits field for counting how much users are visiting product detail page (as it works for link detail page for now). Then we'll create new "top_seller" value for "types" parameter (usage: <inp2:p_PrintList render_as="top_seller_element" types="top_seller" parent_cat_id="any"/>) which will list only products, that were sold at all. Default sorting for such product list will be: most sold on top with user unable to change it of course.
"Qty sold" would be also very usefull for stats :)
2010/3/27 Alexander Obuhovich <aik.b...@gmail.com>
That stats is in Hits field in database, but label is translated as "Qty Sold" on product editing general tab :)
On Sun, Mar 28, 2010 at 12:53 AM, Phil ..:: domicilis.biz ::.. <
2010/3/28 Alexander Obuhovich <aik.b...@gmail.com>
Here is the task:
Getting issue details...
On Sun, Mar 28, 2010 at 1:18 AM, Phil ..:: domicilis.biz ::.. <
I am all for your solution!
My guess we need to keep Hits as well and make appropriate changes to the Admin templates
This is exactly what I've proposed.
Powered by a free Atlassian Confluence Open Source Project License granted to In-Portal Open Source. Evaluate Confluence today.