Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(no ticket): [external] Stencil, clarify that similar_by_views property is inactive #13

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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, [making-requests.md](https://github.com/bigcommerce/docs/blob/main/CONTRIBUTING.md).
Bobspadger marked this conversation as resolved.
Show resolved Hide resolved

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: similar_by_views is currently not enabled on the platform.
slsriehl marked this conversation as resolved.
Show resolved Hide resolved
</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)|
slsriehl marked this conversation as resolved.
Show resolved Hide resolved

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: similar_by_views is currently not enabled on the platform.
slsriehl marked this conversation as resolved.
Show resolved Hide resolved
</Callout>`
Bobspadger marked this conversation as resolved.
Show resolved Hide resolved


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: similar_by_views is currently not enabled on the platform.
slsriehl marked this conversation as resolved.
Show resolved Hide resolved
</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
Loading