techfirestudio Posted December 14, 2013 Share Posted December 14, 2013 Hi, I need to be able to create orders through the back office for customers that don't have an email address. So I need to be able to create customer accounts without email address and without passwords, (customer login will be disabled). How do I go about making the email and password field not required ONLY for customer accounts created by an employee through the back office. Registrations on the front office will still be required to supply email and password. I have tried editing /controllers/admin/AdminCustomersController.php and changing it. To not require email address change array( 'type' => 'text', 'label' => $this->l('Email address:'), 'name' => 'email', 'size' => 33, 'required' => true ), to array( 'type' => 'text', 'label' => $this->l('Email address:'), 'name' => 'email', 'size' => 33, 'required' => false ), But this did no good except remove the red * next to the email field. It will displays error if you leave the email field blank. I have not attempted the password field yet because it looked more complicated, and it's not absolutely necessary as we can just use a default password on these accounts. Please help me out here Link to comment Share on other sites More sharing options...
doekia Posted December 14, 2013 Share Posted December 14, 2013 This is not possible. Customer should have email. To create order for customer not loggable, create a customer such as PointOfSale, with an email and password. Attach whatever order to this fake customer. Based on your version, either you can create the order from the BO, or use free module jbx_superuser to have capacity to create order directly from the FO in the name of this fake customer Link to comment Share on other sites More sharing options...
techfirestudio Posted December 14, 2013 Author Share Posted December 14, 2013 This is not possible. Customer should have email. To create order for customer not loggable, create a customer such as PointOfSale, with an email and password. Attach whatever order to this fake customer. Based on your version, either you can create the order from the BO, or use free module jbx_superuser to have capacity to create order directly from the FO in the name of this fake customer I've thought about doing that, but it may be nice to be able to create each user. It seems to me it wouldn't take much to bypass the validation check for those fields. But I spoke with my manager today, he seems to like you idea, so that may be what we'll do... unless someone on here can point me to how the validation of email and password fields can be skipped. Link to comment Share on other sites More sharing options...
blue17 Posted December 14, 2013 Share Posted December 14, 2013 ONLY for customer accounts created by an employee through the back office Modify the backoffice template so that the email+password formfields are pre-populated with default values. [email protected] default444password444string Link to comment Share on other sites More sharing options...
zarawax Posted January 22, 2014 Share Posted January 22, 2014 Hello, And how do you do that ? When i add default value in BO template, nothing appears on add customer form.. Thanks for your help 'type' => 'text', 'label' => $this->l('Email address:'), 'name' => 'email', 'size' => 33, 'required' => false, 'value' => '[email protected]' ), Link to comment Share on other sites More sharing options...
Recommended Posts