Jump to content

Redirect after Registration


Recommended Posts

Hi all,

 

After a full search on this topic, I can't find a solution without a paid module, that feels my needs.

I have the B2B mode activated on my page, and only after my approval, clients are able to see prices and by products.

So I want, wen they finish their registration, a redirection to a specific page and not the home page.

Is this possible? I have a module to redirect after login, but this is not what I want, to redirect after client registration.

 

Version 1.7.8.10 

 

Thanks

Link to comment
Share on other sites

I think the hook you looking for is
actionCustomerAccountAdd
just register the Hook and redirect in the hook funktion
for example


public function hookActionCustomerAccountAdd($params) {
// Perform actions after customer registration here 
// Redirect to Google
Tools::redirect('https://www.google.com');
}

$params is an array with customer account specific data idk if you need it for your case
 

Link to comment
Share on other sites

Hi, thanks for your answer, I never quite understand how to manage Hooks, even after read the manual from prestahop knowledge base, I usually just change some parameters on php files, but probably this is not the case.

 

If is not much trouble, can you specify with more details how can I do that?

 

Thanks

Link to comment
Share on other sites

Hi,
Hooks are used for modules to change Prestashop without changing the basecode of Prestashop.
Prestashop even provided a quite good tutorial for creating your own modules:
https://devdocs.prestashop-project.org/8/modules/

Try to give this a read first basically everything is explained there.
But when it comes to Hooks, you can imagine it like a button which gets pressed when a specific thing happens and activates your code.
hookActionCustomerAccountAdd in this example its activates only when a customer gets added.

So maybe try the tutorial first and create your own Module and if you still struggle you can ask again no problem.

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...