Skip to main content
added 2 characters in body
Source Link

My guess would be that the variable $option you're creating doesn't follow the guidelines you find in the Magento DevDoc.

Payload should be

{
  "option": {
    "attribute_id": "141",
    "label": "Size",
    "position": 0,
    "is_use_default": true,
    "values": [ // -> this is an array
      {
        "value_index": 9 // -> this is an object within an array
        "value_index": 9 
      }
    ]
  }
}

What you're creating is:

$option = [
    "option" => [
        "attribute_id"=> "63",
        "label"=> "Size",
        "values"=> [ // -> this is an object
            [
  //-> this is an object within an object
      "value_index"=> 54164121323 //-> this is an object within an"value_index"=> object54164121323 
            ] 
        ]
    ],
];

What is the response you get from http://localhost/magentoTest5/rest/V1/configurable-products/747682908/options? 200?

EDIT:

Try this instead:

$option = [
    "option" => [
        "attribute_id"=> "63",
        "label"=> "Size",
        "values"=> array(
            [
              "value_index"=> 100
            ] 
        )
    ],
];

My guess would be that the variable $option you're creating doesn't follow the guidelines you find in the Magento DevDoc.

Payload should be

{
  "option": {
    "attribute_id": "141",
    "label": "Size",
    "position": 0,
    "is_use_default": true,
    "values": [ // -> this is an array
      {
        "value_index": 9 // -> this is an object within an array
      }
    ]
  }
}

What you're creating is:

$option = [
    "option" => [
        "attribute_id"=> "63",
        "label"=> "Size",
        "values"=> [ // -> this is an object
            [
               "value_index"=> 54164121323 //-> this is an object within an object
            ] 
        ]
    ],
];

What is the response you get from http://localhost/magentoTest5/rest/V1/configurable-products/747682908/options? 200?

EDIT:

Try this instead:

$option = [
    "option" => [
        "attribute_id"=> "63",
        "label"=> "Size",
        "values"=> array(
            [
              "value_index"=> 100
            ] 
        )
    ],
];

My guess would be that the variable $option you're creating doesn't follow the guidelines you find in the Magento DevDoc.

Payload should be

{
  "option": {
    "attribute_id": "141",
    "label": "Size",
    "position": 0,
    "is_use_default": true,
    "values": [ // -> this is an array
      { // -> this is an object within an array
        "value_index": 9 
      }
    ]
  }
}

What you're creating is:

$option = [
    "option" => [
        "attribute_id"=> "63",
        "label"=> "Size",
        "values"=> [ // -> this is an object
            [ //-> this is an object within an object
              "value_index"=> 54164121323 
            ] 
        ]
    ],
];

What is the response you get from http://localhost/magentoTest5/rest/V1/configurable-products/747682908/options? 200?

EDIT:

Try this instead:

$option = [
    "option" => [
        "attribute_id"=> "63",
        "label"=> "Size",
        "values"=> array(
            [
              "value_index"=> 100
            ] 
        )
    ],
];
deleted 2 characters in body
Source Link

My guess would be that the variable $option you're creating doesn't follow the guidelines you find in the Magento DevDoc.

Payload should be

{
  "option": {
    "attribute_id": "141",
    "label": "Size",
    "position": 0,
    "is_use_default": true,
    "values": [ // -> this is an array
      {
        "value_index": 9 // -> this is an object within an array
      }
    ]
  }
}

What you're creating is:

$option = [
    "option" => [
        "attribute_id"=> "63",
        "label"=> "Size",
        "values"=> [ // -> this is an object
            [
              "value_index"=> 54164121323 //-> this is an object within an object
            ] 
        ]
    ],
];

What is the response you get from http://localhost/magentoTest5/rest/V1/configurable-products/747682908/options? 200?

EDIT:

Try this instead:

$option = [
    "option" => [
        "attribute_id"=> "63",
        "label"=> "Size",
        "values"=> array(
            [
              "value_index"=> 54164121323 //-ìì100
            ] 
        )
    ],
];

My guess would be that the variable $option you're creating doesn't follow the guidelines you find in the Magento DevDoc.

Payload should be

{
  "option": {
    "attribute_id": "141",
    "label": "Size",
    "position": 0,
    "is_use_default": true,
    "values": [ // -> this is an array
      {
        "value_index": 9 // -> this is an object within an array
      }
    ]
  }
}

What you're creating is:

