flangefrog Posted September 11, 2014 Report Posted September 11, 2014 I would like to see more variables like the client_id passed to some of the module methods. For example when adding a domain from the admin or client area (getAdminAddFields, getClientAddFields) I would like the WHOIS fields populated with the client data. Quote
Blesta Addons Posted September 11, 2014 Report Posted September 11, 2014 ????? normally when you register the domain , the contact client should be sent to the regisrar as the domain registrar and admin/technique info , so them should be available to whois .... what you want to do ? because you can get the client_id and extra info , please refer to addService for inspiration . Quote
flangefrog Posted September 11, 2014 Author Report Posted September 11, 2014 Yes, I can get them via the addService method, but I want to have all the WHOIS fields visible on the add service page and pre-filled but able to be modified. Not all my clients have all their details filled out and my registrar requires phone numbers in three separate fields so a lot of domain registrations would fail. I'm pretty sure that my registry requires the client to enter the nameholder/organisation/registrant each time when registering a domain as this is locked and not easily changed afterwards. Quote
Blesta Addons Posted September 11, 2014 Report Posted September 11, 2014 changing the client info for registrar/admin/tech is possible in the admin/client whois tab view . so your request is not allow more vars like client_id , but what you want is possible . you need to create field for each info you need to be netered by the client/admin , then pass them to addService , make you addservice grab that fields instead of using the client info . i don't see any benifect from re-typing info that already can exist in the client info . if your register need a custom info , then add a custom field to client table , and make it required , then any client will register will fill this info for later use in registration system . Quote
flangefrog Posted September 12, 2014 Author Report Posted September 12, 2014 changing the client info for registrar/admin/tech is possible in the admin/client whois tab view . Changing the registrant nameholder field is not possible for some domains including .nz. The only way to change it is by providing a change of ownership form signed by both the current and new nameholders. This is important because it is the one field that defines the owner of the domain. One client may want to register several domains but have some registered under their personal name and some registered under one or more company names. They may even want to register domains on behalf of their own clients. so your request is not allow more vars like client_id , but what you want is possible . you need to create field for each info you need to be netered by the client/admin , then pass them to addService , make you addservice grab that fields instead of using the client info . i don't see any benifect from re-typing info that already can exist in the client info . I have added the fields and passed them to addService, but as you mention the problem is that I need to retype info that's already stored. If I had the client_id in the getAdminAddFields and getClientAddFields methods then I could pre-populate the fields with client data so that I can see what values are going to be used and change any that are necessary. I have explained above the reason why having a nameholder field is important, but as I said for a phone number my registrar only accepts three values (country code, area code, number) and it is not possible to reliably split phone numbers in the client info into three values. The other reason is that most WHOIS fields are required, but not all client fields are required (at least not though the admin panel) and I can't add in the missing info because I don't have it. if your register need a custom info , then add a custom field to client table , and make it required , then any client will register will fill this info for later use in registration system . I could make three fields for the clients phone number and make them required but I don't really like the idea of having these in addition to the existing phone number fields. The NZ registry doesn't require any other custom info like some other registries. I don't know if anything of this type if being done with the new domain manager but the best option would be the ability to chose contacts saved in the clients account or create a new contact when registering a domain. There is still the issue of formatting phone numbers but I think this is more an issue with my particular registrar as I'm pretty sure the NZ registry doesn't require the number to be separated into three. I am also aware that I can pass the client_id to the getAdminAddFields and getClientAddFields methods myself but this requires changes be made to core files and means the module is not stand-alone any more. Quote
Blesta Addons Posted September 12, 2014 Report Posted September 12, 2014 I believe You can get client info inside getadminaddfields , let me search for you this night . I wil back to you . flangefrog 1 Quote
Blesta Addons Posted September 12, 2014 Report Posted September 12, 2014 after some search i have get some workarround . for getAdminAddFields is not possible to get the client_id and no session is stored for it . so the only solution is to get the client id from the url so then load the clients model $tokens = explode("/", $_SERVER['REQUEST_URI']); $client_id = $tokens[sizeof($tokens)-3] ; Loader::loadModels($this, array("Clients")); then get the client info by $client = $this->Clients->get($client_id); so then add oyur fields to be shown $fields = array( 'transfer' => array( 'label' => "Domain Action", 'type' => "radio", 'value' => "1", 'options' => array( '1' => "Register", '2' => "Transfer", ) ), 'domain-name' => array( 'label' => Language::_("Logicboxes.transfer.domain-name", true), 'type' => "text" ), 'auth-code' => array( 'label' => Language::_("Logicboxes.transfer.auth-code", true), 'type' => "text" ), 'name' => array( 'label' => "Name", 'type' => "text", 'value' => $client->first_name . " " . $client->last_name ), 'client_email' => array( 'label' => "Email", 'type' => "text", 'value' => $client->email ), 'client_address1' => array( 'label' => "Adress", 'type' => "text", 'value' => $client->address1 ) ); for the phone number you make a regex to validate the phone by jquey in $module_fields->setHtml () . i hope this can help PauloV 1 Quote
flangefrog Posted September 12, 2014 Author Report Posted September 12, 2014 Thanks, didn't think about getting the client_id from the URL. This only works on the admin side though, Maybe I can retrieve the client_id from the session on the client side. Quote
Blesta Addons Posted September 13, 2014 Report Posted September 13, 2014 i have made a error in the fields array the correct is to change value to options 'name' => array( 'label' => "Name", 'type' => "text", 'options' => $client->first_name . " " . $client->last_name ) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.