Jump to content

andrezzz

Member
  • 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 Poor

About andrezzz

  • Rank
    Member

Recent Profile Visitors

358 profile views
  1. If anyone is interested in this Custom API function, just check out my GitHub 😄 GitHub: https://github.com/andretunes/whmcs-api-update-order-status
  2. Hello, You need to setup it in your `configuration.php` file. More information: https://docs.whmcs.com/Mobile_App:_Connecting_to_WHMCS
  3. 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.
  4. 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.
  5. 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
  6. 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",""); ?>
  7. 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?
  8. Hello, Which domain registrar are you using?
  9. The hook is fine, will only be triggered once the Invoice is Created, I already use it on my personal Hosting Website.
  10. That error, doesn't come from my Hook, do you have any other recent Hook?
  11. 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}
  12. 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) )); } });
  13. Do you have Discord or Anydesk, so that I can help you further more?
×
×
  • 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