Jump to content
frankhelps

Logout Prestashop is not working 1.7.2

Recommended Posts

Hello,

the logout (Sign out) if you are logged in and want to log out is not working. I heard you can solve it with htaccess.

I try to change the code in prestashop folder so it works hopefully.

Share this post


Link to post
Share on other sites

Hi,

I solved the problem: The problem is that there is missing a piece of Link in the Software. You have to add this:

go to:

prestashop/modules/ps_customersignin/ps_customersignin.php

change that line:

        return array(
            'logged' => $logged,
            'customerName' => $customerName,
            'logout_url' => $link->getPageLink('index', true, null, 'mylogout'),   <---- that line is wrong
            'my_account_url' => $link->getPageLink('my-account', true),

to:

        return array(
            'logged' => $logged,
            'customerName' => $customerName,
            'logout_url' => $link->getPageLink('my-account', true, null, 'mylogout'),
            'my_account_url' => $link->getPageLink('my-account', true),

Now the logout link is fine. So replace 'index' to 'my-account'

You can search that part with your search-tool in the  ps_customersignin.php: just enter:    'index', true,   and replace 'index' with 'my-account'

 

THANKS to the great community here, solved many problems for me, this is my contribute back, hope it helps the one or another

  • Like 1

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

×
×
  • Create New...

Important Information

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