Skip to content

Commit

Permalink
Merge branch 'main' into DEVDOCS-5319-Channel-Metafields-Update-metaf…
Browse files Browse the repository at this point in the history
…ield-limits-from-50-to-250-across-the-board
  • Loading branch information
bc-tgomez authored Jan 8, 2024
2 parents 45687f4 + f633d0a commit 588314b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The following is a set of guidelines for contributing to BigCommerce's Developer

The easiest way to edit a file is using GitHub's web interface:

1. Navigate to the file in GitHub. For example, [making-requests.md](https://github.com/bigcommerce/dev-docs/blob/main/docs/api-docs/getting-started/making-requests.mdx).
1. Navigate to the file in GitHub. For example, [store-logs.mdx](https://github.com/bigcommerce/docs/blob/main/docs/api-docs/store-logs/store-logs.mdx).

2. Click the **pencil** icon to **Edit This File**.
3. Make the edit.
Expand All @@ -32,15 +32,15 @@ That's it! You're done.

For more complex changes, fork and edit locally:

1. Fork `bigcommerce/dev-docs`.
1. Fork `bigcommerce/docs`.

2. `git clone` the fork to your local machine.

3. Make edits on a new branch in your IDE of choice.

4. Commit and push changes to your remote repo.

5. Create a [pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) to `bigcommerce:dev-docs/main`.
5. Create a [pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) to `bigcommerce:docs/main`.


## Commit Messages
Expand Down
15 changes: 13 additions & 2 deletions docs/stencil-docs/reference-docs/front-matter-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,20 @@ product:
limit: 10 # limits similar products by views to 10
```

<Callout type="info">
NOTE: The `similar_by_views` property is not currently active.
</Callout>



| Property | Description |
|:---------|:------------|
|`product`|When filtering/limiting, products' default sorting is by order id, from lowest to highest.|
|`videos`|If `product.videos` is not defined, you will not return videos. If you define `product.videos`, the default behavior is to return all videos. If you define `product.videos.limit`, this sets the maximum number of videos returned.|
|`images`|If `product.images` is not defined, you will not return images. If `product.images` is defined, you must also define `product.images.limit`, which throttles the number of images returned. The maximum allowable value for this parameter is five images.|
|`reviews`|Boolean indicating whether to display product reviews. If `product.reviews` is present and is not explicitly set to `false`, reviews will appear. If not defined, defaults to 10 reviews. When filtering/limiting reviews, the default sorting is by review id, from lowest to highest. If a product has over 250 reviews, you can fetch the rest using the GraphQL Storefront API. See the example GraphQL query below.|
|`related_products`|Displays products that are related by name. If `limit` absent or undefined, the default behavior is to display all related products. Inserting `limit` with no integer will display 0 products.|
|`similar_by_views`|Displays products similar to those displayed in the current page context. If `limit` absent or undefined, the default is to display four products.|
|`similar_by_views`|Displays products similar to those displayed in the current page context. If `limit` absent or undefined, the default is to display four products. Currently disabled on the platform. |

Sample GraphQL query for product reviews over the limit.

Expand Down Expand Up @@ -255,7 +261,12 @@ gql: "query productById($productId: Int!) {
}
}"
```


<Callout type="info">
NOTE: The `similar_by_views` property is not currently active.
</Callout>


We suggest testing GraphQL queries using the [storefront API playground](https://developer.bigcommerce.com/graphql-playground) to refine them before adding them to your template. If your query contains double quotes `"`, replace them with single quotes `'` or escape the double-quotes `\"`. You can launch the playground from your store by going to **Settings** > **API** > **Storefront API Playground** in your store control panel.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ products:

```

<Callout type="info">
NOTE: The `similar_by_views` property is not currently active.
</Callout>

<Callout type="info">
#### Filtering for Faster Page Loads
To keep your pages lightweight, specify only the attributes you need per page. Also, use the limit key (with appropriate values) for attributes that accept it.
Expand Down

0 comments on commit 588314b

Please sign in to comment.