Adding shop sort
Previously, you added the ability for buyers to search the marketplace homepage for shops where your channel app is installed. You want to give buyers a way of organizing the shops on the homepage.
In this tutorial, you'll learn how to add sort functionality for shops. You'll set up shop sort by name, but you can follow a similar structure to provide sort options by other shop attributes.
What you'll learnAnchor link to section titled "What you'll learn"
After finishing this tutorial, you'll know how to add the ability for buyers to sort shops on the marketplace homepage.
RequirementsAnchor link to section titled "Requirements"
You've completed the tutorial for adding shop search.
Add sort to the marketplace homepageAnchor link to section titled "Add sort to the marketplace homepage"
To add shop sort, your buyer-facing app needs to make a request to the Storefront API. The following requests the shop name using the
nameIsLike argument, and requests the shop's ID, domain, and a Storefront Access Token. The
reverse argument reverses the order of the shops returned.
Your marketplace homepage might now look something the following:
Learn how to add functionality for filtering shops on a marketplace.
Share feedback on Marketplace Kit.