Search the Community
Showing results for tags 'menu'.
-
Hello! Need to edit the navigation menu. Need to create a new navigation menu for WHMCS. For this you to work with hook. Who can do this editing and for how much?
-
In an add-on module (myaddon.php) under development, I'm going to define a few new menu items using hooks, like this: add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) { if (!is_null($primarySidebar->getChild('Domain Details Management'))) { $primarySidebar->getChild('Domain Details Management') ->addChild('My add on - setup') ->setLabel('My add on') ->setUri('myaddonsetup.php') ->setOrder(100); } }); Creating a new PHP file for menu items inside the module directory is annoying and confusing; is it somehow possible to make setUri point to a specific function inside the default myaddon.php file ?
-
I know this is not a WHMCS issue and was just hoping someone here happens to know something about this issue. I added a mega menu to my theme and now when I go to the cart or client section of WHMCS the menu stops working. It works on all the normal site pages. Works fine here: https://webhost.pro/ Stops working in the cart: https://webhost.pro/cart.php?a=view I just added some basic new code to the custom CSS file: /* Dropdown content (hidden by default) */ .dropdown-content1 { /* csslint ignore:start */ display: none; position: absolute; /* csslint ignore:end */ background-color: #f9f9f9; width: 100%; padding:20px 0px 20px 0px; z-index: 15; } .menu{background:#FFF;padding:35px 0;font-family:'Source Sans Pro',sans-serif}.menu .navbar-brand{padding:0}.menu .logo:hover{opacity:.5;transition:opacity .55s ease-in-out;-moz-transition:opacity .55s ease-in-out;-webkit-transition:opacity .55s ease-in-out} .menu .navbar-nav .dropdown-menu{background:#FFF;margin-top:26px;border-radius:0;padding:0;border:1px solid #dedada;border-top:none}.menu .dropdown-item{color:#013d57;font-weight:600;font-size:12px;padding:10px 30px 10px 15px;text-transform:uppercase} I also changed the header.tpl file to use the new CSS code: <!--Begin Main Menu Item--> </li><li class="nav-item .dropdown{if $category eq 'hosting'} active{/if}"> <a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Services<i class="fas fa-fw fa-caret-down icon-dropdown"></i></a> <ul class="dropdown-menu dropdown-content1"> <div class="row"> <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12"> <li><a class="dropdown-item" href="{$WEB_ROOT}/services/website-builder/"><i class="fas fa-fw fa-server"style="color:#585453"></i>Website Builder</a></li> <li><a class="dropdown-item" href="{$WEB_ROOT}/services/web-hosting/"><i class="fas fa-fw fa-server"style="color:#585453"></i>CPanel Web Hosting</a></li> <li><a class="dropdown-item" href="{$WEB_ROOT}/services/reseller-hosting/"><i class="fas fa-fw fa-users"style="color:#585453"></i>Reseller Hosting</a></li> <li><a class="dropdown-item" href="{$WEB_ROOT}/services/vps-hosting/"><i class="fas fa-fw fa-tachometer-alt"style="color:#585453"></i>VPS Hosting</a></li> <li><a class="dropdown-item" href="{$WEB_ROOT}/services/dedicated-servers/"><i class="fas fa-fw fa-tachometer-alt"style="color:#585453"></i>Dedicated Servers</a></li> <li><a class="dropdown-item" href="{$WEB_ROOT}/domainchecker.php"><i class="fas fa-fw fa-globe"style="color:#585453"></i>Register a domain name</a></li> <li><a class="dropdown-item" href="{$WEB_ROOT}/cart.php?a=add&domain=transfer"><i class="fas fa-fw fa-globe"style="color:#585453"></i>Transfer a domain name</a></li> <li><a class="dropdown-item" href="https://webhost.pro/services/ssl-certificates/"><i class="fas fa-fw fa-lock"style="color:#585453"></i>SSL certificates</a></li></div> <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12"> <section class="heromenu img-fluid"></div></ul></li> <!--End Main Menu Item--> I keep removing stuff to see what's causing it but nothing seems to let the menu work again in the cart section. I did not change anything in the cart files. Thanks for any help, I'm stumped!
-
Hi, How add sub menu affiliate whmcs? https://prnt.sc/tqwhut Thanks
-
Hi, Just trying to get some insight on adding a shopping cart icon like on this image to the WHMCS main menu. blog.webhost.pro/wp-content/uploads/2015/11/cart.jpg I can add hooks, I just have no idea how to add a hook next to the menu "account" drop down link. I also am not sure how to add an icon with a number to show how many items are in the shopping cart. I am willing pay for help as well. Any insight will help me. Thanks so much for your time. Charles
-
Hi Guys I need help here. Please see attached image. I can't delete items from my shopping cart, when I try to the pop up pops beneath my top menu as you see on the image below. This is the code for my header.tpl coz I am assuming this is where the issue is. Can you guys advise what the issue and what I can do to fix it ? Or is the issue elsewhere ? <html lang="en"> <head> <meta charset="{$charset}" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>{if $kbarticle.title}{$kbarticle.title} - {/if}{$pagetitle} - {$companyname}</title> <link rel="stylesheet" id="bootstrap-css" href="templates/{$template}/css/bootstrap/bootstrap.min.css?ver=5.2.3" type="text/css" media="all"> <link rel="stylesheet" id="bootstrap-css" href="templates/{$template}/css/style.css" type="text/css" media="all"> {include file="$template/includes/head.tpl"} {$headoutput} </head> <body data-phone-cc-input="{$phoneNumberInputStyle}"> <section class="row top_header"> <div class="container"> <div class="row"> <div class="col-sm"> <ul class="nav nav-pills pull-right"> <li><a href=“demo data”> Network Status </a> </li> {include file="$template/includes/navbar-top.tpl" navbar=$secondaryNavbar} </ul> </div> </div> </div> </section> <nav class="navbar navbar-default navbar-static-top fluid_header centered affix-top"> <div class="container"> <div class="navbar-header "> <button type="button" class="navbar-toggle collapsed navbar-left nobackground" data-toggle="collapse" data-target="#main_navigation" aria-expanded="false"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> {* <span class="responsive-menu-icon"></span> *} </button> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="main_navigation"> <ul class="nav navbar-nav navbar-right "> {include file="$template/includes/navbar.tpl" navbar=$primaryNavbar} </ul> </div> </div> </nav> {$headeroutput} {if $templatefile == 'homepage'} <section id="home-banner"> <div class="container text-center"> {if $registerdomainenabled || $transferdomainenabled} <h2>{$LANG.homebegin}</h2> <form method="post" action="domainchecker.php" id="frmDomainHomepage"> <div class="row"> <div class="col-md-8 col-md-offset-2 col-sm-10 col-sm-offset-1"> <div class="input-group input-group-lg"> <input type="text" class="form-control" name="domain" placeholder="{$LANG.exampledomain}" autocapitalize="none" data-toggle="tooltip" data-placement="left" data-trigger="manual" title="{lang key='orderForm.required'}" /> <span class="input-group-btn"> {if $registerdomainenabled} <input type="submit" class="btn search{$captcha->getButtonClass($captchaForm)}" value="{$LANG.search}" /> {/if} {if $transferdomainenabled} <input type="submit" name="transfer" class="btn transfer{$captcha->getButtonClass($captchaForm)}" value="{$LANG.domainstransfer}" /> {/if} </span> </div> </div> </div> {include file="$template/includes/captcha.tpl"} </form> {else} <h2>{$LANG.doToday}</h2> {/if} </div> </section> <div class="home-shortcuts"> <div class="container"> <div class="row"> <div class="col-md-4 hidden-sm hidden-xs text-center"> <p class="lead"> {$LANG.howcanwehelp} </p> </div> <div class="col-sm-12 col-md-8"> <ul> {if $registerdomainenabled || $transferdomainenabled} <li> <a id="btnBuyADomain" href="domainchecker.php"> <i class="fas fa-globe"></i> <p> {$LANG.buyadomain} <span>»</span> </p> </a> </li> {/if} <li> <a id="btnOrderHosting" href="cart.php"> <i class="far fa-hdd"></i> <p> {$LANG.orderhosting} <span>»</span> </p> </a> </li> <li> <a id="btnMakePayment" href="clientarea.php"> <i class="fas fa-credit-card"></i> <p> {$LANG.makepayment} <span>»</span> </p> </a> </li> <li> <a id="btnGetSupport" href="submitticket.php"> <i class="far fa-envelope"></i> <p> {$LANG.getsupport} <span>»</span> </p> </a> </li> </ul> </div> </div> </div> </div> {/if} {include file="$template/includes/verifyemail.tpl"} <section id="main-body"> <div class="container{if $skipMainBodyContainer}-fluid without-padding{/if}"> <div class="row"> {if !$inShoppingCart && ($primarySidebar->hasChildren() || $secondarySidebar->hasChildren())} {if $primarySidebar->hasChildren() && !$skipMainBodyContainer} <div class="col-md-9 pull-md-right"> {include file="$template/includes/pageheader.tpl" title=$displayTitle desc=$tagline showbreadcrumb=true} </div> {/if} <div class="col-md-3 pull-md-left sidebar"> {include file="$template/includes/sidebar.tpl" sidebar=$primarySidebar} </div> {/if} <!-- Container for main page display content --> <div class="{if !$inShoppingCart && ($primarySidebar->hasChildren() || $secondarySidebar->hasChildren())}col-md-9 pull-md-right{else}col-xs-12{/if} main-content"> {if !$primarySidebar->hasChildren() && !$showingLoginPage && !$inShoppingCart && $templatefile != 'homepage' && !$skipMainBodyContainer} {include file="$template/includes/pageheader.tpl" title=$displayTitle desc=$tagline showbreadcrumb=true} {/if}
- 1 reply
-
- Shopping Cart
- header
-
(and 1 more)
Tagged with:
-
I am trying to remove the sidebar menu "Actions" from the My Products and Services page. I have created the following hook: ``` <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar) { if (!is_null($primarySidebar->getChild('My Services Actions'))) { $primarySidebar->removeChild('My Services Actions'); } }); ``` But it is not removing the sidebar from the page /clientarea.php?action=services What am I doing wrong? Thanks, Steve
- 1 reply
-
- customizations
- menu
-
(and 2 more)
Tagged with:
-
Hi to all. I had a task to migrate old custom page (from 5th version) to 7th version. I have a problem with a primary navbar I am getting navbar with 6 items in it count(Menu::primaryNavbar()->getChildren()); // 6 But on the site in the primary navbar, there are 7 items. I tried to check out in hook the code above and got 7; There is no 'affiliates' item in the navbar. Maybe someone knows how to get full primary navbar as in all pages on the site
-
Hello, I have put the hook with the code below in the directory /includes/hooks/: ------------------------------------------------------------------ <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { $urlidr = $vars['clientsdetails']['customfields15']; if (!is_null($primaryNavbar->getChild('Services'))&&!is_null($urlidr)) { $primaryNavbar->getChild('Services') ->addChild('Emergency Contacts', array( 'label' => Lang::trans('buyResellerWebsite'), 'uri' => $systemurl.'cart.php?a=add&pid='.$urlidr, 'order' => '100', )); } }); ------------------------------------------------------------------ The issue is that the variable $urlidr = $vars['clientsdetails']['customfields15'] remains empty, even though listed among those in the page with {debug} in the file clientareahome.tpl. Anyone can help me, please? Thanks.
- 6 replies
-
- client area
- custom fields
-
(and 2 more)
Tagged with:
-
-
When our template goes mobile it has two compacted menus. Any idea how I can get rid of the top one? The one under the logo is correct, the one above is some left over code I can't seem to find. You can see them here with a mobile phone or most small tablets: https://webhost.pro/account/clientarea.php Thanks!
-
New to Bootstrap and needing some help with my mobile menu nav. I've been trying for days to change the default Boostrap dropdown menu toggle on mobile to a left slide out style mobile menu. If anyone has done something similar I'd be much appreciated! I've tried a few examples online but nothing solid worked. Thanks in advance
-
V6.01 I have a hook menu.php It is working to do what I wanted, add an item to the support menu and remove the downloads item. Cool! But when logging out from the client area it throws an error. "Fatal error: Call to a member function addChild() on a non-object in /home/steved/public_html/includes/hooks/menu.php on line 9" This implies that when someone is logging out and logout.php is being loaded, it is calling the menu hook. Reloading logout.php then redirects to index.php When logout.php is being called, by that time the $ca->isLoggedIn() flag should be false shouldn't it? So it shouldn't even see the code throwing the error. Or am I completely missing the point somewhere? $ca = new WHMCS_ClientArea(); use WHMCS\View\Menu\Item as MenuItem; if ($ca->isLoggedIn()) { add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar){ /** Add Create Ticket to the Support Menu **/ $primaryNavbar->getChild('Support')->addChild('Firewall Management', array( 'label' => 'Open a Ticket', 'uri' => 'https://domain.com/submitticket.php', 'order' => '1', )); }); add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { if (!is_null($primaryNavbar->getChild('Support'))) { $primaryNavbar->getChild('Support')->removeChild('Downloads'); } }); }
-
Hi, we decided to tackle this on our own so bear with me. We have 2 hopefully simple questions. You can see where I am here: http://webhost.pro/account/index.php 1. On the top nav menu bar I need the background to spam the full page. I tried to change the inner nav width but that messes up the text alignment. 2. The text seems blurry or pixelated, is something maybe changing the blur or clarity of the text that I can remove? Thanks!
-
Hi all, http://www.clients.huntshosting.co.uk/ As you can see my menu is a bit messy at the moment. But I'd like to have a logged in and out menu on the bar below the site's main menu So maybe when logged out there's 'Order Now | Announcements | Pre-Sales Enquiries' etc and then when logged in 'Services | Tickets' and so on,.. How would I go about doing this? Thanks in advance Ryan
- 3 replies
-
- design
- integration
-
(and 1 more)
Tagged with:
