how to get progmatically swatches attribute option data in magento 2.
I tried this:-
\Magento\Eav\Model\ResourceModel\Entity\Attribute\Option\CollectionFactory
$options = $this->_attrOptionCollectionFactory->create()->setAttributeFilter(
$id
)->setPositionOrder(
'asc', true
)->setStoreFilter($storeid[$i])
->load();
with this above code i only get option data, not the swatches value. Please advice.
Best Answer
You Can get all the swatches attribute option data with below code.