<p>This functionality does not currently exist natively in Commerce (June 2016).</p>

<p>You could probably use a plugin like entry count (<a href="https://www.putyourlightson.net/craft-entry-count" rel="nofollow noreferrer">https://www.putyourlightson.net/craft-entry-count</a>) to achieve the most viewed (you might need to add commerce products support to that?).</p>

<p>For the best sellers, your best bet at the moment is probably to make a plugin that uses a query on the <code>craft_commerce_lineitems</code> table (along the lines of <a href="https://stackoverflow.com/questions/12235595/find-most-frequent-value-in-sql-column)...to">https://stackoverflow.com/questions/12235595/find-most-frequent-value-in-sql-column)...to</a> return a twig variable of the n most popular product objects.</p>

CC BY-SA 3.0
2016-06-23T08:45:08.270Z
2016-06-23T08:45:08.270Z
2017-05-23T12:38:53.957Z
Jeremy Daalder
<p>I´m working on a new online shop and want to show the best sellers and the most viewed products.</p>

<p>Is this possible to do with craft commerce? I guess so, since it´s a basic functionality, but I could not find how to do this in the docs.</p>

<p>thanks.
Sebastián.</p>

<plugin-craftcommerce><craft-features>
Show the best sellers and the most visited products - Craft Commerce
# Show the best sellers and the most visited products - Craft Commerce

(Asked by: username_0 on 2016-06-22)

I´m working on a new online shop and want to show the best sellers and the most viewed products.

Is this possible to do with craft commerce? I guess so, since it´s a basic functionality, but I could not find how to do this in the docs.

thanks.
username_0

**Tags:** plugin-craftcommerce, craft-features


---

## 1 answers

### Answer by username_1 on 2016-06-23. Score: 3 | Accepted answer

This functionality does not currently exist natively in Commerce (June 2016).

You could probably use a plugin like entry count (<https://www.putyourlightson.net/craft-entry-count>) to achieve the most viewed (you might need to add commerce products support to that?).

For the best sellers, your best bet at the moment is probably to make a plugin that uses a query on the `craft_commerce_lineitems` table (along the lines of <https://stackoverflow.com/questions/12235595/find-most-frequent-value-in-sql-column)...to> return a twig variable of the n most popular product objects.


---

