Adding product sort

Your marketplace has shop pages with shop details and product categories. You want to give buyers a way of organizing the products, in dedicated pages.

In this tutorial, you'll add sort functionality to shops. You'll set up product sort by title, price, best-selling, and creation date, but you can follow a similar structure to provide sort options by other product attributes. Refer to the Storefront API to see all supported sorting options.

A gif showing products on the shop page sorted by various properties