Skip to content

The parent product doesn't have configurable product options. #20366

Closed
@usamahabib786

Description

@usamahabib786

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 (*)

  1. Mass update for Topic async.V1.configurable-products.sku.child.POST failed.
  2. 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.image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: AsynchronousOperationsFixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedProgress: PR CreatedIndicates that Pull Request has been created to fix issueReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions