如何在产品评论页面显示产品长描述?
问题描述:
我有一个布局,需要评论页面上的产品描述。我怎样才能做到这一点?如何在产品评论页面显示产品长描述?
Magento的版本是1.6
仿佛评论页面加载产品视图模板只是没有一些信息看来, from product/view.phtml:
<div id="product-details">
<?php foreach ($this->getChildGroup('detailed_info', 'getChildHtml') as $alias => $html):?>
<div class="box-collateral <?php echo "box-{$alias}"?>">
<?php echo $html; ?>
</div>
<?php endforeach;?>
</div>
并在主要产品视图中显示详细信息,但在审查视图中没有。
答
Magento的哪个版本?产品集合是如何加载的?
您需要自定义其中一个模板位置,确保移动到您的模板中并且不要编辑基础文件。
/var/www/vhosts/site.com/www/app/design/frontend/base/default/template/review/
<?php echo $_helper->productAttribute($_product, $_product->getDescription(), 'description') ?>
这是如何装入一个标准的产品视图。
您可能必须通过<?php $_product = $this->getProduct(); ?>
和<?php $_helper = $this->helper('catalog/output'); ?>
设置$ _产品变量'code'