-
Content Count
2236 -
Joined
-
Last visited
-
Days Won
33
sentq last won the day on February 27 2020
sentq had the most liked content!
Community Reputation
93 ExcellentAbout sentq

-
Rank
WHMCS GearHead
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
james322232 started following sentq
-
while I encourage and appreciate people contributions, its shame to see someone taking out the original contributor name, that is something I never understand!
- 125 replies
-
1
-
- credit balance
- sidebar
-
(and 2 more)
Tagged with:
-
How to redirect cart.php to a custom page
sentq replied to artaweb's topic in Troubleshooting Issues
the same way we exclude product group, try the following: <?php add_hook("ClientAreaPage",1,function($vars){ if (!empty($_GET['cartshare'])) { return; } # Product Groups Excluded From The Redirection $excludedGroups = array(8, 10, 11, 12, 13, 15, 6, addons, renewals); # Product Bundles Excluded From The Redirection $excludedBundles = array(2); # Validate Product Groups if ($vars['filename']=="cart" && in_array($_REQUEST['gid'], $excludedGroups)){ return; } # Validate Product Bundles if ($vars['filename']=="cart" && in_array($_REQUEST['bid'], $excludedBundles)){ return; } if ($vars['filename']=="cart" && !isset($_REQUEST['a'])){ header("Location: index.php"); exit; } }); -
well, for WHMCS main language I would use the following: Lang::trans('sms_message', array('name' => "John")) and that support to work as they use Laravel! but as you want to use Addon language translation and as all the phrases has been already assigned into an array ($vars['_lang']) and since WHMCS doesn't have the same functionality above, the only option is to use "str_replace" which will give you the same result.
-
you would need to do it by adding a key in the translation phrase as: $_ADDONLANG['sms_message'] = "Hello :name"; then when you are about to display/use that phrase, you should replace that key with the appropriate value: function addonmodule_output($vars) { $_lang = $vars['_lang']; // an array of the currently loaded language variables from addon module $helloMessage = str_replace(":name", "John", $_lang['sms_message']); echo $helloMessage; // Hello John } that's how it works, and you can define as many different keys as you would need
-
WHMCS registrar module for CIRA fury platform?
sentq replied to CandianEh?'s topic in General Discussion
the module on marketplace is for the FURY platform indeed -
you need to upload it inside "{WHMCS-Main-Directory}/includes/hooks/" directory
- 125 replies
-
- credit balance
- sidebar
-
(and 2 more)
Tagged with:
-
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
-
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 )); });
-
Upgrade 7.1.2 to 7.6.1 directly
sentq replied to Reza's topic in Installation, Upgrade, and Import Support
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. -
sentq changed their profile photo
-
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?
- 125 replies
-
1
-
- credit balance
- sidebar
-
(and 2 more)
Tagged with:
-
AnthonyMorant started following sentq
-
you may advertise about your module in the following section instead: https://whmcs.community/community/89-commercial-modules-and-addons/
-
Hook to Display Todo List to Public (or logged in clients)
sentq replied to cdeese8's topic in Developer Corner
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()); } -
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.
-
@nimafire I've updated and tested the original widget code: https://whmcs.community/topic/281801-admin-widget-to-update-database/?do=findComment&comment=1275269