如何修改magento产品信息 评论form 默认显示在一个页面(以magento1.9.2为例)
第一步:打开app/design/frontend/default/你的模板/layout/review.xml
复制以下代码:
<block type="page/html_pager" name="product_review_list.toolbar" />
<block type="core/template" name="product_review_list.count" template="review/product/view/count.phtml" />
<block type="review/product_view_list" name="product.info.product_additional_data" as="product_additional_data" template="review/product/view/list.phtml">
<block type="review/form" name="product.review.form" as="review_form">
<block type="page/html_wrapper" name="product.review.form.fields.before" as="form_fields_before" translate="label">
<label>Review Form Fields Before</label>
<action method="setMayBeInvisible"><value>1</value></action>
</block>
</block>
</block>
第二步:打开/app/design/frontend/default/你的模板/layout/catalog.xml
找到<block type="core/template" name="product_review_list.count" template="review/product/view/count.phtml" />
第三步:把第一步复制的代码粘贴到第二部代码之后
<!-- Product view-->
<block type="page/html_pager" name="product_review_list.toolbar" />
<block type="core/template" name="product_review_list.count" template="review/product/view/count.phtml" />
<block type="review/product_view_list" name="product.info.product_additional_data" as="product_additional_data" template="review/product/view/list.phtml">
<block type="review/form" name="product.review.form" as="review_form">
<block type="page/html_wrapper" name="product.review.form.fields.before" as="form_fields_before" translate="label">
<label>Review Form Fields Before</label>
<action method="setMayBeInvisible"><value>1</value></action>
</block>
</block>
</block>
<!-- Product view-->
第四步:调用echo $this->getChildHtml(‘product_additional_data’);显示