Shoe custom attribute on product view page

Please LogIn to Reply!

Post By: admin | 26-01-2012 06:35 Reply

 

Hello,
I’ve created a custom attribute and I can seam to display it on product view page.

The attribute code is ‘housing’ and it’s a dropdown attribute.

Use To Create Configurable Product -> yes

Visible on Product View Page on Front-end -> yes

Used in product listing -> no

I’ve added <housing /> to /app/code/core/mage/catalog/etc/config.xml under

<product>
            <
collection>
                <
attributes>

also, I have added to the catalog.xml -
<catalog_category_layered>
<reference name="content">
<block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">
<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">

<action method="addAttribute"><name>housing</name></action>

and on the product view I try to do :

$housing $_product->getAttributeText('housing');
and I get an empty string.

When I try to do -

$housing $_product->getHousing();

it brings me the right value.

Any ideas why getAttributeText(’housing’) doesn’t work?

thanks

`Reply Or Comment!
Please LogIn to Reply!