Jump to content

tsiedsma

Member
  • Posts

    739
  • Joined

  • Last visited

  • Days Won

    1

tsiedsma last won the day on October 31 2013

tsiedsma had the most liked content!

About tsiedsma

Recent Profile Visitors

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

tsiedsma's Achievements

Senior Member

Senior Member (3/3)

2

Reputation

  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...
×
×
  • 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