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 to display manufacturer from custom core/template block? 
 
mrpunkin
Jr. Member
 
Total Posts:  12
Joined:  2008-10-24
 

I want to display a new block in my sidebar thats just the manufacturer of the product. Apparently this isn’t possible? When using a custom block with the type of core/template it won’t let me do $this->getProduct(). When using any other block type it kills other objects on the page. Can someone please help me out.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mkII
Sr. Member
 
Total Posts:  79
Joined:  2009-02-24
 

This definitely works. You should use the appropriate block type depending on what type of info you want to place in the side block. Look at the catalog.xml (<catalog_product_view> section) to see possible choices.

I was need to place the manufacturer attribute on the side block, so I used the following catalog.xml declaration:

<block type="catalog/product_view_attributes" name="product.right.manufacturer" template="catalog/product/view/rightcol.phtml" />

and yes I used $_product->getData(’manufacturer’) within the side block. Works perfectly.

If you need to display another info, not attributes, you should use another block type, one of the following:

<block type="catalog/product_view" ... />
<
block type="catalog/product_view_description" ... />
<
block type="catalog/product_view_additional" .../>
<
block type="catalog/product_view_media" .../>

and so on. Look at the catalog.xml for details.

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