简体   繁体   English

未显示手机上的打开购物车journal2主题产品过滤器

[英]open cart journal2 theme product filters on mobile are not showed

I have a journal2 theme on opencart 2. I have a problem with product filters. 我在opencart 2上有一个journal2主题。产品过滤器有问题。 On the desktop they are showing up normally and on mobile they are not loaded at all. 它们在桌面上正常显示,而在移动设备上则根本没有加载。 Normally they should be rendered by $module variable in the left-column.tpl. 通常,它们应该由left-column.tpl中的$ module变量呈现。

 <?php if ($modules) { ?>
<div id="column-left" class="col-sm-3 hidden-xs side-column <?php echo $this->journal2->settings->get('flyout_column_left_active') ? 'flyout-left' : ''; ?>">
 <?php foreach ($modules as $module) { ?>
 <?php echo $module; ?>
 <?php } ?>
</div>
<?php } ?>

But the filters module doesn't appear to get to the $module variable on mobile (the other modules are showing just fine also on mobile). 但是过滤器模块在移动设备上似乎无法访问$ module变量(其他模块在移动设备上也显示得很好)。

Can anyone give a clue how I to fix this? 谁能给我一个解决方法? Where does $modules variable come from I mean the modules get added to it? $ modules变量来自哪里,我的意思是将模块添加到其中? What prevents filters to be rendered on mobile? 是什么导致过滤器无法在移动设备上呈现?

Thanks in advance! 提前致谢!

Remove hidden-xs class. 删除hidden-xs类。

This is a bootstrap class that hide content on small screens: 这是一个引导程序类,可在小屏幕上隐藏内容:

Extra small devices Phones (<768px) 小型设备电话(<768px)

Bootstrap CSS Helper Classes Reference Bootstrap CSS Helper类参考

Hmmm, I don't know how is that, but the problem was here: 嗯,我不知道那是怎么回事,但是问题出在这里:

in the /catalog/controller/module/journal2_super_filter.php
line 59

I found this line 我发现这条线

if (Journal2Cache::$mobile_detect->isMobile() && !Journal2Cache::$mobile_detect->isTablet() && $this->journal2->settings->get('responsive_design')) return;

So indeed the filters didn't get rendered on mobiles... I have commented this line out and voila - I have my filters on mobile! 因此,确实过滤器没有在手机上呈现...我已经对此行发表了评论,瞧-我的过滤器在手机上!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM