Description
Preconditions (*)
PHP 7.2
MySQL CE 5.6.30
Magento 2.3
Steps to reproduce (*)
1.Create a Configurable product, Set the configurable attribute and Link the simple products to the configurable product using BULK API endpoint: rest/async/bulk/V1/configurable-products/bySku/child
2. Input POST
[
{
"sku": "parentSku",
"childSku": "ChildNo1Sku"
},
{
"sku": "parentSku",
"childSku": "ChildNo2Sku"
},
{
"sku": "parentSku",
"childSku": "ChildNo3Sku"
}
]
RESPONSE:
{
"bulk_uuid": "d934bf6f-bc8f-4189-b6b9-9a85896c8641",
"request_items": [
{
"id": 0,
"data_hash": null,
"status": "accepted"
},
{
"id": 1,
"data_hash": null,
"status": "accepted"
},
{
"id": 2,
"data_hash": null,
"status": "accepted"
}
],
"errors": false
}
Expected result (*)
1.Mass update for Topic async.V1.configurable-products.sku.child.POST should be updated successfully.
Actual result (*)
- Mass update for Topic async.V1.configurable-products.sku.child.POST failed.
- On checking the status of bulk uuid response is:
{
"operations_list": [
{
"id": 298,
"status": 3,
"result_message": "The parent product doesn't have configurable product options.",
"error_code": 0
},
{
"id": 299,
"status": 3,
"result_message": "The parent product doesn't have configurable product options.",
"error_code": 0
},
{
"id": 300,
"status": 3,
"result_message": "The parent product doesn't have configurable product options.",
"error_code": 0
}
],
"user_type": 1,
"bulk_id": "d934bf6f-bc8f-4189-b6b9-9a85896c8641",
"description": "Topic async.V1.configurable-products.sku.child.POST",
"start_time": "2019-01-17 10:31:04",
"user_id": 1,
"operation_count": 3
}
3.
NOTES(*)
Please not that when i am trying to link the simple products to the configurable product with restApi endpoint magento 2.3 which is
rest/V1/configurable-products/:sku/child
##Input: {"childSku":"BDM-MLI-611041-A-BK"}
##Response: "true"
actual and expected result are similar and children get assigned to it's parents but when it comes to bulk api this is the exception which i am getting at Magento\ConfigurableProduct\Model\LinkManagement class in function addChild line no 122 - 125