Jump to content

plusplushosting

Member
  • Posts

    279
  • Joined

  • Last visited

About plusplushosting

Recent Profile Visitors

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

plusplushosting's Achievements

Senior Member

Senior Member (3/3)

1

Reputation

  1. In one of the client account im getting that error when attempting to update the metrics. Oddly for another account in the same server is updating without issues. Before you ask...yes, the cpanel account username exist. Any idea what else i have to check? Thanx in advance! Im on 8.1.3
  2. you are around again 🙂 ? Go get some vacations man! Thanx bro. Got it working. Im sending you my kidney in a box 🙂
  3. Hi there, I have a hook like with a side bar construction like... if (!is_null($servicesSidebar->getChild('Login to Webmail'))){ $servicesSidebar->getChild('Login to Webmail')->setIcon('fa-ticket ls ls-user'); } if (!is_null($servicesSidebar->getChild('Change Password'))){ $servicesSidebar->getChild('Change Password')->setIcon('fa-ticket ls ls-padlock'); } Is there any way to know the order whmcs is using for these items and also a way to change the order on them? Thanx in advance!
  4. Hi Brian! Thanx very much! I no longer remember how many beers I owe you 🙂
  5. Hi guys, Anyone noticed an error in v8.1.3 with the ssl transations in promo banners...i already had the following in the lang files with the language translation....for example... $_LANG['store']['ssl']['promo']['rapidssl_rapidssl']['headline'] but looks like is not picking up the translation....is happening only with SSL promo/upsell banners...the weebly and the other banners are picking up the languages translations. Thanx in advance!
  6. Hi there! Hope you are safe guys! Is there any way to pull the marketconnect products details to show in a cart through the API. I see there is a way to get the whmcs products details but im not seeing any way to pull the marketconnect addons/details of each product with the API. Thanx in advance!
  7. Found it! Was conflicting with the theme hook file, i got it organized everything in one file, now looks like a decent code 🙂 Thanx very much again! Stay safe!
  8. hahaha....that crystal ball is asking for vacations i guess 🙂 I wasnt aware that ignores it if doesnt exist....every day i learn something else , you are a source of wisdom 🙂 yeah, sometimes i assume stuff which probably i have to mention. Ill try to remove all the other hook files in case any of them is breaking this and see what happen. But is very odd, just adding those two lines is erroring, without them everything is working as expected or at least is not erroring (which is not the same). Thanx again!
  9. Hi Brian! Sorry for the half info....i don't know why you are not using your crystal ball 🙂 Lets start over as im mixing almost everything at this point. yes, the code is a domain management addon and it insert the menu on certain situations on certain domains....so i guess when the link of that icon which is attempting to change is not there, is when is trowing the error. So i guess before the ->getChild('Domain Forwarding') line should be an IF to first check if that link is there. I mixed up things i guess...my original code to change the icon was: <?php #remove some links from sidebar and change a domain forwarding link icon use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar) { if (!is_null($primarySidebar->getChild('Domain Details Management'))) { $primarySidebar->getChild('Domain Details Management') ->removeChild('Get EPP Code') ->getChild ('Domain Forwarding') ->setIcon ('fas fa-ticket ls ls-pen'); } }); But then when you have provided me the link to the code to change the secondarsidebar icons using foreach, i have attempted to use that code (the one in the 4th post) to change the icon in the primaysidebar...and as you can see and guess, without luck, hahaha btw, i have many functions in the same hook file for the same sidebar, is ok? simply changing the priority number on each is the correct way? I mean, to not conflict each other. As far as i can see is working ok, unless i do add those 2 last lines in the function above. Ahh btw...this is the error....i have renamed the sensitive info Error: Call to a member function setIcon() on null in /home/username/public_html/whmcsdir/templates/themename/core/hooks/hookfile.php:15 Stack trace: #0 /home/username/public_html/whmcsdir/includes/hookfunctions.php(0): RSThemes\Service\Hooks->{closure}(Object(WHMCS\View\Menu\Item)) #1 /home/username/public_html/whmcsdir/vendor/whmcs/whmcs-foundation/lib/ClientArea.php(0): run_hook('ClientAreaPrima...', Array, true) #2 /home/username/public_html/whmcsdir/vendor/whmcs/whmcs-foundation/lib/ClientArea.php(0): WHMCS\ClientArea->outputWithoutExit() #3 /home/username/public_html/whmcsdir/vendor/whmcs/whmcs-foundation/lib/Http/Message/AbstractViewableResponse.php(0): WHMCS\ClientArea->getOutputContent() #4 /home/username/public_html/whmcsdir/vendor/zendframework/zend-diactoros/src/Response/SapiEmitterTrait.php(27): WHMCS\Http\Message\AbstractViewableResponse->getBody() #5 /home/username/public_html/whmcsdir/vendor/zendframework/zend-diactoros/src/Response/SapiEmitter.php(34): Zend\Diactoros\Response\SapiEmitter->injectContentLength(Object(WHMCS\ClientArea)) #6 /home/username/public_html/whmcsdir/clientarea.php(0): Zend\Diactoros\Response\SapiEmitter->emit(Object(WHMCS\ClientArea)) #7 {main} Thanx!
  10. I have modified your code but i havent got it working 😞 <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar) { $ActionDetails = $primarySidebar->getChild("Domain Details Management"); if (empty($ActionDetails)) { return; } $ActionDetailsChildren = $ActionDetails->getChildren(); $kidsToIcon = ["Domain Forwarding"]; foreach($ActionDetailsChildren as $key => $Action_details_child) { if (in_array($key, $kidsToIcon)) { if ($key === "Domain Forwarding"){$newicon = "fas fa-ticket ls ls-pen";} $ActionDetails->getChild($key)->setIcon($newicon); } } });
  11. Thanx very much Brian! I worked it out with your help and that code! Just another thing now is conflicting...based in the code i posted above.....in certain menues is happening that the child "A Records" doesn't exist, so is trowing me error (ooopps) ...should i put an IF there? I have attempted but looks like im not finding the correct one 😞 Thanx! Have a great weekend!
  12. well....is like buying me a Maserati and don't give me the key 🙂 Thanx very much man! Have a great weekend!
  13. Hi, im trying to use this hook which is changing only one of the links icon, but is there any way to change all the links with few lines or i have to create a function for every one? add_hook('ClientAreaSecondarySidebar', 1, function(MenuItem $secondarySidebar) { if (!is_null($secondarySidebar->getChild('itemname'))) { $secondarySidebar->getChild('itemname') ->getChild('A Records') ->setIcon('fad fa-pencil'); } }); Thanx in advance!
×
×
  • 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