Closed
Description
Steps to reproduce
- Go to admin panel > Catalog > Products
- Create a simple product (Joust Duffle bag)
- Create a custom option for Joust Duffle Bag
- Use next graphql queries
- Create a empty cart
mutation { createEmptyCart}
Get product options information
{
products(filter: {sku: {eq: "24-MB01"}}) {
items {
uid
name
sku
__typename
... on CustomizableProductInterface {
options {
title
required
sort_order
uid
... on CustomizableFieldOption {
textField: value {
sku
price
}
}
... on CustomizableDropDownOption {
dropDown: value {
sku
price
}
}
}
}
}
}
}
Add product to cart using custom option
mutation {
addProductsToCart(
cartId: "`cart_id`"
cartItems: <
{
quantity: 1
sku: "24-MB01"
entered_options: [{
uid: "Y3VzdG9tLW9wdGlvbi8x"
value: "some content here!"
}]
}
]
) {
cart {
items {
product {
name
sku
}
... on SimpleCartItem {
customizable_options {
customizable*option*uid
label
values {
customizable*option_value*uid
value
}
}
}
quantity
}
}
user_errors {
code
message
}
}
}
Get the response returned
Actual results
currently, customizable_options are empty
{
"data": {
"addProductsToCart": {
"cart": {
"items": [
{
"product": {
"name": "Joust Duffle Bag",
"sku": "24-MB01"
},
"customizable_options": [],
"quantity": 1
}
]
},
"user_errors": []
}
}
}
Expected results
{
"data": {
"addProductsToCart": {
"cart": {
"items": [
{
"product": {
"name": "Joust Duffle Bag",
"sku": "24-MB01"
},
"customizable_options": [
{
"customizable*option*uid": "Y3VzdG9tLW9wdGlvbi8x",
"label": "option test1",
"values": [
{
"customizable*option_value*uid": "Y3VzdG9tLW9wdGlvbi8x",
"value": "some content here!"
}
]
}
],
"quantity": 1
}
]
},
"user_errors": [>
}
}
}
Metadata
Metadata
Assignees
Labels
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmedA defect with this priority could have functionality issues which are not to expectations.The issue has been reproduced on latest 2.4-develop branchAffects critical data or functionality and forces users to employ a workaround.
Type
Projects
Status
Done