1

I am working on a headless magento approach.

On hitting : /V1/products/:sku

I get the details of the product as the following response:

...
        "bundle_product_options": [
            {
                "option_id": 70,
                "title": "Product title",
                "required": true,
                "type": "select",
                "position": 1,
                "sku": ":sku",
                "product_links": [
                    {
                        "id": "1059",
                        "sku": ":sku",
                        "option_id": 70,
                        "qty": 1,
                        "position": 1,
                        "is_default": false,
                        "price": 0,
                        "price_type": 0,
                        "can_change_quantity": 0
                    },

           .....

I want to add the option's title in the products_links section.

I also need this for configurable products as well.

Any suggestions?

EDIT: I think I have to add a method to getTitle in the

vendor/magento/module-bundle/Api/Data/LinkInterface.php

But I don't know how to do that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.