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

Can’t Access Custom Attributes
 
bannostookaylo
Jr. Member
 
Avatar
Total Posts:  13
Joined:  2013-04-04
 

I’ve been looking all over for an answer to this. I’ve been using Magento for about a week now and Im fixing a bunch of templates that we messed up. Anyway I’m at a spot now that should probably be easy but its not working. I need to access and custom attribute… this code works.

standard attribute

$_product->getName()

but this code wont.. custom attribute of “designer”

$_product->getDesigner()

the original code from the developer had this.. however this code didn’t work either lol

$_helper->productAttribute($_product$_product->getDesigner(), 'designer');

any help would be great thanks guys!

 
Magento Community Magento Community
Magento Community
Magento Community
 
kiatng
Enthusiast
 
Total Posts:  875
Joined:  2008-09-03
Kuala Lumpur, Malaysia
 

For greater efficiency, some attributes may not be loaded in the product object. Try reloading it:

$_product Mage::getModel('cayalog/product')->load($_product->getId());
$designer $_product->getDesigner();

The proper way to do this is to add the attribute to the select statement at the source. For that, you’ll need to hunt down the file and overwrite it.

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