Jump to content

Modify the My Account Block


Penge

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

 

Link to comment
Share on other sites

  • 1 year later...

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

  • Like 3
Link to comment
Share on other sites

  • 1 month later...
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.

Link to comment
Share on other sites

  • 1 year later...
On 3/25/2019 at 7: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

it works great! Good tip!

Link to comment
Share on other sites

  • 1 year later...

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
×
×
  • Create New...