Jump to content

Syed Ans Shah

Senior Member
  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Syed Ans Shah

  • Rank
    Junior Member
  1. hello, i am having issues to login user to client area when using external api to add the order and client. the client creation and order creation is successfully using external api like in document: https://developers.whmcs.com/api-reference/addorder/ "https://www.example.com/includes/api.php?action=AddClient" but when clients uses the user email and password to login it says login details incorrect. please try again. i have attached image. i have also checked the tblorder and tblclients everything is same as when using default procedure of whmcs internal api. i dont know where i am doing wrong. current version of whmcs is 7.7.1. help required. thanks in advance.
  2. hi Everyone, i am getting this thing, "Upgrade price is calculated from a credit of the unused portion of the current plan and billing of the new plan for the same period (30 Days) " but i dont want this. In my Case, whether Client uses the full portion or some of it, upgrade/renew/downgrade price should be fixed which is 25$ right but rightnow it is calculating it as 17$ what should i do to resolve it? thanks
  3. thanks @brian! you are always helpful , both worked fine 🙂
  4. Hi everyone, i am using hostiko-light template and whmcs v7.7.1, i want to remove/hide some tabs and panels from whmcs client area. 1. i want to remove the Action tab / Panel. 2. i want to add/remove some tabs/option in the client area menu. can you please guide me how to do these changes? it is urgent. thanks 🙂
  5. hi everyone, i am getting error while creating/adding new clients. WHMCS says "Module Create Failed - Service ID: 1440 - Error: Error :" when automatically accepting an order. i get two records in tblorders in my whmcs database as well. same order with userid 1340 The actual account is created in server and whmcs but also duplicate order remains pending in WHMCS. WHMCS client Profile logs are: i have also added the update domainstatus to Active as it was creating the service before while CreateAccount; now it does create the account in server but again duplicate order is still there I'd appreciate your thoughts to help me resolve this issue please.
  6. thanks @Kian but what if i dont know the affID. my use case is this: i want to make a PromoCode for each affiliate. NOW new Client subscribes to my service using that promoCode and i want to give the commission of this client to that affiliate. so how will the affiliate gets this commission. i dont want to use the affiliate link. i want to use promo codes for affiliate. any suggestions?
  7. hi, i want to know if there is any process or any way to create a Promotion and assign it to specific Affiliate i have generated a promo promocode=TestPromo and i have an affiliate as ?aff=10 Now i want to assign all the user/clients who uses that promo to be assigned to the Affiliate and gets the specified commision. help required immediately please. thanks
  8. so finally i found the solution: 1. hide the password field in checkout.php >>>> /templates/orderforms/[your_cart]/checkout.tpl <input type="hidden" name="password" id="inputNewPassword1" class="field" placeholder="{$LANG.clientareapassword}" value="NA"> <input type="hidden" name="password2" id="inputNewPassword2" class="field" placeholder="{$LANG.clientareaconfirmpassword}" value="NA"> 2. Add hook to change password of service and client add_hook('PreModuleCreate', 0, function($vars) { $clientid = $_SESSION['uid']; $permitted_chars = 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'; //ALLOWED CHARACHTERS function generate_string($input, $strength = 16) { $input_length = strlen($input); $random_string = ''; for($i = 0; $i < $strength; $i++) { $random_character = $input[mt_rand(0, $input_length - 1)]; $random_string .= $random_character; } return $random_string; } $random_string = generate_string($permitted_chars, 8); $command = 'ModuleChangePw'; //TO CHANGE SERVICE PASSWORD $postData = array( 'serviceid' => $vars['params']['serviceid'], 'servicepassword' => $random_string, ); $results = localAPI($command, $postData); $command = 'UpdateClient'; //TO CHANGE/UPDATE CLIENT PASSWORD $postData = array( 'clientid' => $clientid, 'password2' => $random_string, ); $adminUsername = 'YOUR_ADMIN'; //ADD YOUR ADMIN NAME HERE $resultss = localAPI($command, $postData, $adminUsername); return array( 'password' => $random_string, ); } ); 3. Now the Client and Service password are same. so you can send the EMAIL to user with USERNAME AND SERVICE PASSWORD. which is same as Client password in this way client doesnt have to remember 2 different password nor client has to get confused which password is used for which purpose. cheers.
  9. so you are suggesting that i should only generate the client password and let the whmcs generate the service password. okay that is good option too but problem is again the same that client has 2 password: client password and service password and they get confused which password to enter and where. i am sending the service password via email but can you tell me how to send the generate client password via email. i tried it but it gave me this
  10. i added this hook as well but it says "Please correct the following errors before continuing: You did not enter a password" add_hook("PreModuleCreate", 1, function($vars){ if ($vars['filename']!="cart"){ return; } $passwordLength = 10; $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $charactersLength = strlen($characters); $generatedPassword = ''; for ($i = 0; $i < $passwordLength; $i++) { $generatedPassword .= $characters[mt_rand(0, $charactersLength - 1)]; } return array("generatedpassword" => $generatedPassword); });
  11. dear @brian! and @WHMCS Lawrence, i am hoping you guys can help me out in this too.
  12. Thanks for help. yes i was logged in as an admin too. then i tried by logging out as admin and enter wrong password in the client area and it gave me error of wrong credentials Which means it worked. thanks again @brian! and WHMCS Community
  13. thanks a lot brian! it was really helping. now i know it. cheers.
  • 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