Pssuido Posted September 19, 2023 Share Posted September 19, 2023 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 More sharing options...
leoCodesAShop Posted September 19, 2023 Share Posted September 19, 2023 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 More sharing options...
Pssuido Posted September 20, 2023 Author Share Posted September 20, 2023 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 More sharing options...
leoCodesAShop Posted September 20, 2023 Share Posted September 20, 2023 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 More sharing options...
Pssuido Posted September 22, 2023 Author Share Posted September 22, 2023 Hello, I try to change the entire module that I have (redirect on login) and change everything on that module with new names and the public function as you told me too to, but I was unable to install this module. I have attached on this topic if you want to take a look Redirectonnewaccount.zip Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now