agreements are empty with germansetup in Magento - magento

From my /checkout/onepage/ there is a popup window for the AGB: /germansetup/frontend/agreements/id/1/
Problem is that this page does not show any text. Just a background image from the template.
The popup is defined in germansetup.xml:
<germansetup_frontend_agreements>
<reference name="root">
<action method="setTemplate"><template>page/popup.phtml</template></action>
</reference>
<reference name="content">
<block type="core/text" name="agreement" />
</reference>
</germansetup_frontend_agreements>
I don't know what block he is trying to load here but I would like him to show my static block mrg_business_terms.

This appears to have changed at some point. For me (using Magento 1.9.2.4), what worked was adding 'cms/block' to the list of whitelisted blocks.

Have a look at Sales > Terms and Conditions (German: Verkäufe > Bestellbedingungen).
Here you see the list of checkout agreements. In my case I needed to change the content block id:
{{block type="cms/block" block_id="mrg_business_terms"}}

Related

Vote and Compare Blocks need to be taken out in magento

I have some troubles in /checkout/cart page with taking out two blocks:
- compare products block
- voting block
I cant remove them from right sidebar
at current layout xml
/layout/checkout.xml
There is only MY ONE adding template to right sidedar
<reference name="right">
my adding template code here
</reference>
also I have just removed all adding templates to right sidebar from
/layout/page.xml
and as a result I see these two blocks (compare and voting) at right bar anyway (
Let me know where can They be removed by me from ?
Thanks
I hope you're using local.xml to do your customizations.
In local.xml
<default>
<!--other codes-->
<remove name="catalog.compare.sidebar" />
<remove name="right.poll" />
<!--other codes-->
</default>
if need to remove from checkout - cart page only and retain on other pages then use <checkout_cart_index> handler instead of and use "unSetChild". Remember <remove> will completely remove the block.
I found out where was problem )
Magento layouts include one of this
/layout/poll.xml
and There I saw these lines
<!-- Mage_Poll -->
<reference name="right">
<block type="poll/activePoll" name="right.poll">
<action method="setPollTemplate"><template>poll/active.phtml</template><type>poll</type></action>
<action method="setPollTemplate"><template>poll/result.phtml</template><type>results</type></action>
</block>
</reference>
</default>
after commented it They disappeared )

Magento: Show two products on the product page

I would like to show two different products on the product view page. Basically, after displaying the first product like it normally would, the page should then show another product with all it's details, images and of course the "Add to Cart" button.
Both products should be fully displayed on the product view page, so I can't use any of the existing blocks like catalog/product_list_related or catalog/product_list_upsell.
My idea was to simply add another catalog/product_view block to the catalog_product_view layout definition, like so:
catalog.xml:
<layout version="0.1.0">
...
<catalog_product_view translate="label">
...
<reference name="content">
<block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
...
</block>
</reference>
...
<!-- Changes start here -->
<reference name="content">
<block type="catalog/product_view" name="product.info2" template="catalog/product/view.phtml">
<action method="setProductId"><product_id>123</product_id></action>
</block>
</reference>
</catalog_product_view>
However, this does not seem to work. Various elements of the block don't seem to load correctly, as you can see on this screenshot:
All the product images are missing as well as the price and the buttons. Also, my call to setProductId() doesn't seem to have any effect.
You can delete this catalog.xml, then magento usa base catalog.xml

Change Position of Newsletter Sidebox in Magento

Thank you for any help in advance.
I am trying to change the order in which sideboxes appear in magento. Such as the: My Cart, Newsletter, Poll, Recently Viewed Products.
Currently I am trying to make the Newsletter box display last.
In app/design/frontend/default/MY_TEMPLATE/layout/newsletter.xml
I have the following code:
<default>
<!-- Mage_Newsletter -->
<reference name="left">
<block type="newsletter/subscribe" name="newsletter" after="-" template="newsletter/subscribe.phtml" />
</reference>
</default>
Yet even with after="-" as shown in the code, the newsletter is still showing up 1st.
I have flushed all caches, and have re-indexed every time I make a change to no avail.
EDIT:
Changing
<reference name="left">
TO
<reference name="right">
Moves it to the bottom of the list. However, the column is actually on the left. Any ideas why this works?
It's all in the order of left's sortedChildren entries. Try getting rid of the custom newsletter.xml, creating a local.xml file in your custom theme, and adding the following:
<?xml version="1.0"?>
<layout>
<default>
<action method="unsetChild" block="left">
<block>left.newsletter</block>
</action>
<action method="insert" block="left">
<block>left.newsletter</block>
<sib />
<after>1</after>
</action>
</default>
</layout>
What this does is remove the block reference from the list of sorted children blocks and then adds it again at the end. Ref. Mage_Core_Block_Abstract::insert() [link].
I've employed an unused but valid block attribute for the <action /> tag rather than wrap it in <reference />. I believe the effect is the same.
Check the block names(in layout xml files) which is displaying in your left/right sidebar.
You can find something like this
<reference name="right">
<block type="catalog/product_compare_sidebar" after="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
</reference>
The above code will display cart sidebar then compare sidebar. Consider this is your last block in your sidebar. If you want to newsletter after this block you have to specify
<reference name="right">
<block type="newsletter/subscribe" name="newsletter" after="catalog.compare.sidebar" template="newsletter/subscribe.phtml" />
</reference>
You have to specify block names in after/before element tag. Find your left/right sidebars last block name and use that name in your newsletter block.

Magento Block Placement

I want to add the block section below on the product detail section
currently its above
as shown in below image
does any one knows this?
my layout is
1st for facebook comment
<reference name="product.info">
<block type="facebookcomments/catalog_product_comments" name="product.info.facebookcomments" template="facebookcomments/catalog/product/comments.phtml"/>
2nd is for facebook like
<reference name="product.info">
<block type="facebookilike/catalog_product_facebookilike" name="product.info.facebookilike" template="facebookilike/catalog/product/facebookilike.phtml"/>
still not getting this
In catalog_product_view handle of your theme/module layout:
(note i'm pseudo-coding based on the debug block names in your screenshot. I may not have the correct block/template/handles, but you get the idea)
<reference name="content">
<block type="mageplace_facebook/like_catalog_product_facebooklike"
after="product.info"
name="facebook.like.block.name"
template="path/to/facebooklike/template.phtml" />
</reference>
Check the layout xml of the Facebook Comments module, as it's obviously in the right place.

Adding image in Magento via update layout

I'm trying to figure out how to add images, etc. to the left sidebar portion of a 2 column with left sidebar page in Magento using the layout update in the cms ->page->design portion of the admin area.
Is it possible to do this from the update layout xml area? If not, could you explain how to create a module (or whatever else would be required).
Thanks.
If you look in base/default/layout/catalog.xml, you will see an example of using a template with an image placeholder that can be specified in your Update Layout XML area:
<reference name="left">
<block type="core/template" name="left.permanent.callout" template="callouts/left_col.phtml">
<action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action>
<action method="setImgAlt" translate="alt" module="catalog"><alt>Our customer service is available 24/7. Call us at (555) 555-0123.</alt></action>
<action method="setLinkUrl"><url>checkout/cart</url></action>
</block>
</reference>
So, in your Update Layout XML, you would write something like:
<reference name="left.permanent.callout"> <!-- match this to the block name from above -->
<action method="setImgSrc"><src>images/media/my_file_name.jpg</src></action>
<action method="setImgAlt" translate="alt" module="catalog"><alt>Some text here</alt></action>
<action method="setLinkUrl"><url>your/path</url></action>
</reference>
You can adapt that by taking a copy of the template file left_col.phtml and making changes as you wish.

Resources