Jump to content

kacm

Member
  • Posts

    4
  • Joined

  • Last visited

Everything posted by kacm

  1. Hi I got this code from http://docs.whmcs.com/Editing_Client_Area_Menus and i put this into hook file. Everything works fine while I am not logged in. When I log in into customer account i got 500 internal error. Anny issues? <?php add_hook('ClientAreaNavbars', 1, function () { // Get the current navigation bars. $primaryNavbar = Menu::primaryNavbar(); $secondaryNavbar = Menu::secondaryNavbar(); // Save the "Contact Us" link and remove it from the primary navigation bar. $contactUsLink = $primaryNavbar->getChild('Contact Us'); $primaryNavbar->removeChild('Contact Us'); // Add the email sales link to the link's drop-down menu. $contactUsLink->addChild('email-sales', array( 'label' => 'Email our sales team', 'uri' => 'sales@my-awesome-company.com', 'order' => 1, 'icon' => 'fa-diamond', )); // Add the call us link to the link's drop-down menu. $contactUsLink->addChild('call-us', array( 'label' => 'Call us', 'uri' => 'tel:+18005551212', 'order' => 2, 'icon' => 'fa-mobile', )); // Add the map to the company to the link's drop-down menu. $contactUsLink->addChild('map', array( 'label' => '123 Main St. AnyTown, TX 11223, USA', 'uri' => 'https:\/\/maps.google.com/maps/place/some-map-data', 'order' => 3, 'icon' => 'fa-map-marker', )); // Add the link and its drop-down children to the secondary navigation bar. $secondaryNavbar->addChild($contactUsLink); // Make sure the contact us link appears as the first item in the // secondary navigation bar. $contactUsLink->moveToFront(); });
  2. Hello, How can I show configurable option price for each product in products list? Greetings
  3. Thanks for reply <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) { if (!is_null($primarySidebar->getChild('Service Details Overview'))) { $service = Menu::context('service'); if ($service->domainStatus==="Active"){ $primarySidebar->getChild('Service Details Overview')->addChild('PortForward', array( 'label' => 'Port Forwarding', 'uri' => '/clientarea.php?action=productdetails&id=' . $_GET['id'] . '#tabPortForward', 'order' => '100' ))->setClass(( ! isset($_GET['modop']) ? 'active' : '')) ->setAttribute("dataToggleTab", "tabPortForward"); } } }); I'd like to have something like this: By default it's works only on hover. How can I make it works on active? I currently don't understand the hooks.
  4. Hi, I have a trouble. How can I add :active class in navigation menu? I am using a six template. Is it possible with hooks? Greetings
×
×
  • 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