My company have just baught Ivan's CheckItOut extension, and I'm trying to add a step in it.
Actually, I did have this step integrated into "regular" OPC.
Looking at the extension's code, I see that there is a addCheckoutStepToLayout method used in the layout checkitout.xml file. If I had this line into checkout.layout block:
<action method="addCheckoutStepToLayout"><layout>right-bottom</layout><step>points</step></action>
the step is added, but I'm trying to add it via my extension layout .xml file.
So I've tried updating the checkitout handle:
<ecomdev_checkitout_layout>
<reference name="content">
<reference name="checkout.layout">
<action method="addCheckoutStepToLayout"><layout>right-bottom</layout><step>points</step></action>
</reference>
</reference>
</ecomdev_checkitout_layout>
updating the block through regular checkout_onepage_index handle:
<checkout_onepage_index>
<reference name="content">
<reference name="checkout.layout">
<action method="addCheckoutStepToLayout"><layout>right-bottom</layout><step>points</step></action>
</reference>
</reference>
</checkout_onepage_index>
with and without <reference name="content">, but no luck until now.
I'd be glad reading your suggestions, thx
Eventually I asked the author directly, and the solution was quite simple.
The block wasn't created yet when I was trying to update it through my module's layout file: I've made it depends on Ecomdev_Checkitout and everything is working fine now.
Related
I want to delete the recently viewed products at the category view page. I have created my local.xml in public_html/app/design/frontend/base/default/layout
I have looked at several potential solutions on the internet but nothing seems to work. I use the following code at the moment:
<default><reference<reference name="right">
<remove name="right.reports.product.viewed"/> </reference> </default>
I also have tried left, but not seems to work. Could someone help me how to succeed loading local.xml? Thank you.
The above solution even if written correctly, will remove the right side reports view from all the pages (I am hoping that this needs to be removed only from CATEGORY VIEW page).
Firstly, create local.xml file in custom theme folder. I would suggest creating custom package too like below:
/app/design/frontend/customPackage/customTheme/layout/
However, since you are using BASE
/app/design/frontend/base/default/layout/local.xml
The code must be as below:
<?xml version="1.0"?>
<layout version="0.1.0">
<default>
<catalog_category_default>
<reference name="right">
<remove name="right.reports.product.viewed"/>
</reference>
</catalog_category_default>
</default>
</layout>
This will work only if the template for is set to 2columns-right.phtml
Hope this helps.
Happy Coding...
If you installed a theme try to copy local.xml file to theme's layout directory
like this "\app\design\frontend\THEME_DIR\layout\local.xml"
also you have a syntax error in your xml
it should be:
<?xml version="1.0"?>
<layout version="0.1.0">
<default>
<reference name="right">
<remove name="right.reports.product.viewed"/>
</reference>
</default>
I've copied the code from this answer but still cant change the header code, I'm only getting the standard header.phtml file.
Add custom header for Checkout pages in Magento (1.8.x)
I cant tell if magento is not reading my local.xml file (I've refreshed all caches etc) or if I'm missing something from the code. I've tried several varations of code from searches (as below) but none are working. I'm trying to do it all in local.xml, without editing other template files.
do i need to tell magento to read my new local.xml file? Should I remove the old header first?
<checkout_onepage_index>
<reference name="root">
<block type="page/html_header" name="header" as "header">
<action method="setTemplate"><template>page/html_checkout_header.phtml</template></action>
</block>
</reference>
</checkout_onepage_index>
You should use the header reference instead of defining a new block named header. This should update the existing header block by referencing it and applying the change.
<?xml version="1.0"?>
<layout version="0.1.0">
<checkout_onepage_index>
<reference name="root">
<reference name="header">
<action method="setTemplate"><template>page/html_checkout_header.phtml</template></action>
</reference>
</reference>
</checkout_onepage_index>
</layout>
Also trivial, but make sure page/html_checkout_header.phtml actually exists inside of the theme's template folder you are using.
I've made a simple custom module that places the reviews on the Product page (instead of linking to the a new page as is the default).
Everything on the Product page is working perfectly. The link on the Catalog page is not. This still links to the "review page" instead of the Product page like it should. This is because I cannot seem to trigger a layout template location change for the summary_short.phtml in my custom xml layout file.
Here is my layout file contents:
<?xml version="1.0" encoding="UTF-8"?>
<layout version="0.1.0">
<default>
<reference name="head">
<action method="addItem"><type>skin_css</type><name>css/reviews.css</name></action>
</reference>
</default>
<!-- This works great -->
<catalog_product_view>
<reference name="content">
<reference name="product.info">
...
<action method="addReviewSummaryTemplate"><type>default</type><template>productpagereviews/review/helper/summary.phtml</template></action>
<action method="addReviewSummaryTemplate"><type>short</type><template>productpagereviews/review/helper/summary_short.phtml</template></action>
</reference>
</reference>
</catalog_product_view>
<!-- Below does not work at all -->
<catalog_category_default>
<reference name="content">
<reference name="product_list">
<action method="addReviewSummaryTemplate"><type>default</type><template>productpagereviews/review/helper/summary.phtml</template></action>
<action method="addReviewSummaryTemplate"><type>short</type><template>productpagereviews/review/helper/summary_short.phtml</template></action>
</reference>
</reference>
</catalog_category_default>
</layout>
I hate answering my own question AFTER I ask it - dang it! Regardless, I'm going to post the answer so others can know if they have trouble.
It turns out I needed a different main handle. The correct one was this catalog_category_layered. I still left the "default" tag there as I'm not exactly sure why this one works and catalog_category_default doesn't. If anyone can answer that, I'd be grateful!
The complete (chunk of) code would be as below:
<catalog_category_layered>
<reference name="product_list">
<action method="addReviewSummaryTemplate"><type>short</type><template>productpagereviews/review/helper/summary_short.phtml</template></action>
</reference>
</catalog_category_layered>
Now everything works as exactly as intended! Time for some more testing....
This may help answer your question about why one worked and not the other: http://kb.magenting.com/content/13/60/en/magento-is-anchor-option-in-category-properties.html
Essentially, *catalog_category_layered* is used when you have the category option "Is Anchor" enabled.
I've updated a fresh Magento 1.5.0.1 installation to Magento 1.6.0.0, and now I've got a link in the footer, "Orders and Returns", that I can't figure (yet) how to remove that.
I can't remove it from the core files, I've tried the XML method but doesn't seems to work (probably my fault).
At the moment I can't even localize where the link is generated, as simple tests (like putting random words where the output should appear) never works.
Anyone got any suggestion or a solution about?
You could try:
<layout>
<default>
<reference name="return_link">
<!-- Set the template file to an empty string to prevent output -->
<action method="setTemplate">
<template></template>
</action>
</reference>
</default>
</layout>
Or in 1.7+:
<layout>
<default>
<reference name="footer_links">
<action method="removeLinkBlock">
<blockName>return_link</blockName>
</action>
</reference>
</default>
</layout>
Or, as mentioned by Rumble:
<layout>
<default>
<remove name="return_link" />
</default>
</layout>
One caveat about using remove element is that it would prevent the usage of that block name anywhere in the layout as it is converted into a global xpath selector.
Here the solution.
Since I needed to keep it theme related, I duplicated the layout sales.xml from app/design/frontend/base/default/layout/ to my theme layout folder (app/design/frontend/default/<name>/layout/) and commented out the <action> element from following snippet:
<default>
<reference name="footer_links">
<block type="sales/guest_links" name="return_link"/>
<action method="addLinkBlock"><blockName>return_link</blockName></action>
</reference>
</default>
Enjoy!
There's a really simple way to remove this link. Add the following to your theme's local.xml
<default>
<remove name="return_link"/>
</default>
There's a good introduction to using local.xml here.
I have my custom theme, in which I would like to make changes to the Edit Account Information Screen. I have tried to modify this file:
customer/form/edit.phtml
No change that I make to this file gets reflected. I even removed all customer/form/edit.phtml files from the base and my custom theme. Even then, the screen renders.
This is the relevant code in my customer.xml file:
<customer_account_edit translate="label">
<label>Customer Account Edit Form</label>
<update handle="customer_account"/>
<reference name="root">
<action method="setHeaderTitle" translate="title" module="customer"><title>Edit Account Info</title></action>
</reference>
<reference name="my.account.wrapper">
<block type="customer/form_edit" name="customer_edit" template="customer/form/edit.phtml"/>
</reference>
<reference name="left">
<action method="unsetChild"><name>left.permanent.callout</name></action>
</reference>
</customer_account_edit>
What am I missing?
I found what was happening. I have an extension installed which has the following code:
<customer_account_edit translate="label">
<reference name="head">
<action method="addItem"><type>js_css</type><name>calendar/calendar-win2k-1.css</name><params/></action>
<action method="addItem"><type>js</type><name>calendar/calendar.js</name></action>
<action method="addItem"><type>js</type><name>calendar/calendar-setup.js</name></action>
</reference>
<reference name="content">
<block type="core/html_calendar" name="head.calendar" as="html_calendar" template="aitcheckoutfields/js/calendar.phtml"/>
</reference>
<reference name="customer_edit">
<action method="setTemplate"><template>aitcommonfiles/design--frontend--base--default--template--customer--form--edit.phtml</template></action>
</reference>
</customer_account_edit>
I commented out this code and now my edit.phtml is being used to render the form. I still do not understand, however, which phtml file this refers to?
Aitoc sometimes uses a funky rewrite method to generate template files for their modules. I had the same issue and eventually found my .phtml file in /var/ait_patch/design/frontend/default/default/template/aitcommonfiles
When files are missing from your custom theme the template system falls back to the equivalent files in the default/base theme. Also, Magento caches this so when new files are introduced it won't notice straight away and continue using the base files instead. Make sure you turn off all caches when developing.