I'm trying to update a magento theme (the theme name is blank_seo), and i'm trying to change the product page default template to 3 columns. I've tried updating the app/design/frontend/default/blank_seo/layout/catalog.xml file. but so far nothing is working.
The only solution that i've found is manually changing the 'Page Layout' dropbox to 3 columns. If anyone has a simpler/quicker way of doing this (or a reason why my editing of catalog.xml doesn't work), I'd be extremely thankful!
Just looking at the code I have, I have been able to do this without any issue, which part of the catalog.xml file are you changing? It should be the <catalog_product_view> element like so:
<catalog_product_view translate="label">
<label>Catalog Product View (Any)</label>
<!-- Mage_Catalog -->
<reference name="root">
<action method="setTemplate"><template>page/1column-productview.phtml</template></action>
</reference>
....
</catalog_product_view>
I have a custom template set up in my system for the product page, as you can see.
Also, make sure you refresh your cache and check your logs to ensure you are not missing any errors.
Related
I know, confusing title..
So basically I have an custom theme. The files I'm gonna talk about it located like below :
frontend/custom/default/layout/local.xml
frontend/custom/blue/layout/generallayout.xml
In local.xml, I have added a tab like this
<action method="addTab" translate="title" module="tag"><alias>product.tags</alias><title>Product Tags</title><block>tag/product_list</block><template>tag/list.phtml</template></action>
Now I wanna remove this tab in blue/generallayout.xml. So I added :
<catalog_product_view>
<reference name="product.info.tabs">
<action method="unsetChild"><name>product.tags</name></action>
</reference>
</catalog_product_view>
The problem is, this is not working cause I think layout.xml renders after generallayout.xml. So there isnt anything to remove while in generallayout.xml. How I achieve removing the tab ?
I'm sure there isnt anything wrong with what I wrote cause I copied the second snipped to local.xml and I successfully added then removed the tab.
For reference, I couldn't resolve this with this method.
I looked at the magento's core php files and saw that 'local.xml' always renders last. No way to change it without overwriting the core files.
Order details page isn't showing any data, left bar , header , footer are present on the page. I enabled error log but there isn't error.
If I change theme to other theme, I can see details but when I change it to hellowired theme, nothing is there.
I don't understand whats wrong going on, what I'm supposing is some other person played with code or changed something which is causing this issue, and now I'm totally unable to understand where to proceed from.
Its simply complicated. Without any error how can I reach at that point in Magento where there are so many files in it with vast and complicated structure.
Any help would act as pain relief :P. Is there anyone who can suggest anything.
If it's working with default theme, that means your custom theme "helloweird" may have something wrong in the layout files.
If you are referring to the checkout page you should look in the file
app/design/frontend/helloweird/helloweird/layout/checkout.xml .
If you are referring to account order history details then you should look in the customer.xml
The path to the layout folder of your theme may differ.
You will not receive errors if the layout xml files have something wrong.
first of all you have to check checkout.xml FROM app/design/frontend/YOUR_PACKAGE/YOUR_THEME/layout
if it's contain checkout_onepage_success block if not then you have to copy these block from base
<checkout_onepage_success translate="label">
<label>One Page Checkout Success</label>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
</reference>
<reference name="content">
<block type="checkout/onepage_success" name="checkout.success" template="checkout/success.phtml"/>
</reference>
</checkout_onepage_success>
let me know if you have still problem
I wanted to change the layout of only one page, which is the category page. I edited the catalog.xml line 187 from 2-columns-right to 1-column but it edited my product page. My question is how can I edit only the category page (where shows all products within a category, see image attached)
You should never modify core files in place, and it is best practice to avoid overriding and customizing core layout files in custom themes. Rather, you should use the local.xml layout file. There is a great tutorial on layout XML customization at MageBase.com.
local.xml is being merged into the compiled layout configuration DOM last among all layout XML files, giving its directives a certain authority over others. You should try the following content:
<?xml version-"1.0"?>
<layout>
<catalog_category_view>
<reference name="root">
<action method="setTemplate">
<template>page/2columns-right.phtml</template>
</action>
</reference>
</catalog_category_view>
</layout>
Remember to clear/disable the layout XML cache while developing.
Magento's (1.5.1.0) cms_footer_links link to wishlist is incorrect: it points to the web root instead of "/wishlist". I have been able to apply a temporary fix (on wishlist.xml: the commented action was replaced by the uncommented action below it)
<reference name="top.links">
<block type="wishlist/links" name="wishlist_link"/>
<!-- <action method="addLinkBlock"><blockName>wishlist_link</blockName></action> -->
<action method="addLink" translate="label title"><label>My Wishlist</label><url>wishlist</url><title>My Wishlist</title><prepare/><urlParams/><position>20</position></action>
</reference>
Fixing it this way naturally doesnt show the number of items in the wishlist on the link. How do I go about fixing <blockName>wishlist_link</blockName> without changing the core xml responsible for it? I imagine it can be done via local.xml (this did not work), but what is the syntax for doing that?
An alternative solution would be to find the reason why it stopped working, but that can be a much more daunting task than modifying local.xml. I have been able to find other people with the exact same problem on the magento forum (1, 2), but I've given up on asking for help there...
i'm trying to achieve a layout wherein the default welcome message sits on top of the search box followed by the catalog nav similar to what they have here.
i was hoping to do this through the local.xml file. so far i have this:
<?xml version="1.0" ?>
<layout>
<default>
<!-- add the local stylesheet -->
<reference name="head">
<action method="addCss"><stylesheet>css/local.css</stylesheet></action>
</reference>
<reference name="header">
<action method="unsetChild"><alias>topSearch</alias></action>
<action method="insert"><blockName>top.search</blockName><sublingName>catalog.topnav</sublingName><after>1</after></action>
</reference>
</default>
</layout>
i was able to unset the searchbox but i couldn't make it insert before the catalog nav - nothing happens. i also tried inserting it this way
<reference name="top.nav">
<action method="insert"><blockName>top.search</blockName><sublingName>catalog.topnav</sublingName><after>1</after></action>
</reference>
but it still doesn't work. what could i be doing wrong here?
i'm getting really confused here, is this kind of approach okay to do? i checked the header.phtml and saw that i only have to switch the lines for the default welcome message and searchbox and i'm done! but i guess this would mean that i would have to make a copy
of the header.phtml to my own theme. would this be a better approach?
thanks!
Make a copy of header.phtml for your own theme. As you've seen it controls the order of output and there is no magic that can make it change otherwise - except for hacking it with javascript but that's worse...
The purpose of having different folders for each theme is to allow exactly this sort of override so use it to your advantage.