How can I send back the client who has just created their account on the home page by postponing the validation of their account on PrestaShop 8.0.4?
I work on a PrestaShop project whose owner wanted it to be B2B and validated after verifying the company identification number. My issue is that even after the account is created, it remains stuck on the form page. From my research, I’ve found that if the default account is enabled, it logs the user in and redirects them to the home page. My question is, how can we modify this process to redirect the user to the home page as a guest, allowing them to browse while waiting for their account to be validated?
2
Answers
Thank you for your method I was able to redirect the customer to home store . But in addition to bringing it home I wanted to display a small banner on the house to inform the user that their account is being validated. so I created a variable $just_registered = true that I pass to the index to check it in index.tpl of my theme but it doesn't work
You need to create a module to be able to do it.
You also need to use the hook
hookActionCustomerAccountAdd
Here is an example:
Basically, you need to hook to the event
hookActionCustomerAccountAdd
, set the customer status asinactive
and logout them.Then redirect to a custom page with some message saying that an admin confirmation is needed to confirm the account.
Don’t forget to register the hook in the
public function install()
of your module