How to Add Links to Magento Default Footer - magento

I've reviewed several tutorials on creating your own custom footer in Magento but none relating to adding links to the default footer. I am wanting to add a few links under the "Account" div of the Magento default footer. Here's what I have in app/design/frontend/rwd/default/layout/customer.xml:
<default>
<!-- Mage_Customer -->
<reference name="top.links">
<action method="addLink" translate="label title" module="customer"><label>My Account</label><url helper="customer/getAccountUrl"/><title>My Account</title><prepare/><urlParams/><position>10</position></action>
<action method="addLink" translate="label title before_text" module="customer"><label>Register</label><url helper="customer/getRegisterUrl" /><title>Register</title><prepare/><urlParams/><position>100</position><li/><a/></action>
</reference>
<reference name="footer_links2">
<action method="addLink" translate="label title" module="catalog"><label>My Account</label><url helper="customer/getAccountUrl" /><title>My Account</title></action>
<action method="addLink" translate="label title"><label>Customer Service</label><url helper="/customer-service/" /><title>Customer Service</title><prepare>true</prepare></action>
</reference>
</default>

You can use below code for add link in footer.your code is almost right but you made mistake in reference name make you sure that reference name footer_links
<reference name="footer_links">
<action method="addLink" translate="label title" module="catalog"><label>My Account</label><url helper="customer/getAccountUrl" /><title>My Account</title></action>
<action method="addLink" translate="label title"><label>Customer Service</label><url helper="/customer-service/" /><title>Customer Service</title><prepare>true</prepare></action>
</reference>

Related

Magento SIngle Column Layout for Customer Account Dashboard

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>

Magento - Change Top Link Label of existing link (login link)

The default magento template has a top link called "Login".
This is being output by the standard template customer.xml.
I did this in my local.xml, hoping to remove the current link "Login" and by readding the same link but with a different label "Login / Register"
<action method="removeLinkByUrl"><url helper="customer/getLoginUrl" /></action>
<action method="addLink" translate="label title" module="customer"><label>Log In / Register</label><url helper="customer/getLoginUrl"/><title>Log In</title><prepare/><urlParams/><position>100</position></action>
However now i have 2 links there displaying, one called "Login" and another called "Login / Register".
How can i properly change the label of a toplink in Magento?
Try this to remove
<default>
<reference name="top.links">
<action method="removeLinkByUrl">
<url helper="customer/getAccountUrl"/>
</action>
</reference>
</default>
add by this
<reference name="top.links">
<action method="addLink" translate="label title">
<label>Log In / Register</label>
<url helper="customer/getLogInUrl"/>
<prepare/>
<urlParams/>
</action>
</reference>

Magento: Add product sorting features to left column

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>

Magento 1.7.0.2 : Custom layout update adding CSS

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>

Magento - Add target to new link on toplinks

I add new link to top links using
<block type="page/template_links" name="top.links" as="topLinks">
<action method="addLink" translate="label title">
<label>Blog</label>
<url>/blog</url>
<title>Blog</title>
<prepare/>
<urlParams/>
<position>1</position>
</action>
</block>
It works properly.
I want to add target="_blank" to this link.
Is there any way to do this?
Thank you.
<block type="page/template_links" name="top.links" as="topLinks">
<action method="addLink" translate="label title">
<label>Blog</label>
<url>/blog</url>
<title>Blog</title>
<prepare/>
<urlParams/>
<position>1</position>
<aParams>
<target>_blank</target>
</aParams>
</action>
</block>
Your welcome! Feel free to have a look at the addLink() method at any time!

Resources