Home is for the experience. Projects are for the ones who are interested!

How To Redirect To Other Page After Registration Prestashop

How To Redirect To Other Page After Registration Prestashop

One of the methods through which you can redirect user to other page after registration is to create a module and register this module to a certain hook so you can add your own code and redirect the user whereever you need on your website. If you don't know how to create a module for prestashop from scratch you can check this website you will find a lot of tutorials about Prestashop modules.

This tutorial assumes that you already have a module, so you can register it to the right hook. In your install() function of your module register the following hook: actionCustomerAccountAdd, this hook is invoked when a customer creates an account successfully. Then, in order to redirect the user to a new page you need to add the following function in your module:

public function hookactionCustomerAccountAdd(){
    Tools::redirect($url);
}

Using the above function you simply register your module to listen for this hook, when register event occur actionCustomerAccountAdd hook will be triggered and your code will run. If you have any question let me know and I will try to help you.

Leave a Reply

Your email address will not be published. Required fields are marked *