Cms home page is not calling on front page having 3 columns - magento

I want to show all my pages in 3 columns, But when i Changed the default cms Home page having 1 column to 3 columns then its content is not showing on front end only 3 columns structure is showing but its product page is not showing not even static data.
if anybody knows this then please help me out
thanks!

Home layout setting is managed from admin>CMS >Page .Please check admin >cms>page find home page and goes to its Design tab ,change here home page design
OR
go to you template folder create folder layout>create local.xml
frontend\your package\yourtemplate\layout\local.xml content is
<?xml version="1.0"?>
<layout version="0.1.0">
<default>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
</default>
<catalog_product_view translate="label">
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>

Related

overriding cart.phtml issue not working for notitems.phtml

Hello i working on overriding the cart.phtml and it is working fine. but the problem is that when no item left in the cart still the it showing the cart table header and footer section without any item. i want when no item is present in the cart then it will show the noitem.phtml content as it is working for default magetno functionality.
i have check many things but not working . i have update my layout.xml but not effect any thing.
My layout.xml
<layout version="0.1.0">
<checkout_cart_index>
<reference name="checkout.cart">
<action method="setTemplate"><template>itemdeletion/cart.phtml</template></action>
<action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>itemdeletion/cart/item/default.phtml</template></action>
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>itemdeletion/cart/item/default.phtml</template></action>
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>itemdeletion/cart/item/default.phtml</template></action>
</reference>
</checkout_cart_index>
</layout>
it is working for cart items but i make few more R & D and try to figure out how i can make it but i have get to add below blocks in xml
<action method="setEmptyTemplate"><value>itemdeletion/cart/noItems.phtml</value></action>
<action method="chooseTemplate"/>
but still it not working. Please help me out in this.
Thanks in advance

How do I add a new block to my layout in magento 1.9?

I have a beginner question on layouts ...After reading a lot about layouts, i am more confused than where i started. I want to add a banner block that will be displayed on my home page and a few other pages. I decided that it cannot be a part of the header.
I want to add this right below the header. I am trying to create my layout via bootstrap. I see in some themes that this is done inside the cms.xml file and i am not sure why i need to edit that. Clearly, i am confused..
Any help would be appreciated.
Go to your theme
app/design/frontend/Your-Package/Your-Theme/layout/local.xml
add below code:
<?xml version="1.0"?>
<layout version="0.1.0">
<cms_index_index>
<reference name="content">
<block type="core/template" name="banner" before="-" template="banner/banner.phtml" />
</reference>
</cms_index_index>
</layout>
add banner.phtml file to
app/design/frontend/Your-Package/Your-Theme/template/banner/banner.phtml
add your banner in above file
To add a block to any other page replace <cms_index_index> with <routname_controllername_actionname> For example, <catalog_product_view>.

Hide discount code section in cart

I am writing a Magento Extension that is trying to hide the Discount Code section on the checkout cart page. I wrote the following code to replace the current cart.phtml with my custom template.
<layout version="0.1.0">
<checkout_cart_index>
<reference name="checkout.cart">
<action method="setTemplate">
<template>company/module/cart.phtml</template>
</action>
</reference>
</checkout_cart_index>
</layout>
Everything looked good until I realized it even overwrote the template the cart page uses for an empty cart. I have tried many combinations for switch the "checkout_cart_index"
name to the reference name but I cannot get it to just replace that template. I further investigated and found in the default layout it sets the cart values here:
<reference name="content">
<block type="checkout/cart" name="checkout.cart">
<action method="setCartTemplate"><value>checkout/cart.phtml</value></action>
<action method="setEmptyTemplate"><value>checkout/cart/noItems.phtml</value></action>
I tried again using "SetCartTemplate" but I cannot get it to display yet alone behave as I am intending. Any ideas?
In your layout update
<checkout_cart_index>
<reference name="checkout.cart">
<action method="setCartTemplate"><value>path/to/your/cart.phtml</value></action>
<action method="setEmptyTemplate"><value>path/to/your/noItems.phtml</value></action>
<action method="chooseTemplate"/>
</reference>
</checkout_cart_index>
chooseTemplate will choose the right template
Try to Rewrite this core class to hide the discount code section in your cart page
Mage_Sales_Model_Quote_Address_Total_Discount

Magento set custom page title and description for sitemap pages

I am looking for a method to add custom page title and meta description to Magento defaults catalog/seo_sitemap/category/ & catalog/seo_sitemap/product/ pages.
I have done this before on the built-in contacts page by updating the contacts.xml file with:
<reference name="head">
   <action method="setDescription"><title>my description here</title></action>
<action method="setTitle"><title>My title here</title></action>
</reference>
This works absolutely fine. However, I currently do not know how I can apply this or a similar technique to the 2 pages I've outlined.
Do the same thing but apply it in the catalog.xml file. You could also set up a local.xml with the following:
<?xml version="1.0"?>
<layout version="0.1.0">
<catalog_seo_sitemap_category translate="label">
<reference name="head">
<action method="setDescription" module="catalog"><title>Custom description here</title></action>
<action method="setTitle" module="catalog"><title>Custom Site Map here</title></action>
</reference>
</catalog_seo_sitemap_category>
</layout>
You can apply the same method to catalog/seo_sitemap/product/

Magento Content below the Page

I am having trouble with Magento CE 1.7.0.2 displaying content of my custom block below the page. The block displays right on the page, but the content is copied below the page after the closing HTML tag.
The display layout plugin only shows my block referenced once, so I have no idea why this is happening. I'm using a default/custom package. Please help!!!!
My Layout, if it helps:
<?xml version="1.0"?>
<layout version="0.1.0">
<default>
<remove name="store_language" />
<remove name="store_switcher"/>
<remove name="footer_links" />
</default>
<makeorder_index_index>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
<block type="makeorder/orderblock" output="toHtml" name="orderdispaly"
template="makeorder/orderdisplay.phtml"/>
</reference>
</makeorder_index_index>
</layout>
you should remove the output="toHtml" directive from your "makeorder/orderblock" block properties. What this does is basically says to display the contents of your block as soon as it's initialized - no matter where it should be placed. So it ends up rendered after the "root" block.

Resources