If you need to rearrange the "Store" menu in WHMCS, directing single items on custom pages instead of cart grid, you can do it by mean of this hook
(TIP: keep all your navigation hooks, involving in menu management, in a single .php file!!!! Having many different files for hooks which do the same may be cause of a lot of mess!!!)
# Change Store Navbar Links Hook
# Written by brian!
use WHMCS\View\Menu\Item as MenuItem;
add_hook('ClientAreaPrimaryNavbar', 1, function(MenuItem $primaryNavbar)
{
$Store = $primaryNavbar->getChild("Store");
if (empty($Store)) {
return;
}
$StoreChildren = $Store->getChildren();
$kidslinks = array("Web Hosting", "VPS Servers");
foreach($StoreChildren as $key => $Store_details_child) {
if (in_array($key, $kidslinks)) {
if ($key === "Web Hosting"){$newlink = "webhosting.php";}
elseif ($key === "VPS Servers"){$newlink = "vps.php";}
$Store->getChild($key)->setUri($newlink);
}
}
});
(credit to brian!)