I have a custom function in magento, how I can do in the frontend to see the public functions values?
Function:
public function getOptionsWithValues()
{
$attributes = $item->getOptionByCode('attributes')->getValue();
if (!$attributes)
{
return null;
}
$attributes = unserialize($attributes);
$options = array();
foreach ($attributes as $attr_id => $attr_value)
{
$attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', $attr_id);
$attr_options = $attribute->getSource()->getAllOptions(false);
foreach ($attr_options as $option)
{
if ($option['value'] == $attr_value)
{
$options[$attribute->getFrontendLabel()] = $option['label'];
}
}
}
return $options;
}
Thank you