我正在使用Joomla 3和Virtuemart 3.0.18。
我正在建立一个网站来展示我店的产品。所以,我创建了两个相同类型的模块:mod_virtuemart_product。我需要其中一个展示我的最新产品和其他展示特色产品。
我的问题是我的网站只是在同一页面中显示其中一个。
请帮帮我!非常感谢你!
更新
在我的模板中,我使用如下方式加载这些模块:
<?php if ($this->countModules('modpro')) : ?>
<div class="modpro">
<div class="container">
<div class="row">
<div class="col-md-12">
<jdoc:include type="modules" name="modpro" style="xhtml" />
</div>
</div>
</div>
</div>
<?php endif; ?>
<?php if ($this->countModules('modnew')) : ?>
<div class="modnew">
<div class="container">
<div class="row">
<div class="col-md-12">
<jdoc:include type="modules" name="modnew" style="xhtml" />
</div>
</div>
</div>
</div>
<?php endif; ?>
我尝试将它们设置在相同位置,但它不起作用。
我禁用其中一个,其他人被渲染。我将它们设置在差异页面上,它们被渲染。
答案 0 :(得分:1)
感谢所有观看此问题的人。
我找到了问题的原因。在VirtueMartModelProduct类的sortSearchListQuery()函数中,我找到了这些代码行:
if(self::$_alreadyLoadedIds){
$where[] = ' p.`virtuemart_product_id`!='.implode(' AND p.`virtuemart_product_id`!=',self::$_alreadyLoadedIds).' ';
//$where[] = ' p.`virtuemart_product_id` NOT IN ('.implode(',',self::$_alreadyLoadedIds).') ';
}
它阻止我的第二个模块再次加载相同的产品。
所以,再次感谢你!