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

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>

Related

SUPEE 6788 and Password Reset (blank page)

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.

Change Header TEXT Links for IMAGE LINKS (for 'My Wishlist')

I am using Magento 1.8.1, and I couldn't find any solution to replace the text link 'My Wishlist' for icons/image links for my Mobile responsive version.
This post is following one of my previous post that you can see in the following link
However the code provided for the Wishlist is not working when I do the change in my Layout.xml with either the following one:
<customer_account>
<reference name="customer_account_navigation">
<action method="removeLinkBlock"><blockName>wishlist_link</blockName></action>
<action method="addLink" translate="label" module="wishlist" ifconfig="wishlist/general/active">
<name>wishlist</name>
<path>wishlist/</path>
<label></label>
<aParams>class="top-link-wishlist"</aParams>
</action>
</reference>
</customer_account>
or the following one:
<layout>
...
<reference name="top.links">
<action method="removeLinkBlock"><blockName>wishlist_link</blockName></action>
<action method="addLinkBlock"><blockName>wishlist_link</blockName><aParams>class="top-link-wishlist"</aParams></action>
</reference>
</layout>
So my question is where is my mistake?

How to Add Links to Magento Default Footer

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>

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 :Password reset link is not working

i am trying to reset my test customer account password for my store, when i click on forgot password link it is asking me for a email address when i enter a valid email address it says the password reset link is sent to your mail & it is forwarding me a link in email when i click on the link it is displaying an error Fatal error: Call to a member function setCustomerId() on a non-object in /var/www/websites/jivity/app/code/core/Mage/Customer/controllers/AccountController.php on line 587 , How can i fix this error?? & Thanx in advance.
Just fixed the same problem on an upgraded 1.6.1.0 site - You are using an out of date customers.xml, diff your copy and app/design/frontend/base/default/layout/customer.xml to find the changes that need doing
If anyone is wondering, in the new version (1.6++) of the customer.xml file the following bit has been added:
<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>
If you are in Magento 1.9.1 Here is a solution which worked for me.
If your theme doesn’t include any specific custom config or layout settings you can safely delete your customer.xml (or just rename to customer1.xml) file located at /app/design/frontend/default/<your_theme_package>/<your_theme_name>/layout/customer.xml
If you delete this file magento will load the default config options
(with the updates) from the factory default magento theme.
/app/design/frontend/base/default/layout/customer.xml
Remember to flush / refresh your magento config via administration area, this will force the customer.xml file to be reloaded.
please add below code in your costomer.xml[app/design/frontend///layout/customer.xml] file.
<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>
It's Working
I tried the above, but didn't work. From another tip I saw, I added the same code above to the 'mageb2bextensionscustomer.xml' in the same layout folder, cleared all the cache and it works now. :-)
Always back up your files!
I found a fast way to solve the issue: I replaced the custom customer.xml used by my theme in app/design/frontend/your_theme_package/your_theme_name/layout/ with the file in app/design/frontend/base/default/layout/customer.xml.
Now it works just fine.

Resources