datasn.io
datasn.io

Reputation: 12877

How to edit the layout of reviews page of Magento?

If you go here, you would see the reviews page of this product. Though they have different URLs, after I turned on template hints, they seem to be using very similar templates such as the "Related Products" and the "You may also be interested in" block.

Now I want to get rid of the "Related Products" block and the "You may also be interested in" block from the reviews page. The problem is they are in frontend/default/xxxx/template/catalog/product/view.phtml which is also what the primary product page is using.

So how can I get rid of these 2 blocks without removing them from the product page?

Thanks!

Upvotes: 1

Views: 7271

Answers (2)

Vinai
Vinai

Reputation: 14182

Create a file app/design/frontend/[your_package - probably default]/[your_theme]/layout/local.xml

In that file, put the following XML:

<layout>
    <!-- layout update handle for the product review page -->
    <review_product_list>
        <remove name="catalog.product.related"/>
        <remove name="product.info.upsell"/>
    </review_product_list>
</layout>

Instead of editing core layout files, or copying core layout files to your custom theme and modifying them there, this approach ensures maximum upgradeability.

Even if you upgrade Magento or your theme, your changes won't be overwritten, nor will a local copy of the file in your theme hide the upgraded file.

Upvotes: 7

Lexperts
Lexperts

Reputation: 353

You can remove these options in the xml file review.xml Check line <!-- Product reviews page --> add these 2 lines inside <reference name="content">

<remove name="product.info.upsell" />
<remove name="catalog.product.related" />

Gr. Lex

Upvotes: 3

Related Questions