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

Adding Static Block to Product Pages Only
 
thePsycho79
Jr. Member
 
Avatar
Total Posts:  11
Joined:  2011-06-08
 

Hi,

I want to add static block showing a warranty image that will display in the top of the right hand column only for product pages.

The answer I was given in the office is that I should create the static blcok and then call out using the xml update on each product page in the backoffice. Though as the image is going to be universal across all products, this seems a bit of a bit of a long way around it.

I know that I’ll have to create the block, amend the catalog.xml file and the left column phtml. Just unsure of the required code.

Any help greatly appreciated.

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
magestore_1
Mentor
 
Avatar
Total Posts:  1015
Joined:  2009-08-07
Viet Nam
 

Hello,
To add static block to product detail page, you can follow these steps:
1. Create a static block (identify: warranty_image)
2. Open file layout/catalog.xml, go to tab <catalog_product_view> and add this code:

<reference name="right">
<
block type="cms/block" name="warranty_image" before="-">
<
action method="setBlockId"><block_id>warranty_image</block_id></action>
</
block>
</
reference>

Hope you will succeed.

 
Magento Community Magento Community
Magento Community
Magento Community
 
thePsycho79
Jr. Member
 
Avatar
Total Posts:  11
Joined:  2011-06-08
 

Worked perfectly first time. Thank you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
suchiagar
Jr. Member
 
Total Posts:  1
Joined:  2011-08-25
 

if i am using the 2-column left page layout and i want to add an image near email to a freind how will be done

 
Magento Community Magento Community
Magento Community
Magento Community
 
ixtab86
Member
 
Total Posts:  58
Joined:  2011-11-02
 

In send-to-friend form page or on product page? If product page, where is this send-to-friend functionality in your theme? In sidebar or content?

 
Magento Community Magento Community
Magento Community
Magento Community
 
MagikSwapna
Sr. Member
 
Total Posts:  97
Joined:  2010-12-14
 

Hello,

If send-to-friend functionality in sidebar then

<reference name="left">
<
block type="cms/block" name="warranty_image" before="-">
<
action method="setBlockId"><block_id>warranty_image</block_id></action>
</
block>
</
reference>
and if its in content part then
<reference name="content">
<
block type="cms/block" name="warranty_image" before="-">
<
action method="setBlockId"><block_id>warranty_image</block_id></action>
</
block>
</
reference>
Hope this will help you.
 
Magento Community Magento Community
Magento Community
Magento Community
 
dcmusicstore
Jr. Member
 
Total Posts:  18
Joined:  2012-05-08
 

This seems to be exactly what I’m after but it’s not working at the moment.

I made a block called shipping.

I found the pace to put it would be “Product Extra Info” which is just above the add to wishlist and below the price.

I added:

<reference name="Product Extra Info">
<block type="cms/block" name="shipping" before="-">
<action method="setBlockId"><block_id>shipping</block_id></action>
</block>
</reference>

I’m not certain where in the code it is to be placed though. You mentioned a catalog_product tab but I don’t see tabs. I added it around line 180 which starts like this:

<catalog_product_view translate="label">
<label>Catalog Product View (Any)</label>
<!-- Mage_Catalog -->
<reference name="Product Extra Info">
<block type="cms/block" name="shipping" before="-">
<action method="setBlockId"><block_id>shipping</block_id></action>
</block>
</reference>

I appreciate the help, thank you.

Dave

 
Magento Community Magento Community
Magento Community
Magento Community
 
j8990
Jr. Member
 
Total Posts:  1
Joined:  2013-06-08
 

<reference name=\"right\">
<block type=\"cms/block\" name=\"warranty_image\" before=\"-\">
<action method=\"setBlockId\"><block_id>warranty_image</block_id></action>
</block>
</reference>

thank you magestore for this.

code works, thanks for this!
i was having the same problem and wanted to get the warranty image on the top of my product image.
_____________________________________________________________________________________________________________

green bean coffee pills
taking green coffee extract . are you doing it right?

 
Magento Community Magento Community
Magento Community
Magento Community
 
dinagross
Jr. Member
 
Total Posts:  1
Joined:  2013-06-08
 

Its working
Thanks
___________________
Geld verdienen

 
Magento Community Magento Community
Magento Community
Magento Community
 
dcmusicstore
Jr. Member
 
Total Posts:  18
Joined:  2012-05-08
 

According to: http://www.magentocommerce.com/knowledge-base/entry/product-detail-block-references

the block location I want is: Product Extra Info

Any idea what I could be doing wrong? I appreciate any help on this.

Dave

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