Jump to content

veolio

New Member
  • Posts

    1
  • Joined

  • Last visited

About veolio

veolio's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. Hello, i'm having the following error when i try to accept a domain name registration : Command failed - - 541 Invalid attribute value; INVALID CONTACT [OWNERCONTACT (Missing required attribute; extended parameters for registrant (organization) required)] i have the following error when trying to access the user profile : Domain name not found when i try to modify the contact details, i have the following error : should i wait for the propagation ? can anyone help please ?
  2. Hello, I am new to WHMCS and php and i would like to add a new custom php file that displays all the tlds and their pricing ... For that, i have created a new file : domainList.php under /public_html/ directory : domainList.php <?PHP $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://www.mysite.com/includes/api.php'); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query( array( 'action' => 'GetTLDPricing', // See https://developers.whmcs.com/api/authentication 'username' => 'GGT3m7EqO7bxnrb1HcT9i1z0tKOcmA03', 'password' => 'qRFYmqc7JDNprtGxFFwKBJzHyaGxMSbv', 'currencyid' => '1', 'responsetype' => 'json', ) ) ); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec($ch); curl_close($ch); $jsonData = json_decode($response, true); add_hook('ClientAreaPage', 1, function($vars) { // Perform hook code here... return array("response" => $response); }); ?> i have added the part below so i can access the $response array in the domainList.tpl file add_hook('ClientAreaPage', 1, function($vars) { // Perform hook code here... return array("response" => $response); }); For now, i have some questions about my code : 1- Is my code structured the right way ? should i place it under the API/ directory ? 2 - If so, how can i access mysite.com/Domain-Listing.php and call the service domainList.php that is under the API directory ? 3- How can i set a template to this file (TPL file) ? ==> i saw some documentation here : https://developers.whmcs.com/advanced/creating-pages/ by using # Define the template filename to be used without the .tpl extension $ca->setTemplate('domainList'); 4- is the add_hook method used the right way to access $response array directly from the TPL file ? ==> In this case, i would do the following in the domainList.TPL file : {foreach $response['pricing'] as $tld => $price} {$tld} : {$price['register']['1']}<br> {/foreach} For your information, this is the result contained in the response variable : Thanks in advance for the help !
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated