Jump to content

serverbd

Member
  • Content Count

    55
  • Joined

  • Last visited

  • Days Won

    1

serverbd last won the day on April 22

serverbd had the most liked content!

Community Reputation

2 Neutral

About serverbd

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Im my sms clients template i missed {currency} variable value code have 'variables' => '{firstname}, {lastname}, {duedate}, {total}, {invoiceid}, {currency}' When my user getting sms they also missing country code like USD or BDT they getting first name last name and ammount perfect but missing country code only . My hook full code blew can any one suggest what is missing or wrong in the code? <?php $hook = array( 'hook' => 'InvoiceCreated', 'function' => 'InvoiceCreatedWa', 'description' => array( 'english' => 'After Invoice Creation' ), 'type' => 'client', 'extra' => '', 'defaultmessage' => 'Hello {firstname} {lastname}, Your invoice with id {invoiceid} has been generated. Total amount is {currency} {total}. The last day of payment is {duedate}. Kindly pay your bill before due date to use services without interruption', 'variables' => '{firstname}, {lastname}, {duedate}, {total}, {invoiceid}, {currency}' ); if(!function_exists('InvoiceCreatedWa')){ function InvoiceCreatedWa($args){ $api = new wamessenger(); $template = $api->getTemplateDetails(__FUNCTION__); if($template['active'] == 0){ return null; } $settings = $api->apiSettings(); if(!$settings['api_key'] || !$settings['api_token']){ return null; } $userSql = " SELECT a.total,a.duedate,b.id as userid,b.firstname,b.lastname,b.currency,`b`.`country`,`b`.`phonenumber` as `gsmnumber` FROM `tblinvoices` as `a` JOIN tblclients as b ON b.id = a.userid WHERE a.id = '".$args['invoiceid']."' LIMIT 1 "; $result = mysql_query($userSql); $num_rows = mysql_num_rows($result); if($num_rows == 1){ $UserInformation = mysql_fetch_assoc($result); $currency_sql=mysql_query('SELECT code FROM tblcurrencies WHERE id='.$UserInformation['currency']); $replace_currency=""; if(mysql_num_rows($currency_sql) > 0){ $currency_result=mysql_fetch_assoc($currency_sql); $replace_currency=$currency_result['code']; } $template['variables'] = str_replace(" ","",$template['variables']); $replacefrom = explode(",",$template['variables']); $replaceto = array($UserInformation['firstname'],$UserInformation['lastname'],$api->changeDateFormat($UserInformation['duedate']),$UserInformation['total'],$args['invoiceid'],$replace_currency); $message = str_replace($replacefrom,$replaceto,$template['template']); $api->setCountryCode($UserInformation['country']); $api->setGsmnumber($UserInformation['gsmnumber']); $api->setMessage($message); $api->setUserid($UserInformation['userid']); $api->send(); } } } return $hook;
  2. Thank you so much. Do I need add anything extra on cpanel cron job settings ? ya default WHMCS cron php will be ok? my current cron is location/crons/cron.php */5 * * * *
  3. Can i use different Configurable Options for single product Monthly and Yearly pricing ? If user select monthly Configurable Options 1 (price) When select Yearly plan Configurable Options 2 (price)
  4. is it possible to run Credit Card capture attempt cron job at least 4 times a day? 00:00 06:00 12:00 18:00
  5. Suppose I have 2 currency 1. USD 2. BDT When Clients signup Additional Information Choose Currency its No1 position USD but Can I set BDT in No1 position? I men 1st item currency BDT instead of USD with some Hook ?
  6. I got it 'order' => 999, $creditPanel = $homePagePanels->addChild( 'Review Our Services', array( 'label' => 'Review Our Services', 'icon' => 'fa-money', 'order' => 999,
  7. It can be help for you, Im not sure https://marketplace.whmcs.com/product/4637-wra-restful-api-addon-for-whmcs
  8. How can I send a specific panel (Review Our Services) serially last in clients area home with hook ? I want send Review Our Services box after support ticket panel box.
  9. How can I send custom message to specific client from WHMCS local API ? Custom Module : After AddTransaction via api I want instant send mail to my client , I have user = 10 Mail Subject = Confirmation of Receipt of USD 5.62 Mail Body = Thanks you for Add Credit USD 5.62 I try blew no luck $command = 'SendEmail'; $postData = array( 'id' => '10', 'customsubject' => 'Confirmation of Receipt of USD 5.62', 'custommessage' => 'Thanks you for Add Credit USD 5.62', 'customvars' => base64_encode(serialize(array("custommerge"=>$populatedvar1, "custommerge2"=>$populatedvar2))), ); $adminUsername = 'admin'; $results = localAPI($command, $postData, $adminUsername);
  10. In WHMCS Module/addons, Can I get Clients ID from Specific Custom field value ? ============== I have a unique customer filed auto crete when client register . In my admin dash when I search with that customer field I can find the exact customer well. ($customfield['fieldname'] == "CLIENTCODE") this custom field Value example = KAMA01 In my module I have a variable $ref = KAMA01 now in this module I need clients ID .. Can I get clients ID from that $ref variable ?
×
×
  • 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