How I can get the configurable products attribute options in front end checkout cart page? I have tried with the below answer but can't get any success.
Magento 2 - How to get attribute options value of eav entity?
When I have print the echo "<pre>"; print_r($block->getOptionList()); die;
, I am getting the below array result with the label and value but not getting the color code to show as per my custom design.
Array
(
[0] => Array
(
[label] => Color
[value] => Green
)
[1] => Array
(
[label] => Size
[value] => S
)
)
Also, I have go through the admin settings like below:
Stores > Configutation > Sales > Checkout > Shopping Cart > Configurable Product Image set as Product Thumbnail Itself
It's also not working in the magento 2.
Please see the attached screenshot what I want:
Display this color code value in the frontend like the below image:
Please suggest how I can get the color code? Thanks!!!