From d0d3d7c89d14e67bd7f7dbe1a7edf698ee675148 Mon Sep 17 00:00:00 2001 From: Aleksandr_Zavadkin Date: Wed, 19 Jun 2024 17:01:44 +0900 Subject: [PATCH 1/2] fix(recommendations): with_location parameter description changed Signed-off-by: Aleksandr_Zavadkin --- source/includes/_recommendations.md.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/includes/_recommendations.md.erb b/source/includes/_recommendations.md.erb index 4ae23cb..3c77ea4 100644 --- a/source/includes/_recommendations.md.erb +++ b/source/includes/_recommendations.md.erb @@ -117,8 +117,8 @@ sdk.recommend(recommender_code, params) | sid | true | Temporary user session ID | | recommender_code | true | ID of product recommendations block. You get it from blocks management UI. | | resize_image | false | Image size (px) to resize. Supported: 120, 140, 160, 180, 200, 220. | -| 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. | -| 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. | | +| extended | false | If true, it will return all information about recommended products. If false - only product IDs will be returned. Default is false. | +| with_locations | false | If true and if parameter `extended` is in request and is true, the answer will return location_ids where product is available. If request doesn't have `extended` parameter or it`s false, `with_locations` parameter is ignored. Default value is false. | | Syntax | |-------------------------------------------------------------------------| | <%= config[:js_sdk_name] %>("recommend", code, params, success, error); | @@ -146,7 +146,7 @@ Syntax | | extended | number | optionally | Supports: `1` or empty. If `1`, it will return all information about recommended products. If omit, it returns only products IDs. | | prevent_shuffle | boolean | optionally | If true, it disables shuffling of products in the response. | | page | number | optionally | The parameter for creating pagination, by default 1. Returns the number of products based on the limit per page. | -| with_locations | boolean | optionally | List of locations where product is available. Returns only if parameter extended is true. | +| with_locations | boolean | optionally | Locations where product is available. Returned only if parameter extended is in request and is true. | ### API response | Name | Type | Description | From a37118bac926024a95e6bf16f9cd97f9c16fae94 Mon Sep 17 00:00:00 2001 From: Aleksandr_Zavadkin Date: Wed, 19 Jun 2024 17:03:12 +0900 Subject: [PATCH 2/2] chore(recommendations): formatting Signed-off-by: Aleksandr_Zavadkin --- source/includes/_recommendations.md.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/includes/_recommendations.md.erb b/source/includes/_recommendations.md.erb index 3c77ea4..a23862f 100644 --- a/source/includes/_recommendations.md.erb +++ b/source/includes/_recommendations.md.erb @@ -117,8 +117,8 @@ sdk.recommend(recommender_code, params) | sid | true | Temporary user session ID | | recommender_code | true | ID of product recommendations block. You get it from blocks management UI. | | resize_image | false | Image size (px) to resize. Supported: 120, 140, 160, 180, 200, 220. | -| extended | false | If true, it will return all information about recommended products. If false - only product IDs will be returned. Default is false. | -| with_locations | false | If true and if parameter `extended` is in request and is true, the answer will return location_ids where product is available. If request doesn't have `extended` parameter or it`s false, `with_locations` parameter is ignored. Default value is false. | | +| extended | false | If true, it will return all information about recommended products. If false - only product IDs will be returned. Default is false. | +| with_locations | false | If true and if parameter `extended` is in request and is true, the answer will return location_ids where product is available. If request doesn't have `extended` parameter or it`s false, `with_locations` parameter is ignored. Default value is false. | | Syntax | |-------------------------------------------------------------------------| | <%= config[:js_sdk_name] %>("recommend", code, params, success, error); |