Skip to content

Commit

Permalink
docs: add fetchRecommendations example
Browse files Browse the repository at this point in the history
  • Loading branch information
Gomah committed Apr 5, 2022
1 parent a38f68d commit b0fd69e
Show file tree
Hide file tree
Showing 2 changed files with 2,085 additions and 2,341 deletions.
12 changes: 12 additions & 0 deletions docs/content/en/usage/shopify-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ this.$shopify.product.fetch(productId).then((product) => {
});
```

#### Fetching product recommendations

Find recommended products related to a given productId. To learn more about how recommendations are generated, see https://shopify.dev/themes/product-merchandising/recommendations.

```ts
// Fetch recommendations for a specific product
this.$shopify.product.fetchRecommendations(productId).then((products) => {
// Do something with the products
console.log(products);
});
```

### Fetching Collections

```ts
Expand Down
Loading

1 comment on commit b0fd69e

@vercel
Copy link

@vercel vercel bot commented on b0fd69e Apr 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.