I have a custom
product collection and products inside this collection has variety of colors. I want to retrieve all the colors available inside this
product collection and store it in array.
$layer = $this->getLayer(); $productCollection = $layer->getProductCollection(); $productCollection->addAttributeToFilter( 'entity_id', ['in' => $querydata->getData()] );
Is there a way to do this?