Php MAGENTO 1.7-List.phtml显示不需要的“文件”;否";产品名称旁边

Php MAGENTO 1.7-List.phtml显示不需要的“文件”;否";产品名称旁边,php,magento,Php,Magento,这就是它看起来的样子: 这是我的代码: <div class="product-name"> <h22><?php echo (($_product->getResource()->getAttribute('hersteller')->getFrontend()->getValue($_product) && $_product->getResource()->

这就是它看起来的样子:

这是我的代码:

           <div class="product-name">
               <h22><?php echo (($_product->getResource()->getAttribute('hersteller')->getFrontend()->getValue($_product) && $_product->getResource()->getAttribute('hersteller')->getFrontend()->getValue($_product) != "Nein") ? $_product->getResource()->getAttribute('hersteller')->getFrontend()->getValue($_product) : ''); ?>
               <?php echo (($_product->getResource()->getAttribute('weingut')->getFrontend()->getValue($_product) && $_product->getResource()->getAttribute('weingut')->getFrontend()->getValue($_product) != "Nein") ? $_product->getResource()->getAttribute('weingut')->getFrontend()->getValue($_product) : ''); ?>
               <?php echo (($_product->getResource()->getAttribute('ob_hersteller')->getFrontend()->getValue($_product) && $_product->getResource()->getAttribute('ob_hersteller')->getFrontend()->getValue($_product) != "Nein") ? $_product->getResource()->getAttribute('ob_hersteller')->getFrontend()->getValue($_product) : ''); ?></h22></div>


奇怪的是,“否”只出现在英文版本中。我们修改了list.phtml以显示公司、制造商或葡萄园。

您正在检查某些属性是否为“Nein”,如果不是,则显示它。此属性在英语中似乎被翻译为“否”。

检查您的值是否等于“Nein”,如果与“Nein”不同,则显示它

在英文版本中,它不是“不”,它是“不”,所以它总是显示出来


您应该在文件中更改它或使用Magento的翻译功能。

仅供参考,Magento现在有自己的SE站点:Magento.stackexchange.comBTW,
不是有效的HTML标记。这让我害怕你的加价。H22有一个解释,别担心……)如何使其不显示“否”??与
$this->\uu('no')
而不是
'Nein'
dagfr比较:如果我将其更改为“否”,则在德国网站(即主网站)上显示“Nein”。我如何让它在EN和DE中消失?看看@fab comment:用$this->(No)代替'Nein',如果你在德国商店里把'No'翻译成'Nein'就行了。