Prestashop 1.7.5.1-语言切换器在移动视图中不可见

时间:2019-03-05 10:03:48

标签: mobile prestashop-1.7

我正在使用Prestshop 1.7.5.1版本。在桌面视图上,语言切换器可见,但在移动视图中,它未加载。我正在使用ps_languageselector模块。我的.tpl代码在这里

<div id="_desktop_language_selector">
  <div class="lang_change_block col-xs-12 col-sm-2 col-md-1 clearfix">
    <div class="language-selector-wrapper">
      <span class="hidden-md-up">{l s='Language:' d='Shop.Theme'}</span>
      <div class="language-selector dropdown js-dropdown">
        <span class="expand-more hidden-sm-down" data-toggle="dropdown">{$current_language.name_simple}</span>
        <a data-target="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="hidden-sm-down">
          <i class="material-icons expand-more">&#xE5C5;</i>
        </a>
        <ul class="dropdown-menu hidden-sm-down">
          {foreach from=$languages item=language}
            <li {if $language.id_lang == $current_language.id_lang} class="current" {/if}>
              <a href="{url entity='language' id=$language.id_lang}" class="dropdown-item">{$language.name_simple}</a>
            </li>
          {/foreach}
        </ul>
        <select class="link hidden-md-up">
          {foreach from=$languages item=language}
            <option value="{url entity='language' id=$language.id_lang}"{if $language.id_lang == $current_language.id_lang} selected="selected"{/if}>{$language.name_simple}</option>
          {/foreach}
        </select>
      </div>
    </div>
  </div>
</div>

请帮助我解决此问题。

2 个答案:

答案 0 :(得分:0)

在我看来,您应该在选择的“ hidden-md-up”和“ hidden-sm-down”上看到该类

<ul class="dropdown-menu **hidden-sm-down**">
    {foreach from=$languages item=language}
        <li {if $language.id_lang == $current_language.id_lang} class="current" {/if}>
            <a href="{url entity='language' id=$language.id_lang}" class="dropdown-item">{$language.name_simple}</a>
        </li>
    {/foreach}
</ul>
<select class="link **hidden-md-up**">
      {foreach from=$languages item=language}
        <option value="{url entity='language' id=$language.id_lang}"{if $language.id_lang == $current_language.id_lang} selected="selected"{/if}>{$language.name_simple}</option>
      {/foreach}
 </select>

有关此类的更多信息:the other answer

答案 1 :(得分:0)

在我们的例子中,这是导致该问题的另一个加载项。将插件设置为“可移动设备”后,我就可以看到lang和货币选择器。徽标也突然出现在页面顶部的正确位置。在此之前,它有点低于。

因此,与lang附加组件一样,可能没有编程问题,但与另一个附加组件一样。