Guides

How to show best sellers first in Shopify collections

Updated October 10, 2026

Shopify can sort a collection by Best selling, but it counts all-time sales and can't be combined with stock or freshness. A product that sold well two years ago can still sit at the top. This guide shows how to rank collections by recent sales instead, and keep that order up to date automatically.

SortRecent Sales (30 days), weight 10, descending

Why Shopify's Best selling sort is not enough

The native Best selling sort looks at sales since the product was created. It favors old products and ignores what sells now. It also can't push out-of-stock products down, so a sold-out best seller keeps the first spot.

Set up the sort in MDPositions

Create a sort and pick the Best-sellers first preset. It contains one criterion:

  • Recent Sales, descending, weight 10.
  • Number of days: 30. MDPositions counts the orders that contain each product over this period, using Shopify sales data.

Choose the collections

Apply the sort to all collections or to a selection. MDPositions switches each collection to manual sorting and writes the new order through Shopify's API. Check the result with the Preview button before you run it.

Keep the order fresh

On the Starter plan, active sorts run automatically every 24 hours; on Pro, every 6 hours. Your collections follow your sales without manual drag and drop.

Go further

  • Add Stock Availability so sold-out best sellers move down.
  • Pin a product at the top for a campaign with Pinned products.
  • Build a dedicated Best sellers collection with a tag, then sort it with the same rule.

Frequently asked questions

Does MDPositions count units sold or orders?

Orders. A product counts once per order that contains it over the number of days you choose. One large order does not push a product to the top on its own.

How many days should I use?

30 days is a good default. Use 7 or 14 days for fast-moving catalogs or during a sale, and 60 or 90 days for products that sell rarely, so the order doesn't jump every day.

What happens to products with no sales?

They all get the same lowest score for this criterion and end up at the bottom. Add a second criterion, such as Creation Date, to rank them between themselves.