0

I have found a lot of posts asking this question but I haven't found any answers that work for my website.

I would like to remove the "ACCOUNT" link at the top-right corner of the page. I am running Magento 1.9.2.1 and using the RWD theme.

I have tried removing the link in a local.xml file:


<default>
     <reference name="top.links">
         <action method="removeLinkByUrl"><url helper="customer/getAccountUrl"/></action>
     </reference> 
</default>

I have tried disabling all the modules that Amit recommends here: How to remove ACCOUNT and CART from website?

I'm able to change the wording by using the Translate Inline tool but I can't remove it entirely (unless I switch to the default theme, it's not displayed then).

Furthermore, all the files I've gone through that add the link say "My Account" and in my website it says "ACCOUNT" so this leads me to believe I'm not editing the correct files.

How do I remove the link?

5
  • Try turning on the template hints under System > Configuration > Developer to see in what file the link is outputted. Also, are you using a custom or purchased template? Commented Sep 15, 2015 at 19:27
  • Template hints aren't available in this version of Magento. The RWD theme came with the magento installation files. Commented Sep 15, 2015 at 19:42
  • Template hints are standard in Magento 1.9, you do have to switch the scope of the system configuration setting to a website in the left top dropdown. You're working on a clean RWD theme? Commented Sep 15, 2015 at 19:44
  • You are my hero!!! I completely forgot that I had to choose a website before the Template Hints would be an option to enable. Thank you so much! Once the template hints were on, I discovered that I needed to edit the header.phtml file. Thank you, thank you! Commented Sep 15, 2015 at 19:57
  • Haha glad I could help. good to hear you resolved it Commented Sep 15, 2015 at 19:58

2 Answers 2

1

Go to the following path

app\design\frontend\rwd\default\template\page\html\header.phtml

Find the following code

            <div class="account-cart-wrapper">
            <a href="<?php echo $this->helper('customer')->getAccountUrl(); ?>" data-target-element="#header-account" class="skip-link skip-account">
                <span class="icon"></span>
                <span class="label"><?php echo $this->__('Account'); ?></span>
            </a>

Now commenting the following lines

<!--  <a href="<?php echo $this->helper('customer')->getAccountUrl(); ?>" data-target-element="#header-account" class="skip-link skip-account">
                <span class="icon"></span>
                <span class="label"><?php echo $this->__('Account'); ?></span>
            </a> -->

This is working perfectly for me

Let me know if you have any query

Thanks

2
  • Yes! This works perfectly! Thank you so much Commented Sep 15, 2015 at 19:57
  • you welcome cheer Commented Sep 15, 2015 at 20:00
0

What do you want to remove..."My Account" or the complete "Account" menu ? Removing the complete menu can be done with 'removeblock' like:

<reference name="the.parent.name.where.the.block.is.nested.in">
   <remove name="name.in.layout.not.blockclassname"/>
</reference>

Best to do this in your own layout.xml file.

Or if you want to remove just one link, like this one:

<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>
    </reference>
</default>

But you have to understand the fall back pattern of Magento. I'm using a theme called RDW now. So i have to change this to customize the RDW theme. So, if RDW has this in one of his xml layout files, changing the underlaying theme file 'base/default' for example doesn't work. Because it will use the RDW folder, assuming you didn't create your own fall-back order.

If you put this just as an example in: {app/design/frontend/{package}/{theme}/layout/customer.xml}

<default>
  <reference name="top.links">
    <!-- line 162: Mage_Page_Block_Template_Links -->
    <action method="removeLinkByUrl">
      <!-- line 312: Mage_Customer_Helper_Data -->
      <url helper="customer/getAccountUrl"/>
    </action>
  </reference> 
</default>

The link will be removed, but it's a bad practis to change core files. So you create your own layout xml file and register it in a config.xml or better, create your own 'theme' on top of the previous one. So, it's easier to undo it.

But you have to re-ask a DESIGNER... or read the (designer) manual.

Good luck and happy hacking....

(Ps: Don't forget to flush layout & block cache. And never CHANGE MAGENTO CORE FILES. Doesn't matter if the sollution works. If you don't know always read the manual. Most awnsers on the internet including this forum can bite you in the future :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.