herba Posted August 13, 2013 Share Posted August 13, 2013 We like to approve our customers manually, is it a way to get email or ams when they have applied ? Link to comment Share on other sites More sharing options...
mfedorets Posted August 14, 2013 Share Posted August 14, 2013 There is no built-in solutions but several paid modules could be found for this task. The simplest solution without buying paid add-ons is to add this code to the override/classes/Customer.php class Customer extends CustomerCore { public function add($autodate = true, $null_values = true) { $this->active = false; return parent::add($autodate, $null_values); } } Then each new customer will appear at the backend as non-active customer and you will need to activate each of them manually and you still will be notified about new customers. Link to comment Share on other sites More sharing options...
herba Posted August 14, 2013 Author Share Posted August 14, 2013 so you mean with this code I get notified via email so I know if someone applied Link to comment Share on other sites More sharing options...
El Patron Posted August 14, 2013 Share Posted August 14, 2013 I have a mature paid module that allows you to 1) approve new customers 2) receive email when new customer requests and account http://www.etiendas.co/en/37-private-shop-authorized-only.html Link to comment Share on other sites More sharing options...
herba Posted August 14, 2013 Author Share Posted August 14, 2013 I have already so my prospects can't see the prices, so they must apply to be able to see prices, but what we need is i.g an email so we don't have to check every hour or minute, because when people apply they like to buy Link to comment Share on other sites More sharing options...
El Patron Posted August 14, 2013 Share Posted August 14, 2013 I have already so my prospects can't see the prices, so they must apply to be able to see prices, but what we need is i.g an email so we don't have to check every hour or minute, because when people apply they like to buy you would need to develop this code as it does not exist in native prestashop. Link to comment Share on other sites More sharing options...
herba Posted August 14, 2013 Author Share Posted August 14, 2013 Thankyou very much 1 Link to comment Share on other sites More sharing options...
mfedorets Posted August 14, 2013 Share Posted August 14, 2013 so you mean with this code I get notified via email so I know if someone applied No I meant standard backend notification, for e-mail notification you should use paid solutions or free solution presented above. My piece of code makes users inactive after registration - they should be approved manually to become active. Link to comment Share on other sites More sharing options...
TJMare Posted November 8, 2013 Share Posted November 8, 2013 There is no built-in solutions but several paid modules could be found for this task. The simplest solution without buying paid add-ons is to add this code to the override/classes/Customer.php class Customer extends CustomerCore { public function add($autodate = true, $null_values = true) { $this->active = false; return parent::add($autodate, $null_values); } } Then each new customer will appear at the backend as non-active customer and you will need to activate each of them manually and you still will be notified about new customers. Is this solution for an older Prestashop version? I just tried this solution on a 1.5.6.0 and it did not work. I couldn't find "customer.php" so I created it and uploaded it to the classes folder. Can you confirm (please). Do I need to reconstruct as a folder (called customer) with this code as it's index file? Link to comment Share on other sites More sharing options...
vekia Posted November 8, 2013 Share Posted November 8, 2013 it's an override, in 1.5.6 this function looks like: public function add($autodate = true, $null_values = true) { $this->id_shop = ($this->id_shop) ? $this->id_shop : Context::getContext()->shop->id; $this->id_shop_group = ($this->id_shop_group) ? $this->id_shop_group : Context::getContext()->shop->id_shop_group; $this->id_lang = ($this->id_lang) ? $this->id_lang : Context::getContext()->language->id; $this->birthday = (empty($this->years) ? $this->birthday : (int)$this->years.'-'.(int)$this->months.'-'.(int)$this->days); $this->secure_key = md5(uniqid(rand(), true)); $this->last_passwd_gen = date('Y-m-d H:i:s', strtotime('-'.Configuration::get('PS_PASSWD_TIME_FRONT').'minutes')); if ($this->newsletter && !Validate::isDate($this->newsletter_date_add)) $this->newsletter_date_add = date('Y-m-d H:i:s'); if ($this->id_default_group == Configuration::get('PS_CUSTOMER_GROUP')) if ($this->is_guest) $this->id_default_group = (int)Configuration::get('PS_GUEST_GROUP'); else $this->id_default_group = (int)Configuration::get('PS_CUSTOMER_GROUP'); /* Can't create a guest customer, if this feature is disabled */ if ($this->is_guest && !Configuration::get('PS_GUEST_CHECKOUT_ENABLED')) return false; $success = parent::add($autodate, $null_values); $this->updateGroup($this->groupBox); return $success; } Link to comment Share on other sites More sharing options...
TJMare Posted November 8, 2013 Share Posted November 8, 2013 it's an override, in 1.5.6 this function looks like: public function add($autodate = true, $null_values = true) { $this->id_shop = ($this->id_shop) ? $this->id_shop : Context::getContext()->shop->id; $this->id_shop_group = ($this->id_shop_group) ? $this->id_shop_group : Context::getContext()->shop->id_shop_group; $this->id_lang = ($this->id_lang) ? $this->id_lang : Context::getContext()->language->id; $this->birthday = (empty($this->years) ? $this->birthday : (int)$this->years.'-'.(int)$this->months.'-'.(int)$this->days); $this->secure_key = md5(uniqid(rand(), true)); $this->last_passwd_gen = date('Y-m-d H:i:s', strtotime('-'.Configuration::get('PS_PASSWD_TIME_FRONT').'minutes')); if ($this->newsletter && !Validate::isDate($this->newsletter_date_add)) $this->newsletter_date_add = date('Y-m-d H:i:s'); if ($this->id_default_group == Configuration::get('PS_CUSTOMER_GROUP')) if ($this->is_guest) $this->id_default_group = (int)Configuration::get('PS_GUEST_GROUP'); else $this->id_default_group = (int)Configuration::get('PS_CUSTOMER_GROUP'); /* Can't create a guest customer, if this feature is disabled */ if ($this->is_guest && !Configuration::get('PS_GUEST_CHECKOUT_ENABLED')) return false; $success = parent::add($autodate, $null_values); $this->updateGroup($this->groupBox); return $success; } What file do I add that function to? (sorry I'm a newbie) Link to comment Share on other sites More sharing options...
Crowell Posted October 21, 2014 Share Posted October 21, 2014 does any of these solutions woks on the newest PS? Link to comment Share on other sites More sharing options...
andrea22k Posted December 14, 2014 Share Posted December 14, 2014 i need this trick to be achieved on prestashop 1.6.9. How can i do? Thanks Link to comment Share on other sites More sharing options...
flowersticky Posted March 9, 2017 Share Posted March 9, 2017 public function add($autodate = true, $null_values = true) { $this->id_shop = ($this->id_shop) ? $this->id_shop : Context::getContext()->shop->id; $this->id_shop_group = ($this->id_shop_group) ? $this->id_shop_group : Context::getContext()->shop->id_shop_group; $this->id_lang = ($this->id_lang) ? $this->id_lang : Context::getContext()->language->id; $this->birthday = (empty($this->years) ? $this->birthday : (int)$this->years.'-'.(int)$this->months.'-'.(int)$this->days); $this->secure_key = md5(uniqid(rand(), true)); $this->last_passwd_gen = date('Y-m-d H:i:s', strtotime('-'.Configuration::get('PS_PASSWD_TIME_FRONT').'minutes')); /* ADD THIS BELLOW 2 LINES CODE TO DISABLE AUTO ACTIVATION AFTER REGISTRATION*/ $this->active = false; return parent::add($autodate, $null_values); if ($this->newsletter && !Validate::isDate($this->newsletter_date_add)) { $this->newsletter_date_add = date('Y-m-d H:i:s'); } if ($this->id_default_group == Configuration::get('PS_CUSTOMER_GROUP')) { if ($this->is_guest) { $this->id_default_group = (int)Configuration::get('PS_GUEST_GROUP'); } else { $this->id_default_group = (int)Configuration::get('PS_CUSTOMER_GROUP'); } } /* Can't create a guest customer, if this feature is disabled */ if ($this->is_guest && !Configuration::get('PS_GUEST_CHECKOUT_ENABLED')) { return false; } $success = parent::add($autodate, $null_values); $this->updateGroup($this->groupBox); return $success; } Link to comment Share on other sites More sharing options...
dolec Posted April 3, 2017 Share Posted April 3, 2017 And how to redirect user to cms page because now customer is created in back not active but is redirected to registration form without info Link to comment Share on other sites More sharing options...
vlado12345 Posted May 3, 2017 Share Posted May 3, 2017 Hey ! Please what is the path to the file where to add this piece of code : $this->active = false; return parent::add($autodate, $null_values); Thanks ! Link to comment Share on other sites More sharing options...
joestin haugumsons Posted December 16, 2017 Share Posted December 16, 2017 /* ADD THIS BELLOW 2 LINES CODE TO DISABLE AUTO ACTIVATION AFTER REGISTRATION*/ $this->active = false; return parent::add($autodate, $null_values); Link to comment Share on other sites More sharing options...
spiralciric Posted May 17, 2018 Share Posted May 17, 2018 Can anyone post a solution for the newest Presta, 1.7? This is really really annoying not to have that feature. Thanks Link to comment Share on other sites More sharing options...
Addify Posted October 3, 2019 Share Posted October 3, 2019 On 5/17/2018 at 8:09 PM, spiralciric said: Can anyone post a solution for the newest Presta, 1.7? This is really really annoying not to have that feature. Thanks Hi, We have released a module that allows you to manually approve new user registrations. The admin gets an email notification when new user registers. Here is the link - https://addons.prestashop.com/en/social-login-connect/43591-approve-new-user-registrations.html Link to comment Share on other sites More sharing options...
Sergio Posted January 10, 2020 Share Posted January 10, 2020 On 5/17/2018 at 4:09 PM, spiralciric said: Can anyone post a solution for the newest Presta, 1.7? This is really really annoying not to have that feature. Thanks Link to comment Share on other sites More sharing options...
djharding1 Posted March 4, 2021 Share Posted March 4, 2021 On 10/3/2019 at 8:38 PM, Addify said: Hi, We have released a module that allows you to manually approve new user registrations. The admin gets an email notification when new user registers. Here is the link - https://addons.prestashop.com/en/social-login-connect/43591-approve-new-user-registrations.html Hi, Currently my customers register and we activate them on our website manually. I still want to be able to do this but is there any way of sending them a preset / default email once they have registered? I.e they hit register then receive an email asking for more information. At the moment we have to email customers 1-by-1 which is time consuming if it could be done as an auto email upon registration. TIA 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