My problem is with two functions :
<?php
private function getAttributes() {
$attributesInfo = Mage::getResourceModel('eav/entity_attribute_collection')
->setEntityTypeFilter('4')
->addSetInfo()
->getData();
$attr = array();
$currStoreViewId = Mage::app()->getStore()->getId();
foreach($attributesInfo as $attribute):
$attribute = Mage::getModel('eav/entity_attribute')->load($attribute['attribute_id']);
if (!$attribute->getIsVisibleOnFront()) continue;
$labels = $attribute->getStoreLabels();
if (isset($labels[$currStoreViewId])) $label = $labels[$currStoreViewId];
else $label = $attribute->getFrontendLabel();
$attr[ $attribute->getAttributeCode() ] = $label;
endforeach;
return $attr;
}
public function getProductAttributList($_product) {
$pid = $_product->getId();
if (empty($pid)) return false;
$attributes = $this->getAttributes();
if (count($attributes)>0) $html = '<table width="100%" cellpadding="0" cellspacing="0">';
else return false;
foreach($attributes as $attrcode => $attrlabel) {
$value = $_product->{'get'.$attrcode}();
if ($attrcode=='weight') continue;
if (empty($value)) continue;
if (is_numeric($value)) $value = $_product->getAttributeText($attrcode);
$html .= '<tr><td style="width:50%; padding:0 10px 0 0;"><strong>'.$attrlabel.'</strong>
</td><td style="padding:0; width:50%;">'.$value.'</td>';
}
return $html.'</table>';
}
?>
I still get the error : syntax error, unexpected T_PRIVATE. Can anyone help me solve this ? I have the same problem with the public function.