spk Posted September 10, 2013 Share Posted September 10, 2013 Hello there! I'm facing a little problem here, I want my customers status set to disabled by default when creating a new account in my shop. I have been looking at the file AuthController.php and "$customer->active = 1;". If I set it to 0, it actually works. But now the problem is that it also disables the guest checkout. Customers should be able to use the guest checkout, but if they want to create an account, the admin must set their status to enabled first. How do I solve this? Link to comment Share on other sites More sharing options...
El Patron Posted September 10, 2013 Share Posted September 10, 2013 it would seem you changed the code, there are two places the area you want your code, i.e. set to zero(0) is if (!Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && !$this->ajax && !Tools::isSubmit('submitGuestAccount')) Link to comment Share on other sites More sharing options...
spk Posted September 11, 2013 Author Share Posted September 11, 2013 it would seem you changed the code, there are two places the area you want your code, i.e. set to zero(0) is if (!Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && !$this->ajax && !Tools::isSubmit('submitGuestAccount')) if (!Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && !$this->ajax && !Tools::isSubmit('submitGuestAccount')) { if (!count($this->errors)) { if (Tools::isSubmit('newsletter')) $this->processCustomerNewsletter($customer); $customer->birthday = (empty($_POST['years']) ? '' : (int)$_POST['years'].'-'.(int)$_POST['months'].'-'.(int)$_POST['days']); if (!Validate::isBirthDate($customer->birthday)) $this->errors[] = Tools::displayError('Invalid birthday.'); $customer->active = 0; This part? If I put $customer->active to 0, I can't log in on any account. I'm using v. 1.5.3.1. Link to comment Share on other sites More sharing options...
El Patron Posted September 11, 2013 Share Posted September 11, 2013 that would be the area I think. curious as to you want to allow guest check out but not regular registrations.... Link to comment Share on other sites More sharing options...
spk Posted September 13, 2013 Author Share Posted September 13, 2013 that would be the area I think. curious as to you want to allow guest check out but not regular registrations.... Alright, but it doesn't work for me. When I set active = 0 nothing changes, you can still register an account and log in as usual. Any other ways to do this? I don't know, its not for me, its for a friend and he wants it that way... Link to comment Share on other sites More sharing options...
El Patron Posted September 13, 2013 Share Posted September 13, 2013 you could search for a paid module, I will put a plug in for mine because I thinks it's the best but then I measure the best by those having the least amount of code. http://www.prestashop.com/forums/topic/149628-module-private-shop-authorized-client-shopping-only-14-and-15/ Link to comment Share on other sites More sharing options...
robert.baum Posted April 23, 2019 Share Posted April 23, 2019 hi spk did you find solution to your request i need the same think thanks 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