1

I have Custom category attribute id for ex 200.

I want to get Attribute Option label from Value in magento 2 if any clue is also much appreciate.

2

You can use \Magento\Catalog\Api\CategoryAttributeOptionManagementInterface::getItems service call. For example if use this call over Rest WebApi: GET http://magento2.local/rest/V1/categories/attributes/display_mode/options you get

[
  {
    "label": "Products only",
    "value": "PRODUCTS"
  },
  {
    "label": "Static block only",
    "value": "PAGE"
  },
  {
    "label": "Static block and products",
    "value": "PRODUCTS_AND_PAGE"
  }
]

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.