gpt4 book ai didi

php - Virtuemart 2 多语言制造商双

转载 作者:行者123 更新时间:2023-11-29 23:11:20 29 4
gpt4 key购买 nike

我们在网站上使用 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
}
?>

对此有什么建议吗?

最佳答案

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

关于php - Virtuemart 2 多语言制造商双,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28066547/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com