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

Need help for understanding blocks and layouts
 
ArminVieweg
Jr. Member
 
Total Posts:  3
Joined:  2012-07-04
 

Hello,
I’m totally new to magento and I’m desperating, while trying to modifiy the templates.

I would like to add a block, after the product description in frontend. This block will getting filled with contents from an extension (no clue how to do that, but this is another topic).

I tried this, for testing purposes:

<layout>
  <
whatever>
    <
reference name="content">
      <
action method="insert">
        <
name>cart_sidebar</name>
      </
action>
    </
reference>
  </
whatever>
  <
catalog_product_view>
    <
update handle="whatever" />
  </
catalog_product_view>
</
layout>

Now the cart will be displayed right and at the bottom of content. But how can I insert it after the product description?
I tried serveral stuff, but nothing worked.

Thanks for your help!
Armin

 
Magento Community Magento Community
Magento Community
Magento Community
 
ArminVieweg
Jr. Member
 
Total Posts:  3
Joined:  2012-07-04
 

Okay, I have this now:

<catalog_product_view>
    <
reference name="product.description">
        <
action method="setTemplate"><template>whatever/catalog/product/view/description.phtml</template></action>
    </
reference>
</
catalog_product_view>
And the product description will be replaced by the contents of this file. But the variable
$_description
, which is used in the original template, is empty. So the output keeps empty. What am I doing wrong?

And I would like to know if there is a possibility to “include” the original template file contents, so I must not copy the whole content (which would be redundant). I just want to add contents behind the description, not replace it.

Hopfully someone will answer me hmmm

 
Magento Community Magento Community
Magento Community
Magento Community
 
ArminVieweg
Jr. Member
 
Total Posts:  3
Joined:  2012-07-04
 

OK, now I’ve got the wished result:

<reference name="product.info">
            <
block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml">
                <
action method="addToParentGroup"><group>detailed_info</group></action>
            </
block>
</
reference>
But this forum was no help :(
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top