Magento Forum

Disable frontend account information edit in ‘My Account’
 
fransemail
Jr. Member
 
Total Posts:  9
Joined:  2008-04-28
 

Does anyone know it it is possible to disable some my account features from the frontend, for example account information edit? I want to allow customer data edit only for backend administrators.
If I disable Mage_Customer module, no my account functionality will be available.

 
Magento Community Magento Community
Magento Community
Magento Community
 
toman01
Sr. Member
 
Total Posts:  92
Joined:  2008-03-07
 

Make the following changes:

template/customer/account/dashboard/info.phtml

<div class="inner-head">
            <
h5><?php echo $this->__('Contact Information'?></h5>
            <
a href="<?php echo $this->getUrl('customer/account/edit') ?>">Edit</a>
        </
div>
        <
p>
            
<?php echo $this->htmlEscape($this->getCustomer()->getFirstname()) ?> 
            <?php 
echo $this->htmlEscape($this->getCustomer()->getLastname()) ?><br />
            
<?php echo $this->htmlEscape($this->getCustomer()->getEmail()) ?><br />
            <
a href="<?php echo $this->getChangePasswordUrl() ?>"><?php echo $this->__('Change Password'?></a>
        </
p>

Replace with:

<div class="inner-head">
            <
h5><?php echo $this->__('Contact Information'?></h5><br />
           
        </
div>
        <
p>
            
<?php echo $this->htmlEscape($this->getCustomer()->getFirstname()) ?> 
            <?php 
echo $this->htmlEscape($this->getCustomer()->getLastname()) ?><br />
            
<?php echo $this->htmlEscape($this->getCustomer()->getEmail()) ?><br />
           
        </
p>

And then open up:

layout/customer.xml

And delete the following line:

<action method="addLink" translate="label" module="customer"><name>account_edit</name><path>customer/account/edit/</path><label>Account Information</label></action>
That should do it. Let me know if you need more.
 
Magento Community Magento Community
Magento Community
Magento Community
 
fransemail
Jr. Member
 
Total Posts:  9
Joined:  2008-04-28
 

Great, thanks for your quick response! Now, with your code we deleted my account edit menu item. Is there any way to disable direct access to http://www.mysite.com/index.php/customer/account/edit ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
toman01
Sr. Member
 
Total Posts:  92
Joined:  2008-03-07
 

I’m afraid that I do not know. However, unless you have really smart customers, and even if they were smart, they would never know such a link exists.

So I would say with the current settings you are well of for your purposes.

If you really wanted to disable that you would need to change core settings which generally always get updated with newer version and thus your modification would not be permanent.

 
Magento Community Magento Community
Magento Community
Magento Community
 
fransemail
Jr. Member
 
Total Posts:  9
Joined:  2008-04-28
 

Thanks for your further explanation. I will try overwrite Customer module in order to avoid undesired account information edit.

 
Magento Community Magento Community
Magento Community
Magento Community
 
tmiller
Jr. Member
 
Total Posts:  3
Joined:  2008-05-26
 

I would like to remove several links from the My Account left navigation: specifically, My Product Reviews, My Tags, Newsletter Subscriptions, and My Wishlist. I’ve disabled all of these options in the admin. Per the instructions in the previous posts, I’ve been able to locate the Account Information, Address Book, and My Orders links… but I can’t for the life of me figure out where these other links are coming from. Can anyone help?!

 
Magento Community Magento Community
Magento Community
Magento Community
 
tmiller
Jr. Member
 
Total Posts:  3
Joined:  2008-05-26
 

Never mind!  I found the answer. These links are being called from layout/review.xml, layout/newsletter.xml, etc.
Commented them out, and presto! I’m all set.

 
Magento Community Magento Community
Magento Community
Magento Community
 
manu2008
Jr. Member
 
Total Posts:  14
Joined:  2008-05-27
 

Thanks Tmiller,

I did just that and it works fine! I dont have the links anymore n the customer account left nagigation panel...nice!
Manu

 
Magento Community Magento Community
Magento Community
Magento Community
 
nrhammond
Jr. Member
 
Total Posts:  10
Joined:  2008-08-11
 
fransemail - 21 May 2008 02:50 PM

Great, thanks for your quick response! Now, with your code we deleted my account edit menu item. Is there any way to disable direct access to http://www.mysite.com/index.php/customer/account/edit ?

The only way I found so far to redirect the user to a different url after login is to edit the customer helper file.  It contains all of the urls related to customers.

/magento/app/code/core/Customer/Helper/Data.php

public function getDashboardUrl()
    
{
// Change this
           
return $this->_getUrl('customer/account');
// To this
return "/myuserhomepage";
    
}

Edit “getDashboardUrl()” and “getAccountUrl()” to what you would like the after login url to be.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top