Jump to content


Popular Content

Showing content with the highest reputation on 10/05/19 in all areas

  1. 1 point
    I can't see anything particular wrong with the context code - though if you don't need to show the announcement sidebars on that page, you don't need to include them in the php there's nothing to stop you using a .php file that only contains the bare minimum... <?php use WHMCS\ClientArea; define('CLIENTAREA', true); require __DIR__ . '/init.php'; $ca = new ClientArea(); $ca->setPageTitle('Custom Page'); $ca->addToBreadCrumb('index.php', Lang::trans('globalsystemname')); $ca->addToBreadCrumb('alan-adi-kayit.php', 'Alan'); $ca->initPage(); $ca->setTemplate('alan-adi-kayit'); $ca->output(); that should work as is, but if you then want to add context menus or additional code, they should work too.
  2. 1 point
    //Updated to only target products of Hosting-type. <?php use WHMCS\Database\Capsule; add_hook('PreModuleTerminate', 1, function($vars) { $invoiceid = Capsule::table('tblinvoiceitems') ->where('relid', '=', $vars['params']['serviceid']) ->where('type','Hosting') ->orderBy('duedate', 'desc') ->first(); Capsule::table('tblinvoices') ->where('id', '=', $invoiceid->invoiceid) ->update(['Status' => 'Cancelled']); });
  • 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