Hi
Using the mutation productSet for the creation of a product, I can define the attribute names and their values within productOptions through a JSONArray. Unfortunately, however, the order of the declared values is not maintained in the frontend.
{
"input": {
"productType": "Snowboard",
"title": "My super product",
"productOptions": [
{
"name": "Color",
"values": [
{
"name": "Black"
},
{
"name": "Yellow"
},
{
"name": "Orange"
},
{
"name": "Red"
}
]
},
{
"name": "Size",
"values": [
{
"name": "Large"
},
{
"name": "Medium"
},
{
"name": "Small"
}
]
}
],
"variants": [
{
"optionValues": [
{
"name": "Black",
"optionName": "Color"
},
{
"name": "Small",
"optionName": "Size"
}
],
"price": "6.00",
"sku": "000001"
},
{
"optionValues": [
{
"name": "Red",
"optionName": "Color"
},
{
"name": "Large",
"optionName": "Size"
}
],
"price": "4.00",
"sku": "000002"
},
{
"optionValues": [
{
"name": "Yellow",
"optionName": "Color"
},
{
"name": "Small",
"optionName": "Size"
}
],
"price": "8.00",
"sku": "000003"
},
{
"optionValues": [
{
"name": "Orange",
"optionName": "Color"
},
{
"name": "Medium",
"optionName": "Size"
}
],
"price": "9.00",
"sku": "000004"
}
],
"vendor": "My Vendor"
},
"synchronous": false
}
I tried using the mutation productOptionsReorder, which affects the backend arrangement, but not the frontend, where the order remains alphabetical.
Any ideas or advice on how to solve this issue?
All the best.