Virtuemart 2多语言制造商翻倍

时间:2015-01-21 11:49:59

标签: php mysql joomla2.5 virtuemart

我们在具有以下问题的网站上使用Virtuemart。我们在网站上使用多语言,但在英文版本中,制造商显示了与制造商的荷兰语和英语链接。

以下是我们使用的代码:

<?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
}
?>

对此有何建议?

1 个答案:

答案 0 :(得分:0)

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