Jump to content

WHMCS.Community

  1. The Latest from the WHMCS Team

    1. News & Announcements

      Announcements and mailings we send out will be posted here

      350
      posts
  2. WHMCS.Community

    1. Community Announcements

      Our WHMCS Community Announcements with everything from our community rules to updates on making our community more awesome

      86
      posts
    2. Introduce Yourself

      Introduce yourself here and be sure to come back to welcome others.

      688
      posts
  3. Using WHMCS

    1. Pre-Sales Questions

      Considering purchasing WHMCS but have some questions? Ask them here.

      12,783
      posts
    2. Admin & Configuration Questions

      This is your space for any questions about WHMCS configuration settings.
       

      2,025
      posts
    3. Installation, Upgrade, and Import Support

      Get help from the community with installing, upgrading and migrating to WHMCS here

      3,845
      posts
    4. Using WHMCS

      Have a question about how something works or need help configuring and using WHMCS? Here's the place to do it.

      87,257
      posts
    5. Troubleshooting Issues

      Use this board to discuss any issues or problems you are encountering. If you think you've found a bug, please report it here

      18,018
      posts
    6. Vendor Discussions

      Discuss Control panels, payment gateways and domain registrars here

      155
      posts
  4. WHMCS Showcase

    1. Showcase Your Site

      Customized and integrated WHMCS in some way? Show the WHMCS Community here!
       

      7,759
      posts
    2. Share Your Best Practices & Tips

      Share your tips and advice to the rest of the WHMCS community.
       

      68
      posts
  5. Developing & Extending WHMCS

    1. Third Party Add-ons

      A place to discuss third party modules, add-ons and extensions for the WHMCS platform.

      marketplace_inverse_728x90.png&key=ebc9c3244aa6bb0297564b81d8e33ae4d631eaca838fc05b66038be9162910c7&resource=1

      16,544
      posts
    2. Service Offers & Requests

      A place to post offers & requests for services related to WHMCS. Rules apply.

      21,550
      posts
    3. Developer Corner

      Integration, customization and module development, if you have questions, ask them here.

      48,893
      posts
    4. Building Modules

      Need help while building an extension? Ask your questions here.

      180
      posts
    5. Share Ideas for WHMCS Modules

      Looking for an extension that doesn't exist? Share your ideas and vote on others.

      89
      posts
  6. Community Competitions

    1. Competitions

      From time to time we run community competitions this is the place you'll find them

      • No posts here yet
  7. General Discussions

    1. General Discussion

      Board for general conversation, share interests, discuss industry related news, etc...

      37,377
      posts
  8. General Feedback & Assistance

    1. WHMCS.Community Tips & Tricks

      This board provides an overview of some features and functionality that WHMCS.Community provides.  We add new content from time to time.

      6
      posts
  • Popular Contributors

  • Our picks

    • Client Profile (Admin) - Products/Services, Domains, etc
      It'd be super convenient if a total was shown for the various Products/Services, Domains, and other products!

      I have a client with a TON of domains. Active, Expired, Transferred, etc... It'd be a real time saver, if those counts could be also be included within the appropriate section.  I realize that there's a total count up top, in the Products/Services box, but some of these pages and up becoming *super* long to scroll back and forth in.

      just my .02
      - splaquet
      • 11 replies
    • WHMCS.Community Wrapup - October 2018
      Hi Everyone,

      Welcome to the October 2018 Community Wrap-up a look back at some of the highlights from the community over the last month.  WHMCS.Community is here to help you so please do send your feedback thru!

      WHMCS.Community October 2018 Statistics at a glance:

      307 new members joined WHMCS.Community


      338 new topics where created


      1,110 replies were crafted by WHMCS.Community Members



      WHMCS.Community Leaderboard

      Continuing his reign as the most reacted to community member is@brian! on 49 points!  In second place on 14 points is @Kian with @hanstavo finishing out the leaderboard on third place with 11 points

      Reactions on the community are a key way we surface great content on WHMCS.Community.  Every reaction to a post might see you or a thread you've contributed to added to the Top Picks & Leaderboard and soon, your reaction points will count towards your status on the community
      Popular Content

       

      Getting help from WHMCS.Community Team

      It's been a while since we last reminded people about the ways to contact the Moderation team when you need assistance such as changing your username, finding the right place to post or just asking a general community-related question.  The place to do that is the WHMCS.Community Assistance board this ensures that any one of the Community Team members can assist you as quickly as possible.

      That's a wrap for October!

      And that wraps up the October 2018 wrapup, as always please provide any community-related feedback in the General or WHMCS.Community Assistance Board
      • 0 replies
    • Team WHMCS Needs You!
      Do you love helping people? Do you know WHMCS and Website Hosting? We want you to join team WHMCS!
      • 0 replies
  • Topics

  • Posts

    • Odd, try this basic one that just logs to the module log (Utiltiles -> Log -> Module log  -- enable logging if it says it is not ) .  Again it should be going in to whmcs root -> includes -> hooks with name of "hook_ticketstatuchange.php" (or any other name as long as it ends in .php) Also, may have missed it but what version of WHMCS are you using? <?php add_hook('TicketStatusChange', 1, function($vars) { logModuleCall("hook", "TicketStatusChange", $vars , print_r($vars,true), "", array()); });  
    • I must be screwing something up then - I’ll take a look at what I’ve done.
    • I have tested the following hook and it works.  <?php use WHMCS\Database\Capsule; add_hook('TicketStatusChange', 1, function($vars) { $Ticket = localAPI('GetTicket', array('ticketid'=>$vars['ticketid'])); if ($Ticket['result'] == "success") { // We got ticket, now get department for email to use for reply try { $Department = Capsule::table('tblticketdepartments')->where( array('id'=>$Ticket['deptid']))->first(); } catch (Exception $e) { // Failed to get department, should not happen but oh well return false; } if ($Department) { $Email = $Department->email; if ($vars['status'] == "In Progress") { $Message = "Hey there,<br><br>Your ticket has been assigned to one of our technical team members and is currently under review, they will reply back here shortly with an update or to request more information about your issue."; } elseif ($vars['status'] == "On Hold") { $Message = "Hello, your ticket has been changed to ".$vars['status']." status."; } if (isset($Message) and $Message) { //We have a message, so add it as a reply $command = 'AddTicketReply'; $postData = array( 'ticketid' => $vars['ticketid'], 'message' => $Message, 'name'=>'TicketBot', 'email'=>$Email, 'useMarkdown' => true, ); $results = localAPI($command, $postData); } // IF good message } // if department } // if get ticket was success });  
    • Ensure the package in WHM isn't going beyond your reseller's account limit.   That has been the common issue lately . 
    • Ah this is terrible! We have a number of clients who's mandates don't start with 'MD' - @WHMCS John is this something you guys are already aware of? Will there be a fix for this?
    • And just to confirm, you have uploaded that to whmcs_root/includes/hooks ? 
    • I must be losing it - I see nothing when I add this to my TicketStatusChange.php file - it doesn't print anything:   <? use WHMCS\Database\Capsule; function prefix_TicketStatusChange($vars) { $adminUsername = 'myusername'; // Change me accordingly. This Admin user is the one used to automatically add replies to tickets when status is updated. Set false if you want to open the ticket using your own customers $userID = Capsule::table('tbltickets')->where('id', $vars['ticketid'])->first(['userid'])->userid; // Send email notification to customer when ticket status changes $EmailData = array( 'id' => $userID, 'customtype' => 'general', 'customsubject' => '', 'custommessage' => 'Hey there,<br><br>Your ticket has been assigned to one of our technical team members and is currently under review, they will reply back here shortly with an update or to request more information about your issue.' .$vars['status'] . '</strong>' );  localAPI('SendEmail', $EmailData); echo '<pre>'; print_r($results); echo '</pre>'; // Add reply to ticket when its status changes $TicketData = array( 'ticketid' => $vars['ticketid'], 'message' => 'Hey there,<br><br>Your ticket has been assigned to one of our technical team members and is currently under review, they will reply back here shortly with an update or to request more information about your issue.' .$vars['status'] . '</strong>', 'clientid' => $userID, 'adminusername' => $adminUsername, ); localAPI('AddTicketReply', $TicketData); echo '<pre>'; print_r($results); echo '</pre>'; } $results = localAPI('SendEMail', $EmailData); add_hook('TicketStatusChange', 1, 'prefix_TicketStatusChange');  
    • Print both localAPI requests. Open a ticket and view it as administrator from backend then open Options tab and change ticket status. Press Save Changes. You should see the result of print on screen. You can print in this way... $results = localAPI('SendEMail', $EmailData); echo '<pre>'; print_r($results); echo '</pre>'; // and... $results = localAPI('AddTicketReply', $TicketData); echo '<pre>'; print_r($results); echo '</pre>';  
    • Thank you Kian, I've added this to TicketStatusChange.php in includes/hooks/ and still nothing - there is no reply in the ticket.
        <? use WHMCS\Database\Capsule; function prefix_TicketStatusChange($vars) { $adminUsername = 'admin'; // Change me accordingly. This Admin user is the one used to automatically add replies to tickets when status is updated. Set false if you want to open the ticket using your own customers $userID = Capsule::table('tbltickets')->where('id', $vars['ticketid'])->first(['userid'])->userid; // Send email notification to customer when ticket status changes $EmailData = array( 'id' => $userID, 'customtype' => 'general', 'customsubject' => '', 'custommessage' => 'Hey there,<br><br>Your ticket has been assigned to one of our technical team members and is currently under review, they will reply back here shortly with an update or to request more information about your issue.' .$vars['status'] . '</strong>' ); localAPI('SendEmail', $EmailData); // Add reply to ticket when its status changes $TicketData = array( 'ticketid' => $vars['ticketid'], 'message' => 'Hey there,<br><br>Your ticket has been assigned to one of our technical team members and is currently under review, they will reply back here shortly with an update or to request more information about your issue.' .$vars['status'] . '</strong>', 'clientid' => $userID, 'adminusername' => $adminUsername, ); localAPI('AddTicketReply', $TicketData); } add_hook('TicketStatusChange', 1, 'prefix_TicketStatusChange');  
    • I've had this problem for a while now.  WHMCS is not creating an account in WHM.  All my servers are set correctly.  The package is green, so it's active.  I can't figure out whats going on.
×

Important Information

By using this site, you agree to our Terms of Use & Guidelines