[英]Joomla 3 - Virtuemart - Virtuemar product module
我正在使用Joomla 3和Virtuemart 3.0.18。
我正在建立一個網站來展示我的商店的產品。 因此,我創建了2個相同類型的模塊: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; ?>
我嘗試將它們設置在相同的位置,但是不起作用。
我禁用了其中一個,其他被渲染了。 我將它們放在不同的頁面上,它們被渲染。
感謝所有查看此問題的人。
我找到了問題的原因。 在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).') ';
}
它阻止了我的第二個模塊再次加載相同的產品。
所以,再次感謝您!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.