2

I would like to list the most popular selling items from my Expresso Store, but I can't find the tags to retrieve those items (preferably filtered by EE category too). Any pointers in the right direction would be very much appreciated.

Thanks in advance!

Tom

4

To the best of my knowledge, there isn't a popularity tag in Store. This would require a custom query or an add-on.

Something like this

SELECT entry_id, sku, title, COUNT(*) FROM exp_store_order_items GROUP BY entry_id ORDER BY COUNT(*) DESC;

Will provide most popular items based on 'what's been ordered', but what's been viewed, popular searches, and a number of 'OTHER' variants of popular also exist.

| improve this answer | |
  • Thanks nonprofit_tech, I feared as much. This sounds like a pretty standard request though, can anyone recommend an existing add-on? – Tomtids Jan 30 '13 at 14:09
  • 1
    I'm not certain how standard it is. From info in Devot-ee[devot-ee.com/search/…, there aren't any Store plug-ins that deal with the issue. I'd assume most are satisfied with popularity based on views rather than orders. I guess it depends on how large your Store is. You can always place a feature request. But the custom query should work, just as well. – nonprofit_tech Jan 30 '13 at 15:01
  • 1
    This is the correct answer. There is no built in tag for it, though there is certainly nothing wrong with querying the database directly. I'd love to see a third party extension for this on Devot:ee, and we will also consider it for a future release. – Adrian Macneil Jan 31 '13 at 4:40
2

You can also use EE's native "track_views" channel entries parameter on your individual product's page to count the views every time that page is browsed to by any user.

Eg.

{exp:channel:entries channel="products" url_title="{segment_2}" track_views="one"}

You can read more about it here:

http://ellislab.com/expressionengine/user-guide/modules/channel/channel_entries.html#channel-entries-track-views

Then you can use it with Store's search tag like this:

{exp:store:search channel="products" category="123" orderby="view_count_one" sort="desc"}

It's just important when searching by this "popularity" count that you then obviously sort the results descending so you get the products with the highest count first.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.