Jump to content

tsiedsma

Retired Forum Member
  • Posts

    739
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by tsiedsma

  1. Considering the Cancellation link isn't present without the hook, there is no way it will be present and active on the cancellation page without adding it which your hook does not do. WHMCS loads a ton of crap including hooks, so I am 100% in agreement that you don't want to run more than necessary. I don't see this specific one running on every client area page load causing much of a problem based on what it actually does.
  2. It wasn't setting the active class on the cancel page. It has it's own page hook, so I guess if you notice a performance issue running this tiny bit of code on every page load, you could have two separate hooks for ClientAreaPageProductDetails and ClientAreaPageCancellation
  3. Ok, for anyone else looking to add back the Request Cancellation functionality, this is my final product. It works on the Service Details page, and when you click Cancel, it adds the menu item and makes it active. This just completes the look. <?php add_hook('ClientAreaPage', 1, function ($vars) { $primarySidebar = Menu::primarySidebar(); $ServiceActions = $primarySidebar->getChild('Service Details Actions'); if (empty($ServiceActions)) { return; } if (is_null($ServiceActions->getChild('Cancel'))) { if ($vars['status'] === "Active") { $ServiceActions->addChild('Cancel')->setLabel(Lang::trans('clientareacancelrequestbutton'))->setURI('clientarea.php?action=cancel&id=' . $vars['id'])->setOrder(40); } else if ($vars['clientareaaction'] === 'cancel') { $ServiceActions->addChild('Cancel')->setLabel(Lang::trans('clientareacancelrequestbutton'))->setURI('clientarea.php?action=cancel&id=' . $vars['id'])->setOrder(40)->setClass('list-group-item active'); } } }); <
  4. Got it! It doesn't show up on the "Cancellation" page but that's fine. The status variable is missing there and the serviceid is just id. This works for my purposes and doesn't require "GLOBAL", I hate using globals. add_hook('ClientAreaPageProductDetails', 1, function($vars) { $primarySidebar = Menu::primarySidebar(); $ServiceActions = $primarySidebar->getChild('Service Details Actions'); if (empty($ServiceActions)) { return; } if (is_null($ServiceActions->getChild('Cancel'))) { $serviceID = $vars['serviceid']; $servicestatus = $vars['status']; if ($servicestatus == "Active") { $ServiceActions->addChild('Cancel')->setLabel(Lang::trans('clientareacancelrequestbutton'))->setURI('clientarea.php?action=cancel&id='.$serviceID)->setOrder(40); } } });
  5. The hook doesn't work for me, both id and status are not in the list of smarty variables. They must get added after the hook is called! Either way, "Cancel" is not being added to the side bar, I can dump the variables in the hook so I know it's running.
  6. FYI, getVariable('var') is deprecated, you should use getTemplateVars('var') https://www.smarty.net/docs/en/api.get.template.vars.tpl
  7. LOL, aren't you helpful :D Thanks, I was thinking I'd just add text that Free Trials do not require cancellation since they auto cancel at the end of the trial period but this can work too!
  8. I don’t disagree that SSL doesn’t need a cancel option, but I if someone signs up for a free trial and wants to cancel it early, now I will be getting tickets where as before I didn’t. So now this “feature” is going to create more work!
  9. Yep, I totally over looked it. I hate that I have to hack in so much stuff via hooks! It gets frustrating. Disabling something without the option to turn it back on is not a feature, it’s a bug!
  10. Found the issue, if a product is Free or one-time like a Free Trial, it doesn't show the cancellation option. As for the upgrade option missing, the specific product I was viewing had no upgrades so that makes sense 😛 This was non-existent in 7.6.2 and now exists in 7.7.0 but I do not remember reading about this change or seeing an option to disable it.
  11. Why doesn't v4 get any love? I can't stand the look of Blend, v4 is far superior.
  12. Thanks Brian, I was afraid of that. Time to do some digging!
  13. After all these years, I still prefer v4 to Blend. Nowhere on the Intelligent Search documentation does it say it only works on the Blend theme. Will v4 support be added?
  14. Testing the 7.7.0 release in my dev environment and it appears that the cancellation and upgrade options are missing from the sidebar. Is anyone else able to confirm this? I'm testing using the six theme.
  15. I still can't understand why that would be a desirable configuration anyways. There's a reason WHMCS removed that module from the Server config...
  16. Of course there is, you configure the product to use the auto release module.
  17. Ok, I figured it out. WHMCS uses jqueryUI for some things. The version included also defines tooltip. I created and downloaded a custom version here without tooltip and it works fine. https://jqueryui.com/download/#! *Note, I cannot guarantee you won't have issues. I couldn't find any legit usages of "tooltip" in any "six" tpl files or scripts that would be impacted by this. I also gave the new file a different name and updated footer.tpl to use the new file.
  18. What version where you having issues with? I'm seeing this in the six theme with 6.1.1 Trying to add tooltips results in less than desirable behavior. The tooltip isn't confined to a bubble and once you release the trigger (mouseover or click) the tooltip text drops to the footer and is still visible. I'm doing my own troubleshooting to find a fix, but it would be nice to know if other people see similar behavior and if WHMCS staff know of a quick fix... For the records, creating an example like this doesn't work. http://getbootstrap.com/javascript/#tooltips - - - Updated - - - Here's my example:
  19. Make sure you have the server module installed. Mine is working fine on 6.1.1
  20. You have to use the full upgrade, there isn't an incremental from 5.x to 6.x Backup your database and files, absolutely.
  21. Sounds odd, I'm able to access the product details from the Products/Services page in the Admin Area. Are you sure your update went smoothly? You've got a couple of issues going on.
  22. It's always been encrypted, you need to edit the template file to make changes.
  23. You likely have a custom cart template and need to edit it. I would look for a similar line of code in your tpl files.
  24. Make sure you replace the footer.tpl. In your templates/six folder. This is the key bit of code. imgforyou.com/i/toe.png
  25. No that isn't possible by default. That other person / company would need to create an API and a provisioning module for you to use.
×
×
  • 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