Jump to content

TimRef

Member
  • Content Count

    40
  • Joined

  • Last visited

Everything posted by TimRef

  1. Hi, guys. Refer to this topic , I hope to replace the 'payment method ' to 'invoice' , in this way , can see the link of invoice to this specific service . I tried to use the hook of AdminAreaClientSummaryPage . but I didn't know which variant can be use and pass . in that page clientssummary.tpl . I used {debug} , didn't see any invoice variant . the hook is like this , but not working . hope anyone can help me , thanks in advance . <?php if (!defined("WHMCS")) { die("This file cannot be accessed directly"); } use WHMCS\Database\Capsule; add_hook('AdminAreaClientSummaryPage', 1, function($vars) { if (!empty($vars['product'])) { foreach ($vars['product'] as $key => $product) { $data = Capsule::table('tblhosting AS t1') ->leftJoin('tblinvoiceitems AS t2', 't1.id', '=', 't2.relid') ->leftJoin('tblinvoices AS t3', 't2.invoiceid', '=', 't3.id') ->select('invoiceid') ->where('t2.type', 'hosting')->where('t1.id', $product['id']) ->first(); $vars['product'][$key]['invoiceid'] = !empty($data) ? $data->invoiceid : "-"; } return ["product" => $vars['product']]; } });
  2. Hi, Hope to get some help about this . refer to this topic . I hope to display the dedicated ip or hostname to the admin area inovices.php page . could you please let me know whether AdminAreaHeaderOutput can be used for this . like this , Thanks in advanced. thanks .
  3. @brian! @Kian Hi, sir , Can I ask you a question here ? I hope to list the dedicated or domain in the admin invoices.php list .could you please let me know whether AdminAreaHeaderOutput can be used for this . like this , Thanks in advanced. thanks .
  4. Done . we tried another way to pay . when this case is solved . will buy more . anyway , thanks a lot . I will try to fix this take some time . Also hope can get your help . @pRieStaKos
  5. BTW, when I try to buy coffee , show me Failed to verify captcha. do you have any other way to do this ? like paypal
  6. if one invoice have more than 1 products , we can only use the top one of it . but currently , only 1 product invoice , also not showing the ip. I am thinking maybe the pass or connection of field not correct ? Thanks for your time in advance
  7. tried this ,all invoice dedicated ip shown '-' , see the photo , sometimes one invoice have more than 1 server or hosting . maybe we should add a judge ? but , only one in the invoice , also not shown .only can see '- ' is the ‘ClientAreaPageInvoices’ we used right ? seems didnt get the dedicated ip to pass .
  8. thanks , I will try , and update you soon , also , i tried reset password via cubric, didnt get anything, thanks anyway
  9. sorry, but i didnt get any email , ang also dont know the ticket link
  10. Hi, @pRieStaKos , thanks for your help . Do you offer this type of compensable service to get this done ? I have tried long time , I really have no ability to resolve this . Do you have a email to talk ?
  11. hi, @pRieStaKoscan we use this way to connect with the database tables? select * from tblinvoices t1 left join tblinvoiceitems t2 on t1.id=t2.invoiceid left join tblhosting t3 on t2.relid=t3.id WHERE t3.dedicatedIP = value then we use dedicated IP . if get this to Hook , do you have any idea . can we use this type : <?php if (!defined("WHMCS")) { die("This file cannot be accessed directly"); } use WHMCS\Database\Capsule as DB; add_hook('ClientAreaPageInvoices', 1, function($vars) { if (isset($vars['invoices'])) { $csVals = []; foreach ($vars['invoices'] as $invoices) { $fieldVal = ''; $data = DB::table('tblinvoices AS t1') ->leftJoin('tblinvoiceitems AS t2', 't1.id', '=', 't2.invoiceid') ->leftJoin('tblhosting AS t3', 't2.relid', '=', 't3.id') ->select('t3.dedicatedip') ->where('t1.id', $fieldId)->where('t2.type', 'hosting')->where('t3.domain', $invoices['id']) ->first(); if (!is_null($data)) { $fieldVal = $data->value; } $csVals[$invoice['id']] = $fieldVal; } return ['dedicatedip' => $csVals]; } }); //and add {$dedicatedip} to .tpl page / I'm not good at this , sorry to take you any inconveniences.
  12. maybe I also need add a Hook file to connect the invoice and services table , or else maybe cannot resolve this case .
  13. how can we use two tablename in the .tpl file ? {include file="$template/includes/tablelist.tpl" tableName="InvoicesList" filterColumn="4"} like {include file="$template/includes/tablelist.tpl" tableName="InvoicesList" filterColumn="4"} {include file="$template/includes/tablelist.tpl" tableName="ServicesList" filterColumn="4"}
  14. maybe clientareaproducts.tpl can be a reference . but can we use 2 tablelist in one .tpl file ? {include file="$template/includes/tablelist.tpl" tableName="ServicesList" filterColumn="4" noSortColumns="0"} <script type="text/javascript"> jQuery(document).ready( function () { var table = jQuery('#tableServicesList').removeClass('hidden').DataTable(); {if $orderby == 'product'} table.order([1, '{$sort}'], [4, 'asc']); {elseif $orderby == 'amount' || $orderby == 'billingcycle'} table.order(2, '{$sort}'); {elseif $orderby == 'nextduedate'} table.order(3, '{$sort}'); {elseif $orderby == 'domainstatus'} table.order(4, '{$sort}'); {/if} table.draw(); jQuery('#tableLoading').addClass('hidden'); }); </script> <div class="table-container clearfix"> <table id="tableServicesList" class="table table-list hidden"> <thead> <tr> <th></th> <th>{$LANG.orderproduct}</th> <th>{$LANG.clientareaaddonpricing}</th> <th>{$LANG.clientareahostingnextduedate}</th> <th>{$LANG.clientareastatus}</th> <th class="responsive-edit-button" style="display: none;"></th> </tr> </thead> <tbody> {foreach key=num item=service from=$services} <tr onclick="clickableSafeRedirect(event, 'clientarea.php?action=productdetails&amp;id={$service.id}', false)"> <td class="text-center{if $service.sslStatus} ssl-info{/if}" data-element-id="{$service.id}" data-type="service"{if $service.domain} data-domain="{$service.domain}"{/if}> {if $service.sslStatus} <img src="{$service.sslStatus->getImagePath()}" data-toggle="tooltip" title="{$service.sslStatus->getTooltipContent()}" class="{$service.sslStatus->getClass()}"/> {elseif !$service.isActive} <img src="{$BASE_PATH_IMG}/ssl/ssl-inactive-domain.png" data-toggle="tooltip" title="{lang key='sslState.sslInactiveService'}"> {/if} </td> <td><strong>{$service.product}</strong>{if $service.domain}<br /><a href="http://{$service.domain}" target="_blank">{$service.domain}</a>{/if}</td> <td class="text-center" data-order="{$service.amountnum}">{$service.amount}<br />{$service.billingcycle}</td> <td class="text-center"><span class="hidden">{$service.normalisedNextDueDate}</span>{$service.nextduedate}</td> <td class="text-center"><span class="label status status-{$service.status|strtolower}">{$service.statustext}</span></td> <td class="responsive-edit-button" style="display: none;"> <a href="clientarea.php?action=productdetails&amp;id={$service.id}" class="btn btn-block btn-info"> {$LANG.manageproduct} </a> </td> </tr> {/foreach} </tbody> </table> <div class="text-center" id="tableLoading"> <p><i class="fas fa-spinner fa-spin"></i> {$LANG.loading}</p> </div> </div>
  15. Hi, @pRieStaKos sorry for another question , the clientareainvoices.tpl file use the mysql table ‘tblinvoices’ , and in that table have no 'hostname' or 'dedicted IP' . As I know whmcs should use 'userid' Column to connect the table 'tblinvoices' and 'tblhosting' , so in this way we can try to connect with them , and get the specified tblinvoices . invoicenum.userid ------ > tblhosting.userid.dedicatedip or domain . I don't know whether this is right . And how to connect with them in the clientareainvoices.tpl page, or have they already connected by default? Relly appreciate for your help .
  16. OK , thanks @pRiestaKos . will try and update . so happy to get reply .
  17. Maybe this need to change something like dataTables.bootstrap.min.js or other js using https://datatables.net/ ? will the hook working for this ?
  18. Hi, andrezzz, and @pRieStaKos thanks for your help . Can I ask you another question . In this topic , what I need to do is to show dedicated Ip or hostname on clientareainvoices.tpl page . like this photo in attachment . Do you have any idear to do this ? and will the hook working for this ?
  19. the issue is : the invoice page is not shown now , only leave a blank. not sure why . I will check myself , thanks for your you guy's help .thanks .
  20. seems the hook page is Loaded , but not working . on page /clientarea.php?action=invoices . not showing anything . its a blank page .
  21. did't get any errors in admin area activty log . And I got this error in phpmyadmin #0 /home/wwwroot/my.xxx.com/vendor/whmcs/whmcs-foundation/lib/Invoice.php(0): WHMCS\Invoice->loadData() #1 /home/wwwroot/my.xxx.com/vendor/whmcs/whmcs-foundation/lib/Invoice.php(0): WHMCS\Invoice->getData() #2 /home/wwwroot/my.xxx.com/viewinvoice.php(0): WHMCS\Invoice->getModel() #3 {main} Message :Invalid invoice id provided Class : WHMCS\Exception\Module\NotServicable the attachment is for admin activity log .
×
×
  • 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