From d149165ed9110f174a3aec94fc82797195d3d6b4 Mon Sep 17 00:00:00 2001 From: Rakesh Jesadiya Date: Fri, 4 Dec 2020 18:49:57 +0530 Subject: [PATCH 1/3] Update customizable-option-interface.md Added Example of the custom option type CustomizableFieldOption for the text field. --- .../customizable-option-interface.md | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/src/guides/v2.4/graphql/interfaces/customizable-option-interface.md b/src/guides/v2.4/graphql/interfaces/customizable-option-interface.md index 5f360a898b4..9c3909b4324 100644 --- a/src/guides/v2.4/graphql/interfaces/customizable-option-interface.md +++ b/src/guides/v2.4/graphql/interfaces/customizable-option-interface.md @@ -236,6 +236,15 @@ The following query returns information about the customizable options configure sort_order option_id } + ... on CustomizableFieldOption { + textField: value { + uid + sku + price + price_type + max_characters + } + } } } } @@ -268,3 +277,74 @@ The following query returns information about the customizable options configure } } ``` + +The following query returns information about the customizable options configured for the product with a `sku` of `xyz` with Custom Option type Text Field. +- Custom option Option Type is text field with required field. +- Option Title is Favorite Color. +- Price is $5, Price Type is Fixed, Option SKU favoriteColorSku and Max. Characters is 20. + +**Request:** + +```graphql +{ + products(filter: { sku: { eq: "xyz" } }) { + items { + id + name + sku + __typename + ... on CustomizableProductInterface { + options { + title + required + sort_order + option_id + ... on CustomizableFieldOption { + value { + uid + sku + price + price_type + max_characters + } + } + } + } + } + } +} +``` + +**Response:** + +```json +{ + "data": { + "products": { + "items": [ + { + "id": 10, + "name": "Savvy Shoulder Tote", + "sku": "24-WB05", + "__typename": "SimpleProduct", + "options": [ + { + "title": "Favorite Color", + "required": true, + "sort_order": 2, + "option_id": 2, + "value": { + "uid": "Y3VzdG9tLW9wdGlvbi8y", + "sku": "favoriteColorSku", + "price": 5, + "price_type": "FIXED", + "max_characters": 20 + } + } + ] + } + ] + } + } +} +``` From 6f9cf49371c1f9eec9de58914201406b3cc2bd80 Mon Sep 17 00:00:00 2001 From: Rakesh Jesadiya Date: Mon, 7 Dec 2020 10:58:07 +0530 Subject: [PATCH 2/3] Update customizable-option-interface.md --- .../interfaces/customizable-option-interface.md | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/guides/v2.4/graphql/interfaces/customizable-option-interface.md b/src/guides/v2.4/graphql/interfaces/customizable-option-interface.md index 9c3909b4324..0accb231f05 100644 --- a/src/guides/v2.4/graphql/interfaces/customizable-option-interface.md +++ b/src/guides/v2.4/graphql/interfaces/customizable-option-interface.md @@ -236,15 +236,6 @@ The following query returns information about the customizable options configure sort_order option_id } - ... on CustomizableFieldOption { - textField: value { - uid - sku - price - price_type - max_characters - } - } } } } @@ -279,9 +270,10 @@ The following query returns information about the customizable options configure ``` The following query returns information about the customizable options configured for the product with a `sku` of `xyz` with Custom Option type Text Field. + - Custom option Option Type is text field with required field. -- Option Title is Favorite Color. -- Price is $5, Price Type is Fixed, Option SKU favoriteColorSku and Max. Characters is 20. +- Option Title is `Favorite Color`. +- Price is `$5`, Price Type is `Fixed`, Option SKU is `favoriteColorSku` and Max. Characters is `20`. **Request:** From 6c9e7a1f120faa84508be4d53f0f1ed347fc16b5 Mon Sep 17 00:00:00 2001 From: Rakesh Jesadiya Date: Mon, 7 Dec 2020 15:21:00 +0530 Subject: [PATCH 3/3] Update customizable-option-interface.md --- .../graphql/interfaces/customizable-option-interface.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/guides/v2.4/graphql/interfaces/customizable-option-interface.md b/src/guides/v2.4/graphql/interfaces/customizable-option-interface.md index 0accb231f05..f9515084fd1 100644 --- a/src/guides/v2.4/graphql/interfaces/customizable-option-interface.md +++ b/src/guides/v2.4/graphql/interfaces/customizable-option-interface.md @@ -271,9 +271,9 @@ The following query returns information about the customizable options configure The following query returns information about the customizable options configured for the product with a `sku` of `xyz` with Custom Option type Text Field. -- Custom option Option Type is text field with required field. -- Option Title is `Favorite Color`. -- Price is `$5`, Price Type is `Fixed`, Option SKU is `favoriteColorSku` and Max. Characters is `20`. +* Custom option Option Type is text field with required field. +* Option Title is `Favorite Color`. +* Price is `$5`, Price Type is `Fixed`, Option SKU is `favoriteColorSku` and Max. Characters is `20`. **Request:**