Page 1 of 1

Add a customer from admin?

Posted: Sat Apr 13, 2024 2:50 pm
by maxi032
What would be the best way to proceed about doing that?
I want to allow customer registration only via the admin area.
Currently customers have an edit action associated with an update but how can I add an 'add' action associated with create? I was able to "repurpose" the form that was made for editing, in such a way to allow an extra action=add in the url. So in this case the customers.php POST method will have action=create instead of update in the FORM but I don't know where processing of the form for "create" should take place. I am using v1.0.9.0
Any help would be appreciated.

Re: Add a customer from admin?

Posted: Sun Apr 14, 2024 6:00 am
by Kofod95
If you look in admin/includes/actions/customers you can see the actions as they are. If you add a new file there called create or add (depending on what you end up calling your action) and put the processing of form data there, things automagically work.
You can look at actions/info_pages for an example that has both add_new and update actions.

//Daniel

Re: Add a customer from admin?

Posted: Mon Sep 09, 2024 3:46 pm
by Phil
Following up on this, seems like it is a great idea to have the ability to add customers, even edit/add orders in the admin panel.

Re: Add a customer from admin?

Posted: Mon Sep 09, 2024 4:43 pm
by burt
I'm almost certain that addons already exist to cover "adding customer" and "add/edit order".