I have magento 1.7.0.2 And a Category which iam unable to add a CSS in the Custom Layout update.
<reference name="head">
<action method="addCSS">
<type>css/ecoffice.css</type>
<stylesheet>media="all"</stylesheet>
</action>
<action method="addCss">
<stylesheet>css/ecoffice.css</stylesheet>
</action>
<action method="addItem"><type>skin_css</type><name>css/ecoffice.css</name></action>
</reference>
This is what i am using and nether works.
How can i add custom CSS to a category that hold s a static page with a widget inside?
I want this to only 1 page, not all.
If want ,i add
<catalog_category_layered>
<reference name="head">
<action method="addItem"><type>skin_css</type><name>css/ecoffice.css</name></action>
<action method="addCss"><stylesheet>css/ecoffice.css</stylesheet></action>
</reference>
</catalog_category_layered>
<catalog_category_default>
<reference name="head">
<action method="addItem"><type>skin_css</type><name>css/ecoffice.css</name></action>
<action method="addCss"><stylesheet>css/ecoffice.css</stylesheet></action>
</reference>
</catalog_category_default>
add this code in the local.xml file of your theme.
<catalog_category_default>
<reference name="head">
<action method="addCss">
<stylesheet>css/ecoffice.css</stylesheet>
</action>
</reference>
<catalog_category_default>
Related
I've installed SUPEE 6788. Then noticed that password reset page is blank when you click on the reset link in the email. Any ideas how to make the reset page to show up ?
Previously reset page use to be this
/customer/account/resetpassword/
After patch update it's
/customer/account/changeforgotten/ and it's blank
Tech description from the Patch
APPSEC-1027, Insufficient Protection of Password Reset Process
This change affects templates by adding form_key to customer registration page template/customer/form/register.phtml and similar changes to password forgotten page layout/customer.xml and template/customer/form/resetforgottenpassword.phtml. If your store includes customized registration or password forgotten template, make sure to add this key there as well..
In case after the SUPEE-6788 patch you experience «Forgot password issue», in other words the page is blank.
You have to edit customer.xml file and replace customer layout customer_account_resetpassword with customer_account_changeforgotten.
File location: app/design/frontend/theme/default/layout/customer.xml the theme name might be different for you.
Refresh your cache, and all good!
Update your app/design/frontend/%custom%/%theme%/layout/customer.xml layout file with these changes:
source: gist.github.com/Nolwennig
Find
<customer_account_resetpassword translate="label">
<label>Reset a Password</label>
<remove name="right"/>
<remove name="left"/>
<reference name="head">
<action method="setTitle" translate="title" module="customer">
<title>Reset a Password</title>
</action>
</reference>
<reference name="root">
<action method="setTemplate">
<template>page/1column.phtml</template>
</action>
<action method="setHeaderTitle" translate="title" module="customer">
<title>Reset a Password</title>
</action>
</reference>
<reference name="content">
<block type="customer/account_resetpassword" name="resetPassword" template="customer/form/resetforgottenpassword.phtml"/>
</reference>
</customer_account_resetpassword>
And Paste Below Code
<customer_account_changeforgotten translate="label">
<label>Reset a Password</label>
<remove name="right"/>
<remove name="left"/>
<reference name="head">
<action method="setTitle" translate="title" module="customer">
<title>Reset a Password</title>
</action>
</reference>
<reference name="root">
<action method="setTemplate">
<template>page/1column.phtml</template>
</action>
<action method="setHeaderTitle" translate="title" module="customer">
<title>Reset a Password</title>
</action>
</reference>
<reference name="content">
<block type="customer/account_resetpassword" name="resetPassword" template="customer/form/resetforgottenpassword.phtml"/>
</reference>
</customer_account_changeforgotten>
You have to edit customer.xml file and replace
customer_account_resetpassword translate="label" to customer_account_changeforgotten translate="label"
and block type="customer/account_resetpassword" to block type="customer/account_changeforgotten"
File location is app/design/frontend/theme/default/layout/customer.xml, the theme name might be different for you.
I am trying to convert the 2 column layout of my account pages in Magento to a 1 column layout. I do not have any need to the navigation links on the left column. I am using Magento 1.9.0.1 and have very limited programming experience.
I have been told by the theme developer that I need to customize my local.xml file.
I have also found another thread on this site - Magento set customer my account layout to one column which suggests I should be looking at the <customer_account> handle.
Is anyone able to tell me what changes I need to make to to this file? Below is what I believe to be the relevant section of the local.xml file.
Thanks!
<customer_account>
<reference name="left">
<action method="unsetChild"><name>catalog.compare.sidebar</name></action>
<action method="unsetChild"><name>cart_sidebar</name></action>
<action method="unsetChild"><name>reorder</name></action>
</reference>
</customer_account>
<customer_logged_in>
<reference name="top.links">
<action method="removeLinkByUrl"><url helper="customer/getLogoutUrl"/></action>
<action method="addLink" translate="label title" module="customer">
<label>Log Out</label>
<url helper="customer/getLogoutUrl"/>
<title>Log Out</title>
<prepare/>
<urlParams/>
<position>100</position>
<liParams/>
<aParams>class="top-link-logout"</aParams>
</action>
</reference>
<reference name="left">
<block type="sales/reorder_sidebar" name="sale.reorder.sidebar" as="reorder" template="sales/reorder/sidebar.phtml"/>
</reference>
</customer_logged_in>
<customer_logged_out>
<reference name="top.links">
<action method="removeLinkByUrl"><url helper="customer/getLoginUrl"/></action>
<action method="addLink" translate="label title" module="customer">
<label>Log In</label>
<url helper="customer/getLoginUrl"/>
<title>Log In</title>
<prepare/>
<urlParams/>
<position>100</position>
<liParams/>
<aParams>class="top-link-login"</aParams>
</action>
</reference>
</customer_logged_out>
<customer_account_edit translate="label">
<reference name="left">
<action method="unsetChild"><name>cart_sidebar</name></action>
</reference>
</customer_account_edit>
Update your local.xml file as follows.
<customer_account_index translate="label">
<label>Customer My Account Dashboard</label>
<update handle="customer_account"/>
<!-- Mage_Customer -->
<reference name="root">
<action method="setTemplate">
<template>page/1column.phtml</template>
</action>
</reference>
<reference name="my.account.wrapper">
<block type="customer/account_dashboard" name="customer_account_dashboard" template="customer/account/dashboard.phtml">
<block type="customer/account_dashboard_hello" name="customer_account_dashboard_hello" as="hello" template="customer/account/dashboard/hello.phtml"/>
<block type="core/template" name="customer_account_dashboard_top" as="top" />
<block type="customer/account_dashboard_info" name="customer_account_dashboard_info" as="info" template="customer/account/dashboard/info.phtml"/>
<block type="customer/account_dashboard_newsletter" name="customer_account_dashboard_newsletter" as="newsletter" template="customer/account/dashboard/newsletter.phtml"/>
<block type="customer/account_dashboard_address" name="customer_account_dashboard_address" as="address" template="customer/account/dashboard/address.phtml"/></block>
</reference>
</customer_account_index>
Change is
<action method="setTemplate"><template>page/1column.phtml</template></action>
Is the default left column product/category feature a widget or block... the task I'm trying to perform is adding the Sorting Features to the left column of a custom page. I checked in my theme catalog.xml but I see no reference to that column.
the custom page was built without that feature added. im trying to add it back
Look for catalogsearch.leftnav in catalogsearch.xml inside the default theme.
You should copy that layout file to your custom theme and edit it in there.
edit:
Sorry, remembered wrong.
It's been configured in the catalog.xml in default template.
If you lost the files, download your current version and look up the configuration in there.
This should be the configuration in catalog.xml that you're looking for:
<catalog_category_layered translate="label">
<label>Catalog Category (Anchor)</label>
<reference name="left">
<block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"/>
</reference>
<reference name="content">
<block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">
<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
<!-- <action method="addReviewSummaryTemplate"><type>default</type><template>review/helper/su.phtml</template></action> -->
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
<block type="page/html_pager" name="product_list_toolbar_pager"/>
<!-- The following code shows how to set your own pager increments -->
<!--
<action method="setDefaultListPerPage"><limit>4</limit></action>
<action method="setDefaultGridPerPage"><limit>3</limit></action>
<action method="addPagerLimit"><mode>list</mode><limit>2</limit></action>
<action method="addPagerLimit"><mode>list</mode><limit>4</limit></action>
<action method="addPagerLimit"><mode>list</mode><limit>6</limit></action>
<action method="addPagerLimit"><mode>list</mode><limit>8</limit></action>
<action method="addPagerLimit" translate="label"><mode>list</mode><limit>all</limit><label>All</label></action>
<action method="addPagerLimit"><mode>grid</mode><limit>3</limit></action>
<action method="addPagerLimit"><mode>grid</mode><limit>6</limit></action>
<action method="addPagerLimit"><mode>grid</mode><limit>9</limit></action>
<action method="addPagerLimit" translate="label"><mode>grid</mode><limit>all</limit><label>All</label></action>
-->
</block>
<action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
<action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
<action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
<action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
<action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
</block>
</block>
</reference>
</catalog_category_layered>
I use magento and I have my own template but on my product detail page on the left side I have compare products. How can I delete this block?
Just create local.xml file under your theme/layout/local.xml and place below code.
<layout version="0.1.0">
<default>
<!-- remove compare products -->
<remove name="catalog.compare.sidebar" />
</default>
</layout>
This block is added in layout files. You can remove this block in original files or in your extension layout.
By default this block is added in files
/app/design/frontend/base/default/layout/catalog.xml
/app/design/frontend/base/default/layout/customer.xml
1) Copy this files to your theme folder and remove strings
<block type="catalog/product_compare_sidebar" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
2) In your layout file add lines
<default>
<reference name="right">
<action method="unsetChild"><name>catalog.compare.sidebar</name></action>
</reference>
<reference name="left">
<action method="unsetChild"><name>catalog.compare.sidebar</name></action>
</reference>
</default>
<customer_account>
<reference name="left">
<action method="unsetChild"><name>catalog.compare.sidebar</name></action>
</reference>
<reference name="right">
<action method="unsetChild"><name>catalog.compare.sidebar</name></action>
</reference>
</customer_account>
To completely disable compare products functionality you can use this free extension.
Just remove the file /app/design/frontend/base/default/template/catalog/product/compare/sidebar.html or rename it.
Just remove this block from layout/catalog.xml and compare products section will be gone :
<reference name="left">
<block type="catalog/product_compare_sidebar" after="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
</reference>
Does anyone know how I can remove links from the top menu using local.xml.
In the default checkout.xml there is:
<reference name="top.links">
<block type="checkout/links" name="checkout_cart_link">
<action method="addCartLink"></action>
<action method="addCheckoutLink"></action>
</block>
</reference>
And I would like to remove the addCartLink from the top menu. One way would be just edit the checkout.xml file, but it think it would be a much better solution just to add the remove to my local.xml file, but I can't seem to get the right name to remove. If I do a
<layout>
<default>
<remove name="top.links" />
</default>
</layout>
That does remove the entire menu, but how do I remove just a single item from the menu using locale.xml?
I am using Magento 1.6
You can do this in local.xml:
<default>
<reference name="top.links">
<action method="removeLinkByUrl">
<url helper="checkout/url/getCartUrl" />
</action>
</reference>
</default>
It was also my question How can i get the full path in local.xml file
<default>
<reference name="top.links">
<block type="wishlist/links" name="wishlist_link"/>
<action method="removeLinkBlock"><blockName>wishlist_link</blockName></action>
</reference>
</default>
Add this part to your local.xml. Writing this under default will remove it from every page. So adjust it accordingly. I hope this will help you.
It should be:
<layout>
<default>
<reference name="top.links">
<reference name="checkout_cart_link">
<remove name="top-link-cart" />
</reference>
</reference>
</default>
</layout>
But you can always copy the checkout.xml in your local theme and edit it.
<default>
<reference name="top.links">
<remove name="wishlist_link"/>
</reference>
</default>
Add this part to your local.xml. That works for me. Just use "remove". That's it.
You can remove a link via layout update either
by its name | calling removeLinkBlock($blockName)
by its url | calling removeLinkByUrl($url)
overwriting the file were it was added
The functions live in Mage_Page_Block_Template_Links
Option 1
The removeLinkByUrl() function needs an url as parameter which will usually provided by a helper function in the respective extension. Just grab it there and you can use something like
<reference name="top.links">
<action method="removeLinkByUrl"><url helper="customer/getRegisterUrl"/></action>
</reference>
In above case customer is the extensions name while getRegisterUrl is the function in the helper class.
If your extension isn't providing any function which is returning a link you can try following
<reference name="top.links">
<action method="removeLinkByUrl"><url>ADD_THE_DYNAMIC_LINK_HERE</url></action>
</reference>
Option 2
If the link was added with a name, like
<reference name="top.links">
<block type="wishlist/links" name="wishlist_link" />
<action method="addLinkBlock"><blockName>wishlist_link</blockName></action>
</reference>
you can just use
<reference name="top.links">
<remove name="wishlist_link"/>
</reference>
or
<default>
<reference name="top.links">
<block type="wishlist/links" name="wishlist_link"/>
<action method="removeLinkBlock"><blockName>wishlist_link</blockName></action>
</reference>
</default>
Option 3
If your link wasn't added with a name and a hardcoded url doesn't work for some reason you can just go ahead and copy the modules layout.xml to your custom theme folder and remove the lines where the link was added.
Hi This removes both the cart and checkout links from top.links in 1.9.3
<reference name="top.links">
<action method="removeLinkByUrl">
<url helper="checkout/url/getCartUrl" />
</action>
<action method="removeLinkByUrl">
<url helper="checkout/url/getCheckoutUrl" />
</action>
</reference>
based on the best accepted answer above but just in case anyone wants to remove both