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

Custom Attribute problems with ver 1.0
 
patriveri
Jr. Member
 
Total Posts:  30
Joined:  2008-02-23
 

Hello,

In the previous release I was able to display custom attributes in the product listing as outlined in http://www.magentocommerce.com/boards/viewthread/1610/

After upgrading to the production release this mechanism no longer works. I can not see the values in a var_dump, so it looks like using:

<action method="addAttribute"><code>vintage</code></action> in catalog.xml no longer populates the variables.

Has anyone found a workaround?

Thanks,
Patricio

 
Magento Community Magento Community
Magento Community
Magento Community
 
patriveri
Jr. Member
 
Total Posts:  30
Joined:  2008-02-23
 

Oops :( , I was looking at a page which displays a custom category. The custom attributes do show in the product listing.

 
Magento Community Magento Community
Magento Community
Magento Community
 
capple_
Jr. Member
 
Total Posts:  17
Joined:  2008-04-02
 

Hi,

I’m using Magento 1.0 and following these threads:
(Thread A) http://www.magentocommerce.com/boards/viewthread/1610/ (for product listing: list.phtml)
(Thread B) http://www.magentocommerce.com/boards/viewthread/4482 (for product viewing: view.phtml)

I added the following to app/design/frontend/default/default/template/catalog/product/view.phtml and
app/design/frontend/default/default/template/catalog/product/list.phtml

<?=$_product->getAttributeText('part_no')?>

And with the above, I’ve also modified the product_list block in catalog.xml with this: (Code Block B)

<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
   <
action method="addAttribute"><code>part_no</code></action>
</
block>

but I don’t see the custom attribute ‘part_no’ appear on both pages.

Am I missing some edits that are required in another file?

As per Thread A, I manage to show the ‘part_no’ custom attribute in list.phtml and view.phtml by using

<?=$_product->getPart_no()?>
and making the same changes in (Code Block B) to catalog.xml.

So what am I doing wrong that I can’t make $_product->getAttributeText(’part_no’) work for me in list.phtml and view.phtml?

According to Thread A, what I used to get it working isn’t something that is supposed to be for newer releases, and since 1.0 is the latest version at this time, I’ll like to change my ‘fix’ to use code that is meant for newer releases.

Thanks.

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