Jump to content

Changing the link to new registration


Henrik

Recommended Posts

Hi There. I have been having too many spammers despite adding Recaptcha. When I remove the registration page, I do not have any fake registration.

My question relates to Prestashop 1.7.7:

I need to change the link to the registration. Currently the registration is https://xxxxx/en/login?create_account=1 I want to change it to something different. How can I do that?

I also want to remove it from my sitemaps.

Thanks

Link to comment
Share on other sites

Hi,

As of now, there is no default way of changing the registration page URL to something else. If you are good at coding you can override the Link.php file and you can make changes such that the URL for the registration page is changed. Or you can go for a module that gives you a new registration page and to avoid spammers you can switch to v3 recaptcha so that it can analyze the pattern and block the spammers accordingly.

 

Regarding sitemaps, you can remove the links by performing the below action

Got to your root/controllers/front/SitemapController.php inside this search for the function getUserAccountLinks and inside the function comment out the code for the registration page

protected function getUserAccountLinks()
    {
        $links = [];

        $links[] = [
            'id' => 'login-page',
            'label' => $this->trans('Log in', [], 'Shop.Theme.Global'),
            'url' => $this->context->link->getPageLink('authentication'),
        ];

        // $links[] = [
        //     'id' => 'register-page',
        //     'label' => $this->trans('Create new account', [], 'Shop.Theme.Global'),
        //     'url' => $this->context->link->getPageLink('authentication', null, null, ['create_account' => 1]),
        // ];

        return $links;
    }

The link will be removed accordingly

image.thumb.png.1d6b9032f8c342643514cd2f4ccece9b.png

 

Link to comment
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...