Adding product categories to shop pages

You've added dedicated pages for the shops in your marketplace. Now you want buyers to get a sense of what types of products a shop sells.

In this tutorial, you'll use the Storefront API to retrieve a list of product types from merchant storefronts. You'll display these product types as categories in a tabbed list. This way, what's available for purchase is more immediately apparent to the buyer, and that directs them more quickly to a sale. Because categories are not the same as collections, and not all merchants use product categories, the code in this tutorial provides a default.

A gif showing a shop page with products from different categories