I am exporting related images data from CWS Extensions extension and I am getting an error by this line.
public function getConfigurableAttributesAsArray($product = null)
{
$res = array();
foreach ($this->getConfigurableAttributes($product) as $attribute) {
$res[] = array(
'id' => $attribute->getId(),
'label' => $attribute->getLabel(),
'use_default' => $attribute->getUseDefault(),
'position' => $attribute->getPosition(),
'values' => $attribute->getPrices() ? $attribute->getPrices() : array(),
'attribute_id' => $attribute->getProductAttribute()->getId(), // i am getting error in this line
'attribute_code' => $attribute->getProductAttribute()->getAttributeCode(),
'frontend_label' => $attribute->getProductAttribute()->getFrontend()->getLabel(),
'store_label' => $attribute->getProductAttribute()->getStoreLabel(),
);
}
return $res;
}