I've been trying to add a static block to individual product pages, below the add to cart button, using "Product> Design> Custom Layout Update".
I've tried various versions of the code below, but without any success.
<reference name="content">
<block type="cms/block" name="wetsuits" before="product.info.addtocart">
 <action method="setBlockId"><block_id>wetsuits</block_id></action>
</block> 
</reference>
I'm using 1.9.1.0, any help is greatly appreciated.
- 
 Do you see this this block anywhere on product page? If this CMS block exists, you should see it, but not 'below add to cart' button.SeStro– SeStro2015年12月03日 20:39:18 +00:00Commented Dec 3, 2015 at 20:39
- 
 Yes, it does show on the page. But always above or below the "content" area. I did, at one time, have it working for placing special messages for certain brands, but that may have been on 1.7? However, I can't remember the old code I used then to make it work and the magento forum that used to exist is now gone, so I can't find those old posts.dawhoo– dawhoo2015年12月03日 21:01:44 +00:00Commented Dec 3, 2015 at 21:01
1 Answer 1
You should change reference name to 'product.info':
<reference name="product.info">
 <block type="cms/block" name="wetsuits" before="product.info.addtocart">
 <action method="setBlockId"><block_id>wetsuits</block_id></action>
 </block> 
</reference>
And then add to catalog/product/view.phtml file in your template this code:
<?php echo $this->getChildHtml('wetsuits'); ?>
- 
 Excellent, this works very well and doesn't show unless the item has the Layout Update code - perfect!dawhoo– dawhoo2015年12月05日 20:07:14 +00:00Commented Dec 5, 2015 at 20:07
default