2015-01-21 47 views
0

我们在网站上使用Virtuemart,并出现以下问题。我们在网站上使用多语言,但在英文版本上,制造商会向制造商显示荷兰语和英语链接。Virtuemart 2多语言制造商双重

下面是我们使用的代码:

<?php 
/** 
* 
* Description 
* 
* @package VirtueMart 
* @subpackage Manufacturer 
* @author Kohl Patrick, Eugen Stranz 
* @link http://www.virtuemart.net 
* @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. 
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php 
* VirtueMart is free software. This version may have been modified pursuant 
* to the GNU General Public License, and as distributed it includes or 
* is derivative of works licensed under the GNU General Public License or 
* other free or open source software licenses. 
* @version $Id: default.php 2701 2011-02-11 15:16:49Z impleri $ 
*/ 

// Check to ensure this file is included in Joomla! 
defined('_JEXEC') or die('Restricted access'); 

// Category and Columns Counter 
$iColumn = 1; 
$iManufacturer = 1; 

// Calculating Categories Per Row 
$manufacturerPerRow = 3; 
if ($manufacturerPerRow != 1) { 
    $manufacturerCellWidth = ' width'.floor (100/$manufacturerPerRow); 
} else { 
    $manufacturerCellWidth = ''; 
} 

$doc = JFactory::getDocument(); 
$page_title = $doc->getTitle(); 
// Lets output the categories, if there are some 
if (!empty($this->manufacturers)) { ?> 

<script type="text/javascript"> 
jQuery.noConflict(); 
function equalHeight(group) { 
    tallest = 0; 
    group.each(function() { 
     thisHeight = jQuery(this).height(); 
     if(thisHeight > tallest) { 
     tallest = thisHeight; 
     } 
    }); 
    group.height(tallest); 
} 
jQuery(document).ready(function() { 
    equalHeight(jQuery(".sameheight")); 
}); 
</script> 

<div class="manufacturer-view-default category-view"> 
    <div class="bp_page_head_bar_cat"> 
    <h2><?php echo $page_title ?></h2> 
    </div> 

    <?php // Start the Output 
    foreach ($this->manufacturers as $manufacturer) { ?> 
    <!-- 
    <pre> 
    <?php print_r($manufacturer); ?> 
    </pre> 
    --> 
    <?php 
     // Show the horizontal seperator 
     if ($iColumn == 1 && $iManufacturer > $manufacturerPerRow) { ?> 
      <div class="horizontal-separator"></div> 
     <?php } 

     // this is an indicator wether a row needs to be opened or not 
     if ($iColumn == 1) { ?> 
     <div class="row"> 
     <?php } 

     // Manufacturer Elements 
     $manufacturerURL = JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_manufacturer_id=' . $manufacturer->virtuemart_manufacturer_id); 
     $manufacturerIncludedProductsURL = JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_manufacturer_id=' . $manufacturer->virtuemart_manufacturer_id); 
     $manufacturerImage = $manufacturer->images[0]->displayMediaFull("",false); 

     // Show Category ?> 
     <div class="manufacturer category floatleft<?php echo $manufacturerCellWidth ?>"> 
      <div class="FWcategorybox sameheight"> 
       <center> 
        <a id="FWcategorynameImage" alias="<?php echo $manufacturer->mf_name; ?>" title="<?php echo $manufacturer->mf_name; ?>" href="<?php echo $manufacturerURL; ?>"><?php echo $manufacturerImage;?></a> 
       </center> 
        <a id="FWcategorynamelink" title="<?php echo $manufacturer->mf_name; ?>" href="<?php echo $manufacturerURL; ?>"><?php echo $manufacturer->mf_name; ?></a> 
      </div> 
     </div> 
     <?php 
     $iManufacturer ++; 

     // Do we need to close the current row now? 
     if ($iColumn == $manufacturerPerRow) { 
      echo '<div class="clear"></div></div>'; 
      $iColumn = 1; 
     } else { 
      $iColumn ++; 
     } 
    } 

    // Do we need a final closing row tag? 
    if ($iColumn != 1) { ?> 
     <div class="clear"></div> 
    </div> 
    <?php } ?> 

</div> 
<?php 
} 
?> 

对此有何建议?

+0

嗨!一段时间以来,Joomla有自己的StackExchange站点:[joomla.stackexchange.com](http://joomla.stackexchange.com)。你可能会在那里得到答案。请考虑在那里移动您的问题(将其从[SO]中删除并在[joomla.stackexchange.com](http://joomla.stackexchange.com))上粘贴问题文本。 – miroxlav 2015-01-24 13:45:55

回答

0

我找到了。调试de数据库后,我发现有一些错误的ID。所以我用正确的ID更新了错误的ID。