nasreddine hafidi Posted June 21, 2022 Share Posted June 21, 2022 hello, i need to approve new user registration by the admin, before they can login in Link to comment Share on other sites More sharing options...
Ress Posted June 21, 2022 Share Posted June 21, 2022 Rather than develop this functionality, I think it is more advantageous to buy a module that does this, there are quite a few to choose from. https://addons.prestashop.com/en/search?search_query=customer approve Link to comment Share on other sites More sharing options...
El Patron Posted June 21, 2022 Share Posted June 21, 2022 (edited) The first module I ever wrote years ago for 1.4 and have maintained since, Private Shop Authorized Client Only https://addons.prestashop.com/en/private-sales-flash-sales/28906-private-shop-authorized-clients-only.html Edited June 21, 2022 by El Patron (see edit history) Link to comment Share on other sites More sharing options...
Knowband Plugins Posted June 21, 2022 Share Posted June 21, 2022 If you want to automatic disable the customer after the registrtaion and customer can only login after admin activate that customer from admin, then you can do that by adding the below code in "classes/form/CustomerForm.php" , submit() Replace try { $ok = $this->customerPersister->save( $this->getCustomer(), $clearTextPassword, $newPassword, $this->passwordRequired ); } catch (PrestaShopException $e) { $this->errors[''][] = $this->translator->trans('Could not update your information, please check your data.', [], 'Shop.Notifications.Error'); $ok = false; } with try { $ok = $this->customerPersister->save( $this->getCustomer(), $clearTextPassword, $newPassword, $this->passwordRequired ); $emailField = $this->getField('email'); $id_customer = Customer::customerExists($emailField->getValue(), true, true); $kb_customer_obj = new Customer($id_customer); $kb_customer_obj->active = 0; $kb_customer_obj->save(); } catch (PrestaShopException $e) { $this->errors[''][] = $this->translator->trans('Could not update your information, please check your data.', [], 'Shop.Notifications.Error'); $ok = false; } 1 Link to comment Share on other sites More sharing options...
Rizzzle Posted June 7 Share Posted June 7 (edited) Thanks Knowband. It worked in 1.8. Is there any way to have an acknowledgment message to let the customer know the form was recieved? Edited June 7 by Rizzzle (see edit history) Link to comment Share on other sites More sharing options...
Mediacom87 Posted June 7 Share Posted June 7 il y a 51 minutes, Rizzzle a dit : Thanks Knowband. It worked in 1.8. Is there any way to have an acknowledgment message to let the customer know the form was recieved? Hi, to have a message informing the customer of this activation delay, you need to use a module like the one I propose for validating new customer registrations. Link to comment Share on other sites More sharing options...
Rizzzle Posted June 7 Share Posted June 7 Thanks Mediacom, however in my opinion that's overpriced. $130 for this functionality does not seem good value. For $130 I'd expect a module to capture additional data like company bio, website address etc. If the basic functionality was around $60 I'd purchase it without thinking about it, but $100+ would make me reconsider. That's just how my mind operates. Hopefully that's useful feedback for you. Link to comment Share on other sites More sharing options...
Mediacom87 Posted June 7 Share Posted June 7 il y a 56 minutes, Rizzzle a dit : Thanks Mediacom, however in my opinion that's overpriced. $130 for this functionality does not seem good value. For $130 I'd expect a module to capture additional data like company bio, website address etc. If the basic functionality was around $60 I'd purchase it without thinking about it, but $100+ would make me reconsider. That's just how my mind operates. Hopefully that's useful feedback for you. Don't worry, everyone runs their own business as they see fit. All the best. Link to comment Share on other sites More sharing options...
Rizzzle Posted June 7 Share Posted June 7 Thanks. If you add advanced functionality on I would buy it. An optional/obligatory field that requires the user to enter their website address, address and social media. That would be really useful. Link to comment Share on other sites More sharing options...
Mediacom87 Posted June 7 Share Posted June 7 Il y a 4 heures, Rizzzle a dit : Thanks. If you add advanced functionality on I would buy it. An optional/obligatory field that requires the user to enter their website address, address and social media. That would be really useful. It has nothing to do with the initial request or the functionality of this module, so there's no chance of me integrating it into this type of module. One module, one task, there must be specific modules for adding fields to customer files. 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