Jez Posted September 9, 2017 Share Posted September 9, 2017 Hi There, Wondering if someone could help me or indicate where I might look to stop the defaulting to the first product group when a user clicks on Browse All under Store. I'm hoping for it to list the product groups rather than take you straight to the first one. Thanks, Jez 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 9, 2017 Share Posted September 9, 2017 Hi Jez, Wondering if someone could help me or indicate where I might look to stop the defaulting to the first product group when a user clicks on Browse All under Store.I'm hoping for it to list the product groups rather than take you straight to the first one. I can think of three options, depending on exactly what you want to do... 1. if you just wanted to remove the Browse All child item and use the dropdown as a list of product groups, you could use an action hook... <?php /** * Browse All Remove Navbar Link * @author brian! */ use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { if (!is_null($primaryNavbar->getChild('Store'))) { $primaryNavbar->getChild('Store') ->removeChild('Browse Products Services') ->removeChild('Shop Divider 1'); } }); 2. if you wanted to change the link to a custom page showing product groups... <?php /** * Browse All Change Navbar Link * @author brian! */ use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { if (!is_null($primaryNavbar->getChild('Store'))) { $primaryNavbar->getChild('Store') ->getChild('Browse Products Services') ->setURI('custom.php'); } }); 3. the third option would be to modify the products.tpl page of your orderform template - by default, the old 'Slider' orderform template used to do this, but it's no longer included with WHMCS... exactly how will depend on the orderform template that you're using - an example of which is shown below... https://forum.whmcs.com/showthread.php?116082-separate-Page-for-Product-Categories 1 Quote Link to comment Share on other sites More sharing options...
Jez Posted September 15, 2017 Author Share Posted September 15, 2017 Thanks Brian, will give it a crack. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.