我是由我正在使用的magento主题的开发人员给出这个代码,但在我被告知的文件中放置后得到一个错误。有人能告诉我这个代码有什么问题吗?
<div class="short-description clear">
<div class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription();, 'short_description') ?></div>
</div>
在$_product->getShortDescription()
之后有一个不属于那里的额外的;
。另外,在'short_description')
之后应该有另一个右括号。将PHP行改为:
<?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription(), 'short_description')); ?>