Jump to content

sol2010

Member
  • Content Count

    360
  • Joined

  • Last visited

  • Days Won

    1

sol2010 last won the day on June 21 2021

sol2010 had the most liked content!

Community Reputation

8 Neutral

About sol2010

  • Rank
    Level 2 Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hey Lee - I did the automatic upgrade ๐Ÿ˜ Getting a few different errors now. None that are critical, just like ones above. I need to probably try upgrading all the cart, templates and hooks.... ;-( time I don't really have right now, but hey ho....
  2. I am using this hook to get additional notifications when a support department ticket is opened. However, after upgrade to PHP 8.1 and the new WHMCS version, I am getting an error; https://github.com/solaceten/WHMCS-Hooks/blob/main/includes/hooks/emergencyticket.php I'm getting an error from the code ' if (in_array($departmentid, $criticaldept)) { ' (line 26) Something went wrong and we couldn't process your request. Please go back to the previous page and try again. TypeError: in_array(): Argument #2 ($haystack) must be of type array, int given in /home/ domain /public_html/clients/includes/hooks/emergencyticket.php:26 Here is the relevent code... why is the array an issue ? function hook_send_emergency_email($vars) { $criticaldept = 5; // id of emergency department $departmentid = $vars['deptid']; $company = $vars['companyname']; if (in_array($vars['deptid'], $criticaldept)) {
  3. As per title: Version:8.6.0 (8.6.0-release.1) I went to try to add a manual order in client > add order and got this.... manual add orders were fine before 8.6 Oops! Something went wrong and we couldn't process your request. Please go back to the previous page and try again. For additional assistance, please reference the WHMCS TroubleShooting Guide ยป TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in /home/example/public_html/clients/admin/ordersadd.php:0 Stack trace: #0 /home/example/public_html/clients/admin/ordersadd.php(0): array_keys(NULL) #1 {main} Error Log [23-Nov-2022 16:53:36 ] [WHMCS Application] ERROR: TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in /home/example/public_html/clients/admin/ordersadd.php:0 Stack trace: #0 /home/example/public_html/clients/admin/ordersadd.php(0): array_keys(NULL) #1 {main} {"exception":"[object] (TypeError(code: 0): array_keys(): Argument #1 ($array) must be of type array, null given at /home/example/public_html/clients/admin/ordersadd.php:0)"} [] Steps to reproduce this: Go to a client> add order Add some items, click submit > error
  4. Check it out: https://github.com/solaceten/WHMCS-Hooks/blob/main/includes/hooks/maintenance-notification-email I've not had chance to test it yet - feel free to help test it (recommend that you test on a dev site)
  5. Thanks DennisHermannsen - I'm not sure if you are answering me, or @leemahoney3 in regards to his code suggestion. From my point of view, I simply want to post a notification on the network issue page (e.g. upcoming maintenance) and when I hit 'Save / Post' I want it to do the rest for me (inform users). TBH this should be a core feature of the software. I mean, a product that actually purports to be a Web Host Manager Complete Solution, should be able to inform customers when their web hosting solution is going to be out of action - e.g. when a notice is published..... give us the ability to tick a box 'Send notification?' What do you say @WHMCS John - Actually, I know what you'll say.... but the feature request section is not a solution, it's a graveyard of sensible ideas. ๐Ÿ˜ต
  6. Wow - that's fantastic. I will definitely test this and provide feedback. I am copying this to Github channel so that it remains available , in case of changes on this community etc? https://github.com/solaceten/WHMCS-Hooks/blob/main/includes/hooks/maintenance-notification-email I'll report back when I've had a chance to test - meanwhile, the only improvement I can see straight away would be: How to have an option to send to all customers, without checking for a specific server? WHMCS does not allow us to select multiple server names when creating a network issue, so to save time (and not have to duplicate a general notification across multiple instances) we usually just create one network issue and assign it to "System " - then in the title, we add in "All servers". Could we have an option for - "If system > then send to all" - assuming they are an active client !
  7. Hi ! Thanks for your swift reply! Yes, just something simple: Subject: Maintenance Notification Body: You are receiving this as you have active services... a, b,c (maybe highlight the service that will be impacted) This is to let you know of upcoming maintenance and date: 01-01-2030 Click here for more [link to issue ]
  8. @leemahoney3 I'd like to ask for your input on this one - if you have a moment ?
  9. Hi @DennisHermannsen - any chance you could share your previous iteration? And if you don't mind telling me, what do you mean when you switched? What did you switch to?
  10. Customer trying to use Go Cardless... got this error: Access token not active It's because I had set it up on the live site as well as my dev site to test.... had to deactivate it on the dev site... Just sharing here as there was not anything about this in the docs. The only info I could find was here: https://requests.whmcs.com/idea/using-multiple-whmcs-instances-with-gocardless
  11. Thank you @leemahoney3 really good of you to help. It's working great now. https://github.com/solaceten/WHMCS-Gateway-Fees Thanks again!
  12. Thanks for assistance. I've made a few more tweaks I'm guessing the issue will be with this part: $result = select_query("tbladdonmodules", "setting,value", "setting='fee_2PC_" . $vars['paymentmethod'] . "' or setting='fee_1VAL_" . $vars[paymentmethod] . "' or setting='maxfee_" . $vars[paymentmethod] . "'"); while ($data = mysql_fetch_array($result)) { Probably need to query maxfee_ separately, Also I 'm wondering if this part should be written like this instead: // check for maxfee ? // is this enough? if (isset($maxfee) && $maxfee > 0 && $newtot => $maxfee) { $newtot == $maxfee; }
  13. @pRieStaKos Yes, it works fine, just not the maxfee part (fee cap) -- Hi @leemahoney3 I've made some tweaks and changes https://github.com/solaceten/WHMCS-Gateway-Fees/releases/tag/2.02 It's basically working with the fees, but it's not calculating the maxfee cap. Here is the code in hooks.php file - can you suggest a correction? In particular, I don't think the function below is correct. function update_gateway_fee2($vars) { $paymentmethod = $vars['paymentmethod']; delete_query("tblinvoiceitems", "invoiceid='" . $vars[invoiceid] . "' and notes='gateway_fees'"); $result = select_query("tbladdonmodules", "setting,value", "setting='fee_2PC_" . $vars['paymentmethod'] . "' or setting='fee_1VAL_" . $vars[paymentmethod] . "' or setting='maxfee_" . $vars[paymentmethod] . "'"); while ($data = mysql_fetch_array($result)) { $params[$data[0]] = $data[1]; } $fee1 = ($params['fee_1VAL_' . $paymentmethod]); $fee2 = ($params['fee_2PC_' . $paymentmethod]); $maxfee = ($params['maxfee_' . $paymentmethod]); $total = InvoiceTotal($vars['invoiceid']); if ($total > 0) { $amountdue = $fee1 + $total * $fee2 / 100; if ($fee1 > 0 & $fee2 > 0) { $newtot = $fee1 . '+' . $fee2 . "%"; } elseif ($fee2 > 0) { $newtot = $fee2 . "%"; } elseif ($fee1 > 0) { $newtot = $fee1; } // check for maxfee ? // is this enough? if (isset($maxfee) & $maxfee > 0 & $newtot > $maxfee) { $newtot = $maxfee; } } if ($newtot) { insert_query("tblinvoiceitems", array( "userid" => $_SESSION['uid'], "invoiceid" => $vars[invoiceid], "type" => "Fee", "notes" => "gateway_fees", "description" => getGatewayName2($vars['paymentmethod']) . " Fees ($newtot)", "amount" => $amountdue, "taxed" => "0", "duedate" => "now()", "paymentmethod" => $vars[paymentmethod] )); } updateInvoiceTotal($vars[invoiceid]); }
  14. What's the latest on this ?
×
×
  • 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