Magento Forum

Displaying your own attributes on the front? 
 
MageParts
Guru
 
Avatar
Total Posts:  415
Joined:  2007-11-18
 

Yo, I need to display some extra attributes on the front which I’ve created myself. I knew how to do this in the older versions, though it seems something has changed and I can’t seem to figure out what.

In the older versions you could reach the vlaue of any givven attribute through product->getMyOwnAttribute(); , it seems to be a correct function still in the 1.0 version, although it doesn’t give any value back to me which is weird seeing as I’ve assigned it one.

Any help is appriciated!

 
Magento Community Magento Community
Magento Community
Magento Community
 
_henry_
Jr. Member
 
Total Posts:  14
Joined:  2008-01-08
 

hi,

I haven’t tried v1.0 for now, but have you tried something like $_your_product->getAttribute(’your_attribute’)->frontEndValue();

I write this without any code in front of me and can’t do more search for now, but this is more a hint than a reply smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageParts
Guru
 
Avatar
Total Posts:  415
Joined:  2007-11-18
 

Thanks for your answer henry, it didn’t work though. My custom attributes are not being recognized by the system so that leads to an error message, Fatal error: Call to a member function frontEndValue() on a non-object in...

Thanks anyway for your reply =)

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageParts
Guru
 
Avatar
Total Posts:  415
Joined:  2007-11-18
 

Hehe, silly me. I know I’d forgotten something :D
Thanks to cabble_ for reminding me rasberry -> http://www.magentocommerce.com/boards/viewthread/5374/

I noticed that alot of other pepole had the exact same problem so for future references I just wanna add that you should be able to use the same solution for the grid aswell as the list seeing as they use the same template and block funcitons ^_^

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