cumputerman Posted March 11, 2018 Share Posted March 11, 2018 How to move 'Choose Currency" (Secondarysidebar item) to the top of PrimarySidebar (secondarySidebar) in whmcs. I have created this hook but then i am unable to open pages where SecondaySidebar is not present by default. 'Choose currency" can be seen at bottom of this page https://www.seimaxim.com/cart.php?gid=12 <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaSecondarySidebar', 1, function (MenuItem $secondarySidebar) { $ChooseCurrency = $secondarySidebar->getChild('Choose Currency'); // Move the panel to the end of the sorting order so it's always displayed // as the last panel in the sidebar. $ChooseCurrency->moveToFront(); }); ----- Thanks. Link to comment Share on other sites More sharing options...
brian! Posted March 12, 2018 Share Posted March 12, 2018 18 hours ago, cumputerman said: How to move 'Choose Currency" (Secondarysidebar item) to the top of PrimarySidebar (secondarySidebar) in whmcs. if you had to do that, then it would take some effort... but fortunately you don't have to because the Cart doesn't use Primary sidebars... therefore, you should just need to set the order value of the "Choose Currency" sidebar to zero. <?php # Move Choose Currency Sidebar To The Top # Written by brian! use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaSecondarySidebar', 1, function (MenuItem $secondarySidebar) { if (!is_null($secondarySidebar->getChild('Choose Currency'))) { $secondarySidebar->getChild('Choose Currency') ->setOrder('0'); } }); as an aside, if you ever wanted to move the currency selector to the header, then I posted how to do that in the thread below... last checked on v7.3, but it should still work on later versions. Link to comment Share on other sites More sharing options...
Recommended Posts