2016-12-22 57 views
0

我使用Joomla 3和Virtuemart 3.0.18。Joomla 3 - Virtuemart - Virtuemar產品模塊

我正在建立一個網站來顯示我的商店的產品。所以,我創建了兩個相同類型的模塊: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).') '; 
} 

它阻止我的第二個模塊再次加載相同的產品。

所以,再次感謝你!