Skip to content

Commit 206b6d5

Browse files
authored
Merge branch 'master' into fix/nokogiri-install-fail
2 parents 0fafaf5 + fe01197 commit 206b6d5

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

source/includes/_recommendations.md.erb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Service provides access to product recommendations endpoint.
1111
```
1212

1313
```javascript
14-
<%= config[:js_sdk_name] %>("recommend", "1fd1b3495137bc3c9299816026acf36f", {item: 100500, exclude: [3, 14, 159, 26535], category: 146, search_query: "To be or not to be", limit: 15, brands: ["Alas", "poor", "Yorick"], categories: [1, 146, 100500]}, function(response) {
14+
<%= config[:js_sdk_name] %>("recommend", "1fd1b3495137bc3c9299816026acf36f", {item: 100500, exclude: [3, 14, 159, 26535], category: 146, search_query: "To be or not to be", limit: 15, brands: ["Alas", "poor", "Yorick"], categories: [1, 146, 100500], extended: true, with_locations:true }, function(response) {
1515
// the functionality of rendering a block of product recommendations
1616
}, function(error) {
1717
// when something went wrong
@@ -117,11 +117,9 @@ sdk.recommend(recommender_code, params)
117117
| sid | true | Temporary user session ID |
118118
| recommender_code | true | ID of product recommendations block. You get it from blocks management UI. |
119119
| resize_image | false | Image size (px) to resize. Supported: 120, 140, 160, 180, 200, 220. |
120-
| extended | false | If true, it will return all information about recommended products. If parameter with_locations is present in request and is true, location_ids column with a list of locations where product is available will be returned. If omit, it returns only products IDs. |
121-
| with_locations | false | If true and if parameter extended is in request, it will return location_ids column with a list of locations where product is available. If request doesn't have `extended` parameter, `with_locations` parameter is ignored. | |
122-
123-
### JS SDK syntax
124-
| Syntax |
120+
| extended | false | If true, it will return all information about recommended products. If parameter with_locations is present in request and is true, location_ids column with a list of locations where product is available will be returned. If omit, it returns only products IDs. Default is false. |
121+
| with_locations | false | If true and if parameter extended is in request, it will return location_ids column with a list of locations where product is available. If request doesn't have `extended` parameter, `with_locations` parameter is ignored. Default value is false. | |
122+
Syntax |
125123
|-------------------------------------------------------------------------|
126124
| <%= config[:js_sdk_name] %>("recommend", code, params, success, error); |
127125

@@ -148,6 +146,7 @@ sdk.recommend(recommender_code, params)
148146
| extended | number | optionally | Supports: `1` or empty. If `1`, it will return all information about recommended products. If omit, it returns only products IDs. |
149147
| prevent_shuffle | boolean | optionally | If true, it disables shuffling of products in the response. |
150148
| page | number | optionally | The parameter for creating pagination, by default 1. Returns the number of products based on the limit per page. |
149+
| with_locations | boolean | optionally | List of locations where product is available. Returns only if parameter extended is true. |
151150

152151
### API response
153152
| Name | Type | Description |

0 commit comments

Comments
 (0)