$option = [
    "option" => [
        "attribute_id"=> "63",
        "label"=> "Size",
        "values"=> [ // -> this is an object
            [
              "value_index"=> 54164121323 //-> this is an object within an object
            ] 
        ]
    ],
];

What is the response you get from http://localhost/magentoTest5/rest/V1/configurable-products/747682908/options? 200?

EDIT:

Try this instead:

$option = [
    "option" => [
        "attribute_id"=> "63",
        "label"=> "Size",
        "values"=> array(
            [
              "value_index"=> 54164121323 //-ìì
            ] 
        )
    ],
];

My guess would be that the variable $option you're creating doesn't follow the guidelines you find in the Magento DevDoc.

Payload should be

{
  "option": {
    "attribute_id": "141",
    "label": "Size",
    "position": 0,
    "is_use_default": true,
    "values": [ // -> this is an array
      {
        "value_index": 9 // -> this is an object within an array
      }
    ]
  }
}

What you're creating is:

$option = [
    "option" => [
        "attribute_id"=> "63",
        "label"=> "Size",
        "values"=> [ // -> this is an object
            [
              "value_index"=> 54164121323 //-> this is an object within an object
            ] 
        ]
    ],
];

What is the response you get from http://localhost/magentoTest5/rest/V1/configurable-products/747682908/options? 200?

EDIT:

Try this instead:

$option = [
    "option" => [
        "attribute_id"=> "63",
        "label"=> "Size",
        "values"=> array(
            [
              "value_index"=> 100
            ] 
        )
    ],
];
deleted 2 characters in body
Source Link

My guess would be that the variable $option you're creating doesn't follow the guidelines you find in the Magento DevDoc.

Payload should be

{
  "option": {
    "attribute_id": "141",
    "label": "Size",
    "position": 0,
    "is_use_default": true,
    "values": [ // -> this is an array
      {
        "value_index": 9 // -> this is an object within an array
      }
    ]
  }
}

What you're creating is:

$option = [
    "option" => [
        "attribute_id"=> "63",
        "label"=> "Size",
        "values"=> [ // -> this is an object
            [
              "value_index"=> 54164121323 //-> this is an object within an object
            ] 
        ]
    ],
];

What is the response you get from http://localhost/magentoTest5/rest/V1/configurable-products/747682908/options? 200?

EDIT:

Try this instead:

$option = [
    "option" => [
        "attribute_id"=> "63",
        "label"=> "Size",
        "values"=> array([
            [
              "value_index"=> 54164121323 //-ìì
            ] 
        ])
    ],
];

My guess would be that the variable $option you're creating doesn't follow the guidelines you find in the Magento DevDoc.

Payload should be

{
  "option": {
    "attribute_id": "141",
    "label": "Size",
    "position": 0,
    "is_use_default": true,
    "values": [ // -> this is an array
      {
        "value_index": 9 // -> this is an object within an array
      }
    ]
  }
}

What you're creating is:

$option = [
    "option" => [
        "attribute_id"=> "63",
        "label"=> "Size",
        "values"=> [ // -> this is an object
            [
              "value_index"=> 54164121323 //-> this is an object within an object
            ] 
        ]
    ],
];

What is the response you get from http://localhost/magentoTest5/rest/V1/configurable-products/747682908/options? 200?

EDIT:

Try this instead:

$option = [
    "option" => [
        "attribute_id"=> "63",
        "label"=> "Size",
        "values"=> array([
            [
              "value_index"=> 54164121323 //-ìì
            ] 
        ])
    ],
];

My guess would be that the variable $option you're creating doesn't follow the guidelines you find in the Magento DevDoc.

Payload should be

{
  "option": {
    "attribute_id": "141",
    "label": "Size",
    "position": 0,
    "is_use_default": true,
    "values": [ // -> this is an array
      {
        "value_index": 9 // -> this is an object within an array
      }
    ]
  }
}

What you're creating is:

$option = [
    "option" => [
        "attribute_id"=> "63",
        "label"=> "Size",
        "values"=> [ // -> this is an object
            [
              "value_index"=> 54164121323 //-> this is an object within an object
            ] 
        ]
    ],
];

What is the response you get from http://localhost/magentoTest5/rest/V1/configurable-products/747682908/options? 200?

EDIT:

Try this instead:

$option = [
    "option" => [
        "attribute_id"=> "63",
        "label"=> "Size",
        "values"=> array(
            [
              "value_index"=> 54164121323 //-ìì
            ] 
        )
    ],
];
added 319 characters in body
Source Link
Loading
Source Link
Loading