共计 1972 个字符,预计需要花费 5 分钟才能阅读完成。
首先先找到
<
block
type
=
"catalog/product_view_tabs"
name
=
"product.info.tabs"
as
=
"info_tabs"
template
=
"catalog/product/view/tabs.phtml"
> <
action
method
=
"addTab"
translate
=
"title"
module
=
"catalog"
><
alias
>description</
alias
><
title
>Product Description</
title
><
block
>catalog/product_view_description</
block
><
template
>catalog/product/view/description.phtml</
template
></
action
> <
action
method
=
"addTab"
translate
=
"title"
module
=
"catalog"
><
alias
>additional</
alias
><
title
>Additional Information</
title
><
block
>catalog/product_view_attributes</
block
><
template
>catalog/product/view/attributes.phtml</
template
></
action
> <
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"
> <
action
method
=
"setMayBeInvisible"
><
value
>1</
value
></
action
> </
block
> </
block
></
block
>
替换为
<
block
type
=
"catalog/product_view_tabs"
name
=
"product.info.tabs"
as
=
"info_tabs"
template
=
"catalog/product/view/tabs.phtml"
><
action
method
=
"addTab"
translate
=
"title"
module
=
"catalog"
><
alias
>description</
alias
><
title
>Product Description</
title
><
block
>catalog/product_view_description</
block
><
template
>catalog/product/view/description.phtml</
template
></
action
><
action
method
=
"addTab"
translate
=
"title"
module
=
"catalog"
><
alias
>additional</
alias
><
title
>Additional Information</
title
><
block
>catalog/product_view_attributes</
block
><
template
>catalog/product/view/attributes.phtml</
template
></
action
><
block
type
=
"review/product_view_list"
name
=
"product.info.product_additional_data"
as
=
"product_review"
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"
> <
action
method
=
"setMayBeInvisible"
><
value
>1</
value
></
action
> </
block
> </
block
></
block
>
然后在模板对应位置加入
<?php
echo
$this
->getChildHtml(
'product_review'
) ?>
这里有个要注意的地方就是,xml文件中添加模块,必须在你添加的模块里面的父级模块中添加,否则可能出现无法调用模块的问题