I'm working on my e-commerce website and I have some trouble with the Header.
Can someone tell me please How to remove account button and replace with simple account|login links?
I'm working on my e-commerce website and I have some trouble with the Header.
Can someone tell me please How to remove account button and replace with simple account|login links?
In case you need to apply custom template only for Top Links, you can do it like this in your theme's local.xml:
<default>
<reference name="top.links">
<action method="setTemplate">
<template>page/template/my_links.phtml</template>
</action>
</reference>
<default>
Then copy page/template/links.phtml and rename it to page/template/my_links.phtml and do whatever you need inside that new template file. For example you can add log-in & logout link add the below code:
<?php if (Mage::helper('customer')->isLoggedIn() ): ?>
<a href="<?php echo Mage::helper('customer')->getLogoutUrl(); ?>"><?php echo 'Log OUT'; ?></a>
<?php
else: ?>
<a href="<?php echo Mage::helper('customer')->getLoginUrl(); ?>">SIGN IN</a>
<?php
endif; ?>
To add a custom link to Top Links via local.xml:
<reference name="top.links">
<action method="addLink" translate="label title">
<label>My Link</label>
<url>path/to/page</url>
<title>My link tooltip</title>
<prepare>true</prepare>
<urlParams/>
<position>150</position>
<liParams>id="my-custom-id"</liParams>
</action>
</reference>