-
Content Count
38 -
Joined
-
Last visited
-
Days Won
1
andrezzz last won the day on January 2
andrezzz had the most liked content!
Community Reputation
-1 PoorAbout andrezzz

-
Rank
Member
Recent Profile Visitors
-
Change order status via API to custom status
andrezzz replied to netzhaus's topic in Developer Corner
If anyone is interested in this Custom API function, just check out my GitHub 😄 GitHub: https://github.com/andretunes/whmcs-api-update-order-status -
Hello, You need to setup it in your `configuration.php` file. More information: https://docs.whmcs.com/Mobile_App:_Connecting_to_WHMCS
-
Hello, In order to help you out, could you please tell me a little bit more about what you wanna do? From what I've seen (by far), you wanna a custom API action, is that correct? If yes, check this example out! It's a piece of extra code from one of my modules. <?php /** * WHMCS Link Discord version 1.2 * * @package WHMCS * @copyright Andrezzz * @link https://www.andrezzz.pt * @author André Antunes <andreantunes@andrezzz.pt> */ use WHMCS\Database\Capsule; if (!defined('WHMCS')) { exit(header('Location: https://www.andrezzz.pt')); } $clients = Capsule::table('tblhosting')->where('domainstatus', 'Active')->groupBy('userid')->get(['userid']); if (!$clients) { $error = 'No client found.'; } if (!$error) { $apiresults = array("result" => "success", "clients" => $clients); } else { $apiresults = array("result" => "error", "message" => $error); } ?> Edit: You'll need to create a file in the directory `/yourwhmcspath/includes/api/nameofaction.php` and change the `nameofaction` for your desired name.
-
In some providers, you can define for default the Lock, if not, you'll need either to do a Hook, either to change the respective Registrar Module.
-
Hello, You can do this, go to your template folder and search for the file `invoicepdf.tpl`, there you can edit as much you like. More info: https://docs.whmcs.com/PDF_Invoice_Customisation
-
Hook triggers after invoice is sent - please HELP!
andrezzz replied to minadreapta's topic in Developer Corner
Hello bro, You can try using this hook here: https://developers.whmcs.com/hooks-reference/invoices-and-quotes/#invoicepaidpreemail It will trigger once the Invoice is marked as Paid and before the email send. Try this one: <?php function proformainvoicepaiddate($vars) { $invoiceid = $vars["invoiceid"]; update_query("tblinvoices", array("date" => "now()"), array("id" => $invoiceid)); } add_hook("InvoicePaidPreEmail", 0, "proformainvoicepaiddate",""); ?> -
tblerrorlog shows some error about domainfunctions.php
andrezzz replied to TimRef's topic in Troubleshooting Issues
Hello, In the past on my WHMCS v 7.6 installation I getted this error and I think the version 8.1 also have. But after I upgrade to the 8.2 I never saw this error again, can you test it? -
Hello, Which domain registrar are you using?
-
Add dedicated IP or hostname to the invoice.php page .
andrezzz replied to TimRef's topic in Developer Corner
The hook is fine, will only be triggered once the Invoice is Created, I already use it on my personal Hosting Website. -
Add dedicated IP or hostname to the invoice.php page .
andrezzz replied to TimRef's topic in Developer Corner
Do you have this two enabled?- 51 replies
-
-1
-
Add dedicated IP or hostname to the invoice.php page .
andrezzz replied to TimRef's topic in Developer Corner
That error, doesn't come from my Hook, do you have any other recent Hook? -
Hello and Happy new year, Check this out, if it's what you're looking for! {if $templatefile == 'homepage'} <title>Domain Name Sales</title> {else if $templatefile == 'products'} <title>{$groupname} - {$companyname}</title> {else} <title>{if $kbarticle.title}{$kbarticle.title} - {/if}{$pagetitle} - {$companyname}</title> {/if}
-
Add dedicated IP or hostname to the invoice.php page .
andrezzz replied to TimRef's topic in Developer Corner
Omg, I'm sleeping standing up, updated it. Update: I can't edit the message, so I will let it here. <?php /** * Invoice with Primary/Dedicated IP WHMCS Hook version 1.1 * * @package WHMCS * @copyright Andrezzz * @link https://www.andrezzz.pt * @author André Antunes <andreantunes@andrezzz.pt> */ if (!defined('WHMCS')) { exit(header('Location: https://www.andrezzz.pt')); } use WHMCS\Database\Capsule; add_hook('InvoiceCreation', 1, function($vars) { global $_LANG; $typeOfItems = array('Hosting', 'Setup', 'PromoHosting', 'Upgrade'); $invoiceItems = Capsule::table('tblinvoiceitems')->where('invoiceid', $vars['invoiceid'])->get(); foreach ($invoiceItems as $invoiceItem) { if ($invoiceItem->relid === 0) return; if (!in_array($invoiceItem->type, $typeOfItems)) return; $dedicatedIP = Capsule::table('tblhosting')->where('id', $invoiceItem->relid)->value('dedicatedip'); Capsule::table('tblinvoiceitems')->where('id', $invoiceItem->id)->update(array( 'description' => $invoiceItem->description . "\n" . $_LANG['primaryIP'] . ': ' . trim($dedicatedIP) )); } }); -
Add dedicated IP or hostname to the invoice.php page .
andrezzz replied to TimRef's topic in Developer Corner
Do you have Discord or Anydesk, so that I can help you further more?