Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Created a attribute called property_status and now broken
 
gazwin
Jr. Member
 
Total Posts:  7
Joined:  2008-07-26
 

Hi Can anyone help!

I created a new attribute in the database called property_status.

I was calling it in /app/design/frontend/default/default/template/catalog/product/view/type

the file is simple.phtml

<p class="availability"><b>Property Status:
<?php echo($_product->getResource()->getAttribute('property_status')->getFrontEnd()->getValue($_product)); ?></b>
</p>

Invalid method Mage_Catalog_Block_Product_View::addAttribute(Array
(
[0] => property_status
)
)
Trace:
#0 [internal function]: Varien_Object->__call(’addAttribute’, Array)
#1 [internal function]: Mage_Catalog_Block_Product_View->addAttribute(’property_status’)
#2 /opt/lampp/htdocs/prologis/app/code/core/Mage/Core/Model/Layout.php(338): call_user_func_array(Array, Array)
#3 /opt/lampp/htdocs/prologis/app/code/core/Mage/Core/Model/Layout.php(204): Mage_Core_Model_Layout->_generateAction(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#4 /opt/lampp/htdocs/prologis/app/code/core/Mage/Core/Model/Layout.php(196): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#5 /opt/lampp/htdocs/prologis/app/code/core/Mage/Core/Model/Layout.php(200): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 /opt/lampp/htdocs/prologis/app/code/core/Mage/Core/Controller/Varien/Action.php(295): Mage_Core_Model_Layout->generateBlocks()
#7 /opt/lampp/htdocs/prologis/app/code/core/Mage/Catalog/controllers/ProductController.php(101): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#8 /opt/lampp/htdocs/prologis/app/code/core/Mage/Catalog/controllers/ProductController.php(125): Mage_Catalog_ProductController->_initProductLayout(Object(Mage_Catalog_Model_Product))
#9 /opt/lampp/htdocs/prologis/app/code/core/Mage/Core/Controller/Varien/Action.php(367): Mage_Catalog_ProductController->viewAction()
#10 /opt/lampp/htdocs/prologis/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(163): Mage_Core_Controller_Varien_Action->dispatch(’view’)
#11 /opt/lampp/htdocs/prologis/app/code/core/Mage/Core/Controller/Varien/Front.php(158): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#12 /opt/lampp/htdocs/prologis/app/Mage.php(457): Mage_Core_Controller_Varien_Front->dispatch()
#13 /opt/lampp/htdocs/prologis/index.php(52): Mage::run()
#14 {main}

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top