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.

1 Answer 1

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" } ] 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.