Jump to content

block myaccount in permanent links as dropdown menu


Recommended Posts

  • 1 month later...

hello

at the moment this feature is not available in default prestashop menu module.

in this case it will be necessary to modify module (menu) file and modules used in the displayNav hook.

 

you want to move there only blockpermanent links ? or also other modules added to displayNav hook?

Link to comment
Share on other sites

hello

at the moment this feature is not available in default prestashop menu module.

in this case it will be necessary to modify module (menu) file and modules used in the displayNav hook.

 

you want to move there only blockpermanent links ? or also other modules added to displayNav hook?

 

well i mean myaccount block, not permanentlink block.

Thinking about it, i guess it's only a .tpl issue: i just need a custom tpl for myaccount block in case of displayNav hook, how can i have that?

Link to comment
Share on other sites

i solved in a better way: modding blockuserinfo (merging the myaccount block links)

this is the result (not css adjusted yet)

post-748713-0-24978900-1403109592_thumb.gif

 

this is the code

yourtemplate/modules/blockuserinfo/nav.tpl

<!-- Block user information module NAV  -->
{if $is_logged}
<div class="header_user_info ">
<div class="btn-group">
	
	
		<a href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}" title="{l s='View my customer account' mod='blockuserinfo'}" class="account btn" rel="nofollow"><span class="circle_icon"></span><span> {$cookie->customer_firstname} {$cookie->customer_lastname}</span></a>
	
  <button type="button" class="btn dropdown-toggle" data-toggle="dropdown">
    <span class="caret"></span>
    <span class="sr-only">Toggle Dropdown</span>
  </button>
  <ul class="dropdown-menu" role="menu">
   {if $returnAllowed}
				<li>
					<a href="{$link->getPageLink('order-follow', true)|escape:'html':'UTF-8'}" title="{l s='My merchandise returns' mod='blockmyaccount'}">
						{l s='My merchandise returns' mod='blockmyaccount'}
					</a>
				</li>
			{/if}
   <li>
				<a href="{$link->getPageLink('order-slip', true)|escape:'html':'UTF-8'}" title="{l s='My credit slips' mod='blockmyaccount'}">	{l s='My credit slips' mod='blockmyaccount'}
				</a>
			</li>
			
   <li>
				<a href="{$link->getPageLink('addresses', true)|escape:'html':'UTF-8'}" title="{l s='My addresses' mod='blockmyaccount'}">
					{l s='My addresses' mod='blockmyaccount'}
				</a>
			</li>
   <li>
				<a href="{$link->getPageLink('identity', true)|escape:'html':'UTF-8'}" title="{l s='My personal info' mod='blockmyaccount'}">
					{l s='My personal info' mod='blockmyaccount'}
				</a>
			</li>
			{if $voucherAllowed}
				<li>
					<a href="{$link->getPageLink('discount', true)|escape:'html':'UTF-8'}" title="{l s='My vouchers' mod='blockmyaccount'}">
						{l s='My vouchers' mod='blockmyaccount'}
					</a>
				</li>
				<li>
				<a class="logout" href="{$link->getPageLink('index', true, NULL, "mylogout")|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Log me out' mod='blockuserinfo'}">
			<i class="icon-unlock-alt"></i> {l s='Sign out' mod='blockuserinfo'}
		</a></li>
			{/if}
			{$HOOK_BLOCK_MY_ACCOUNT}
		</ul>
	</div>

</div>
       
{/if}
<div class="header_user_info">
	{if !$is_logged}
		
		<a class="login" href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Login to your customer account' mod='blockuserinfo'}">
			<i class="icon-user"></i> {l s='Sign in' mod='blockuserinfo'}
		</a>
		
	{/if}
</div>
<!-- /Block usmodule NAV -->
Edited by alfredopacino (see edit history)
  • Like 1
Link to comment
Share on other sites

i noticed the myaccount block strings used in userinfo block arent translated.

I saw this string format in language file

$_MODULE['<{blockmyaccount}prestashop>blockmyaccount_ecf3e4f8f34a293099620cc25d5b4d93'] = 'Blocco del mio account';
 
how can add this string in userinfo block lang file?
Edited by alfredopacino (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...