Jump to content

sentq

GearHead
  • Content count

    2,230
  • Joined

  • Last visited

  • Days Won

    32

sentq last won the day on January 14 2018

sentq had the most liked content!

Community Reputation

378 Excellent

4 Followers

About sentq

  • Rank
    WHMCS GearHead

Recent Profile Visitors

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

  1. change your if statement to the following: if ($data->total == '0.00' && $data->credit == '0.00') so it will prevent invoices with total equal "0.00" from being sent, while allow invoices paid with credit to be sent normally
  2. sentq

    Very Basic Need for Menu

    the following action hook will check if client is logged in, and if the configured custom field has a value, then add new menu item to primary navbar as an example. create new php file (eg. Navbar_MonitorLoginLink.php) inside "/includes/hooks/" directory, copy and edit the required lines: <?php /** * @author SENTQ */ use WHMCS\Database\Capsule; # We are working on Primary Navbar add_hook("ClientAreaPrimaryNavbar", 1, function($primaryNavbar){ # Client Custom Field Name $customFieldName = "Username"; // **Change this value # Get Client $client = Menu::context("client"); # Not Logged In! if ($client === null){ return; } # Get Custom Field Value $getURL = Capsule::table("tblcustomfieldsvalues") ->join("tblcustomfields", "tblcustomfields.id", "=", "tblcustomfieldsvalues.fieldid") ->where("tblcustomfieldsvalues.relid", "=", $client->id) ->where("tblcustomfields.type", "=", "client") ->where("tblcustomfields.fieldname", "=", $customFieldName) ->select(["tblcustomfieldsvalues.value"]) ->first(); # Custom Field Value is Empty! if (!$getURL->value){ return; } # Add New Menu Item To Primary Navbar -> Home $newLoginLink = $primaryNavbar->addChild('Home', array( "name" => "New_login_link", "label" => "New Login Link", // **Change this line as well "uri" => $getURL->value, "order" => 100 )); });
  3. you can upgrade to the latest version directly, the auto update feature could be failed due to any issue you should investigate it if you want to proceed with it, but manual update will complete the job too. * its important to keep a full backup of both your files and database in case.
  4. it's already displayed in every page except for pages where client are not logged-in, could you explain what you mean in more details?
  5. sentq

    MoneyBird

    you may advertise about your module in the following section instead: https://whmcs.community/community/89-commercial-modules-and-addons/
  6. ClientAreaPage action hook point triggered when anyone browse your client area (Admins, Clients, Contacts and normal clients) if you need to display these Todos to logged-in clients only (this includes Admins, Clients and Contacts) all you need to do is to change the following line from: $client = Menu::context('client'); to: $client = Menu::context('client'); # Return empty todolist if client not loggedin, admins still able to browse this section if (is_null($client) && !isset($_SESSION['adminid'])){ return array("todologs" => array()); }
  7. sentq

    WHMCS affiliates

    this is the case when you need to use coupons to identify the affiliate account and assign it to that order, but people will not be encouraged to enter any promotion code if it doesn't give them any discount.
  8. sentq

    admin widget to update Database

    @nimafire I've updated and tested the original widget code: https://whmcs.community/topic/281801-admin-widget-to-update-database/?do=findComment&comment=1275269
  9. sentq

    Part Payment Add on

    not out of the box, but it's doable
  10. sentq

    Prevent sending invoice payment reminder

    this should do the trick, create new {File-Name}.php file inside /includes/hooks/ directory and place the following lines inside it: <?php /** * Prevent "Invoice Payment Reminder" email from being sent to specific clients * * @author SENTQ */ use WHMCS\Database\Capsule; add_hook("EmailPreSend", 1, function($vars){ $clientIds = array(1, 12, 25); if ($vars['messagename'] === "Invoice Payment Reminder"){ $getClientId = Capsule::table("tblinvoices")->where("id", "=", $vars['relid'])->first(); if (in_array($getClientId->userid, $clientIds)){ return array("abortsend" => true); } } });
  11. sentq

    Customization whmcs

    it could easily done, if you're interested contact me here for quote
  12. sentq

    Invoice number issue

    exactly
  13. I could include it before, but as not every website affected by this I thought pointing to the fix would be enough
×

Important Information

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