Jump to content
Penge

Modify the My Account Block

Recommended Posts

Hello

I am using Prestashop 1.7.3

On the bottom of the front page there is a block called My Account.

I find the My Account Block on my module list but there is only possible to deactivate or activate.

I want to edit the information: Remove "Credit note" and keep the rest.

Can anyone help me were to remove this link ?

 

Thank you

Petter

 

Share this post


Link to post
Share on other sites

Hi,

I had the same problem. This is the solution I found. 

Open the modules/ps_customeraccountlinks/ps_customeraccountlinks.php line 101

$my_account_urls = array(
            2 => array(
                'title' => $this->trans('Orders', array(), 'Admin.Global'),
                'url' => $link->getPageLink('history', true),
            ),
            3 => array(
                'title' => $this->trans('Credit slips', array(), 'Modules.Customeraccountlinks.Admin'),
                'url' => $link->getPageLink('order-slip', true),
            ),
            4 => array(
                'title' => $this->trans('Addresses', array(), 'Shop.Theme.Global'),
                'url' => $link->getPageLink('addresses', true),
            ),
            0 => array(
                'title' => $this->trans('Personal info', array(), 'Modules.Customeraccountlinks.Admin'),
                'url' => $link->getPageLink('identity', true),
            ),
        );

and comment (/*   */)the url that you do not want to appear (in my case "Credit slips")

$my_account_urls = array(
            2 => array(
                'title' => $this->trans('Orders', array(), 'Admin.Global'),
                'url' => $link->getPageLink('history', true),
            ),
            /*3 => array(
                'title' => $this->trans('Credit slips', array(), 'Modules.Customeraccountlinks.Admin'),
                'url' => $link->getPageLink('order-slip', true),
            ),*/
            3 => array(
                'title' => $this->trans('Addresses', array(), 'Shop.Theme.Global'),
                'url' => $link->getPageLink('addresses', true),
            ),
            0 => array(
                'title' => $this->trans('Personal info', array(), 'Modules.Customeraccountlinks.Admin'),
                'url' => $link->getPageLink('identity', true),
            ),
        );

Sorry about my english. Hope this help you!!!

 

Regards

 

Sivi

Share this post


Link to post
Share on other sites
On 3/25/2019 at 12:12 PM, Sivile said:

Hi,

I had the same problem. This is the solution I found. 

Open the modules/ps_customeraccountlinks/ps_customeraccountlinks.php line 101


$my_account_urls = array(
            2 => array(
                'title' => $this->trans('Orders', array(), 'Admin.Global'),
                'url' => $link->getPageLink('history', true),
            ),
            3 => array(
                'title' => $this->trans('Credit slips', array(), 'Modules.Customeraccountlinks.Admin'),
                'url' => $link->getPageLink('order-slip', true),
            ),
            4 => array(
                'title' => $this->trans('Addresses', array(), 'Shop.Theme.Global'),
                'url' => $link->getPageLink('addresses', true),
            ),
            0 => array(
                'title' => $this->trans('Personal info', array(), 'Modules.Customeraccountlinks.Admin'),
                'url' => $link->getPageLink('identity', true),
            ),
        );

and comment (/*   */)the url that you do not want to appear (in my case "Credit slips")


$my_account_urls = array(
            2 => array(
                'title' => $this->trans('Orders', array(), 'Admin.Global'),
                'url' => $link->getPageLink('history', true),
            ),
            /*3 => array(
                'title' => $this->trans('Credit slips', array(), 'Modules.Customeraccountlinks.Admin'),
                'url' => $link->getPageLink('order-slip', true),
            ),*/
            3 => array(
                'title' => $this->trans('Addresses', array(), 'Shop.Theme.Global'),
                'url' => $link->getPageLink('addresses', true),
            ),
            0 => array(
                'title' => $this->trans('Personal info', array(), 'Modules.Customeraccountlinks.Admin'),
                'url' => $link->getPageLink('identity', true),
            ),
        );

Sorry about my english. Hope this help you!!!

 

Regards

 

Sivi

This solution only works if the customer is not logged in.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More