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

How do I display a specific $_additional data value on the Product Listing? 
 
NickL
Sr. Member
 
Avatar
Total Posts:  188
Joined:  2007-08-31
 

Team Magento,

Is it possible to output a specific “additional” data value for a product?  Here’’s the scenario:

I’d like to display the products SKU and “Designer” attribute on the Catalog listing page.

I’m thinking this can be done with a helper. So i looked at product view.phtml to see how it outputs it.  Here’s what I found:

<?foreach ($_additional as $_data):?>

and

<?foreach ($_additional as $_data):?>
            
<tr>
                <
td class="label"><?=$_data['label']?></td>
                <
td class="data"><?=$_data['value']?></td>
            </
tr>
            
<?endforeach;?>

So for each $_additional value it prints it as a Table row. But how can I call a specific _additional attribute? Like the designer attribute I’ve set up (by id). and Also the SKU. The sku is a system attribute right?

Any help would be useful. Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Here’s a wiki article on how to add attributes to product listing:
http://www.magentocommerce.com/wiki/how-to/add-attributes-to-product-grid

 
Magento Community Magento Community
Magento Community
Magento Community
 
NickL
Sr. Member
 
Avatar
Total Posts:  188
Joined:  2007-08-31
 

Thanks so Much Moshe. I’ll check this out now.

Also… as you mentioned. Can you show 1 or 2 examples of using the new <block template> actions?  You mentioned being able to change layout for a product or category. Yes?

 
Magento Community Magento Community
Magento Community
Magento Community
 
NickL
Sr. Member
 
Avatar
Total Posts:  188
Joined:  2007-08-31
 

Great Wiki Article… but I’m having trouble printing out an attribute that is of the “Dropdown” (select) Type? It returns an integer value. I DO realize all Dropdowns save their values as Integers in the DB. But is there anyway to print out the Label name instead?  Maybe?

Great work, I love this method so far, let me know if anyone has any ideas.

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