1

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.

asked Dec 3, 2015 at 19:38
2
  • 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. Commented 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. Commented Dec 3, 2015 at 21:01

1 Answer 1

2

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'); ?>
answered Dec 3, 2015 at 21:13
1
  • Excellent, this works very well and doesn't show unless the item has the Layout Update code - perfect! Commented Dec 5, 2015 at 20:07

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.