Jump to content

Links in posmegamenu not working on smartphone


R.Shredder

Recommended Posts

Hi everyone and happy new year !

I am facing some trouble getting working links (from CMS) on mobile. Everything's fine on computer until reducing the browser to the smallest size.

my <a href=""> gets emptied and loses its ".pt_menu" class since the menu switches to pt custom menu. I cannot figure out why the link goes away and i get a # !

It seems to work for normal links from the shop but not from the CMS.

Thanks a lot to whoever can help ! :)

Have a good day

 

Edited by R.Shredder
found the solution ! (see edit history)
Link to comment
Share on other sites

I suspect the problem comes from here but I can't find it :
 

<!-- Block categories module -->
{if $blockCategTree != ''}
	<div class="pt_custommenu_mobile hidden-sm hidden-md hidden-lg">
		<div class="navbar">
			<div id="navbar-inner" class="navbar-inner navbar-inactive">
				<a class="btn-navbar fontcustom1">{l s='Category' mod='posmegamenu'}</a>
				<ul id="pt_custommenu_itemmobile" class="tree {if $isDhtml}dhtml{/if}  mobilemenu nav-collapse collapse">
					{foreach from=$blockCategTree.children item=child name=blockCategTree}
						{if $smarty.foreach.blockCategTree.last}
							{include file="$branche_tpl_path" node=$child last='true'}
						{else}
							{include file="$branche_tpl_path" node=$child}
						{/if}
					{/foreach}
					    {if isset($cms_link)} 
							{foreach from=$cms_link item=cms_link1}
								<li>
									<a href="#" class="fontcustom1" title="Contains Subs">{$cms_link1.title}</a>
								</li>
							{/foreach}
						{/if}
						{if isset($cms_cate)} 
							{foreach from=$cms_cate item=cms_cate1}
								<li>
									<a href="{$cms_cate1.link}" class="fontcustom1" title="{$cms_cate1.title}">{$cms_cate1.title}</a>
								</li>
							{/foreach}
						{/if}
						{if isset($manufacture_link)} 
							{foreach from=$manufacture_link item=manufacture_link1}
								<li>
									<a href="{$manufacture_link1.link}" class="fontcustom1" title="{$manufacture_link1.title}">{$manufacture_link1.title}</a>
								</li>
							{/foreach}
						{/if}
						{if isset($supply_link)} 
							{foreach from=$supply_link item=supply_link1}
								<li>
									<a href="{$supply_link1.link}" class="fontcustom1" title="{$supply_link1.title}">{$supply_link1.title}</a>
								</li>
							{/foreach}
						{/if}
						{if isset($custom_link)} 
							{foreach from=$custom_link item=custom_link1}
								<li>
									<a href="{$custom_link1->link}" class="fontcustom1" title="{$custom_link1->title}">{$custom_link1.title}</a>
								</li>
							{/foreach}
						{/if}
						{if isset($product_link)} 
							{foreach from=$product_link item=product_link1}
								<li>
									<a href="{$product_link1->link}" class="fontcustom1" title="{$product_link1->title}">{$product_link1.title}</a>
								</li>
							{/foreach}
						{/if}
						{if isset($all_man_link)} {$all_man_link} {/if}
						{if isset($all_sup_link)} {$all_sup_link} {/if}
				</ul>
                                <script type="text/javascript">
                                // <![CDATA[
                                        // we hide the tree only if JavaScript is activated
                                        $('div#categories_block_left ul.dhtml').hide();
                                // ]]>
                                </script>
			</div>
		</div>
</div>
{/if}
<!-- /Block categories module -->
<div class="nav-container visible-desktop hidden-xs">
    <div id="pt_custommenu" class="pt_custommenu">
        {$megamenu}
    </div>
	<div class="clearfix"></div>
</div>
<script type="text/javascript">
//<![CDATA[
var CUSTOMMENU_POPUP_EFFECT = {$effect};
var CUSTOMMENU_POPUP_TOP_OFFSET = {$top_offset};
//]]>
</script>

 

Link to comment
Share on other sites

  • 4 months later...
On ‎11‎/‎01‎/‎2018 at 5:20 PM, R.Shredder said:

found the solution. PosMegaMenu is the module used here. I modified megamenu.tpl :

I just changed the "#" to :

 


{foreach from=$cms_link item=cms_link1}
                                <li>
                                    <a href="{$cms_link1.link}" class="fontcustom1" title="Contains Subs">{$cms_link1.title}</a>
                                </li>
                            {/foreach}

 

 

 

thanks It worked!!!

Link to comment
Share on other sites

  • 2 years later...
On 1/11/2018 at 5:50 PM, R.Shredder said:

found the solution. PosMegaMenu is the module used here. I modified megamenu.tpl :

I just changed the "#" to :

 



{foreach from=$cms_link item=cms_link1}
                                <li>
                                    <a href="{$cms_link1.link}" class="fontcustom1" title="Contains Subs">{$cms_link1.title}</a>
                                </li>
                            {/foreach}

 

It worked for CMS links. But now I am facing the same issue for "Add Menu Top Link". After Adding a top menu link it iss working for desktop view but not for mobile view. Some how href is getting disappeared in mobile view. I am also using PosMegaMenu Module. My Prestashop version is: 1.6.1.24.  Please respond if anyone knows the solution.

Thanks in advance.

Edited by Ruhul.ewu00 (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...