Try the Demo

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

 Signature 

nickL ~ i build stuff
Twitter me: twitter.com/ibuildstuff
My Blog: ibuildstuff.wordpress.com

 
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

 Signature 

- I would love to change the world, but they won’t give me the source code -

 
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?

 Signature 

nickL ~ i build stuff
Twitter me: twitter.com/ibuildstuff
My Blog: ibuildstuff.wordpress.com

 
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.

 Signature 

nickL ~ i build stuff
Twitter me: twitter.com/ibuildstuff
My Blog: ibuildstuff.wordpress.com

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