Adding shop policies
You've added product description pages to the marketplace, populated with details pulled from storefronts. Each page has a Buy Now button taking buyers to a shop's online checkout. However, a competitive marketplace might have multiple shops selling the same product.
You want to show store policies, which could affect a buyer's decision to purchase from one shop over another. You'll surface store policies on the product pages, because buyers might arrive at the product page without having seen the shop's page.
In this tutorial, you'll use the Storefront API's shop
object to include a store's terms of service and its refund, shipping, and privacy policies on marketplace product pages.
What you'll learn
Anchor link to section titled "What you'll learn"After you finish this tutorial, you'll know how to do the following:
- Surface shop policies on marketplace product pages
Requirements
Anchor link to section titled "Requirements"- You've completed the tutorial for adding Buy Now buttons.
Step 1: Fetch shop policies
Anchor link to section titled "Step 1: Fetch shop policies"Since the policies are available using the Storefront API, you can update the existing product query on the product details page to also fetch shop policies.
Add the shop policies to the product query.
Use the new information to add shop policies to the product page.
You might now have a set of tabs on your product page that surface the product description and shop policies.
Learn how to create marketplace-level cart and checkout functionality.
Share feedback on Marketplace Kit.