Jump to content
  • 0

Hide Client Menu Link "Payment Accounts"


INUMIO-Rob

Question

Hi everyone. I don't use any merchant accounts, and thus have disabled the ability for any "Payment Accounts" to be created by the client. A problem exists, however. The menu link still exists, and takes the client to a page with disabled functionality.

I wish to hide this link. I suspect I can do this conditionally with a bit of PHP. Before I go poking around in template files, I wanted to know if I am missing something which already provides a method to hide this link... like an addon or even a... built-in toggle within blesta?

If not, what is the template file to work in?

Screenshot from 2016-12-06 09-58-17.png

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 1

Nice, nice.

That worked a treat. I did have to remove a few more lines in order to get the entire array, but it worked as promised. Thanks for that! I'll post the snippet I removed below:

			$base_uri . "accounts/" => array(
				'name' => $this->_("Navigation.getprimaryclient.nav_paymentaccounts"),
				'active' => false,
				'secondary' => array(
					$base_uri . "accounts/" => array(
						'name' => $this->_("Navigation.getprimaryclient.nav_paymentaccounts"),
						'active' => false,
						'icon' => "fa fa-list"
					),
					$base_uri . "accounts/add/" => array(
						'name' => $this->_("Navigation.getprimaryclient.nav_paymentaccounts_add"),
						'active' => false,
						'icon' => "fa fa-plus-square"
					),
					$base_uri => array(
						'name' => $this->_("Navigation.getprimaryclient.nav_return"),
						'active' => false,
						'icon' => "fa fa-arrow-left"
					)
				)
			),

 

Link to comment
Share on other sites

  • 0

Try this:

/app/models/navigation.php

Find:

$base_uri . "accounts/" => array(
				'name' => $this->_("Navigation.getprimaryclient.nav_paymentaccounts"),
				'active' => false,
				'secondary' => array(
					$base_uri . "accounts/" => array(
						'name' => $this->_("Navigation.getprimaryclient.nav_paymentaccounts"),
						'active' => false,
						'icon' => "fa fa-list"
					),
					$base_uri . "accounts/add/" => array(
						'name' => $this->_("Navigation.getprimaryclient.nav_paymentaccounts_add"),
						'active' => false,
						'icon' => "fa fa-plus-square"
					),

And remove it and then clear the cache by removing the 1 folder in: /cache/

Link to comment
Share on other sites

  • 0
On 7/12/2016 at 2:43 AM, Licensecart said:

Try this:


/app/models/navigation.php

Find:

$base_uri . "accounts/" => array(
				'name' => $this->_("Navigation.getprimaryclient.nav_paymentaccounts"),
				'active' => false,
				'secondary' => array(
					$base_uri . "accounts/" => array(
						'name' => $this->_("Navigation.getprimaryclient.nav_paymentaccounts"),
						'active' => false,
						'icon' => "fa fa-list"
					),
					$base_uri . "accounts/add/" => array(
						'name' => $this->_("Navigation.getprimaryclient.nav_paymentaccounts_add"),
						'active' => false,
						'icon' => "fa fa-plus-square"
					),

And remove it and then clear the cache by removing the 1 folder in: /cache/

hello sir,

i wanna ask about making dropdown nav.

is it possible for everyone to make manual menu with dropdown option in client page?

is it yes, would you please help?

thanks before.

Link to comment
Share on other sites

  • 0
43 minutes ago, Dany Kurniawan said:

hello sir,

i wanna ask about making dropdown nav.

is it possible for everyone to make manual menu with dropdown option in client page?

is it yes, would you please help?

thanks before.

I'm not sure sorry, that is blesta's core file. You can just add html to the navigation with a php statement for logged in users.

Link to comment
Share on other sites

  • 0
49 minutes ago, Licensecart said:

I'm not sure sorry, that is blesta's core file. You can just add html to the navigation with a php statement for logged in users.

i have edited the navigation.php file for that. but all i can do is just add menu without dropdown style.

what about the support manager plugin? it has dropdown menu in the client page.

i look at the plugin_action table on the DB. that plugin using serialize array to make dropdown menu.

have you ever try that?

*attachment
*i wanna add "VPS" and "Dedicated Server" inside the "Our Service" Menu

drop.PNG

Link to comment
Share on other sites

  • 0
9 hours ago, Licensecart said:

I mean in the structure.pdt see getbootstrap.com mate :)

oke sir.

i have found the way i have to edit.

find this code on app/views/client/bootstrap/structure.pdt

.......

</li>
 	<?php
 		}
 	?>
	 //add the code below here
 </ul>
							
<ul class="nav navbar-nav navbar-right">
   <li class="dropdown">
     
     
.......

repalce the "//add the code below here" with the code below :

<li class="dropdown">
  <a class="dropdown-toggle" href="main-menu-link-to-navigate" data-toggle="dropdown"><i class=""></i>Main Menu To Show <b class="caret"></b></a>
	<ul class="dropdown-menu">
		<li><a href="link-to-navigate-1"><i class=""></i>Dropdown Menu To Show 1</a></li>
		<li><a href="link-to-navigate-2"><i class=""></i>Dropdown Menu To Show 2</a></li>
	</ul>
</li>

 

and here is the result :

 

jadi.PNG

 

Hope this will help anyone that want to edit the nav-menu using dropdown style. :blesta:

Thanks sir @Licensecart for your clue. :blesta:

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
Answer this question...

×   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.

Loading...
×
×
  • Create New...