Dany M
Dany M

Reputation: 133

How to make automatic best seller collection in Shopify

I want one of my collection to show the top 20 best selling items in my store in order and I want it to update dynamically.

No idea where to start.

Upvotes: 2

Views: 16897

Answers (2)

Alice Girard
Alice Girard

Reputation: 2173

Create a collection in store admin. Add all your products inside and choose "sort by best selling" option.

Loop through this collection in code to display it by setting limit:20 parameter in your forloop opening.

Upvotes: 8

David Lazar
David Lazar

Reputation: 11427

  1. Use scripting code to query all your orders using the Shopify API
  2. For each order count the products sold
  3. Sort the result from most to least
  4. Take top 20 products and add them to a custom collection called Best Sellers

Sit back and profit!

Upvotes: 1

Related Questions