How does Mag :: Assistant work in Magento?
I tried to understand this line of code.
$_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());
1.to begin with, a variable was declared ($_attributes)
2. Mage::helper('core')
Is the helper the method that loads the object? What is it core
? file? where to find this file?
3. decorateArray
Is this method from core class
?
Could you please tell me how this code works and give me a simple example?
I tried to do this short example on my page
$_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());
<?php if($_product->isSaleable() && count($_attributes)){
echo "de vanzare";
}
?>
The condition may be evaluated as a false message and not displayed. I get no error, but it doesn't work.
I wanted to see if I understood how it works Mage::helper
(which is why I made this example)
Thanks in advance!
source to share