Jump to content

Change Side Menu


WebNest

Recommended Posts

Hello,

So I have gone ahead and created a hook to remove the side menu during checkout.

<?php

use WHMCS\View\Menu\Item as MenuItem;

add_hook('ClientAreaSecondarySidebar', 1, function(MenuItem $secondarySidebar)
{
   $client = Menu::context('client');

   if (is_null($client) and (!is_null($secondarySidebar->getChild('Categories')))) {
            $secondarySidebar->removeChild('Categories');
   }

   if (is_null($client) and (!is_null($secondarySidebar->getChild('Actions')))) {
            $secondarySidebar->removeChild('Actions');
   }

   if (is_null($client) and (!is_null($secondarySidebar->getChild('Choose Currency')))) {
    $secondarySidebar->removeChild('Choose Currency');
}

});

The only issue I have come across though is that the rest of the checkout still uses the right hand side of the page.

I have looked within the standard_cart directory and cannot find anything to change this any ideas on how to complete this please?

Thank you

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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