Magento Forum

   
Page 2 of 4
Product Reviews on a Product Page
 
nguimier
Jr. Member
 
Avatar
Total Posts:  4
Joined:  2010-03-07
Montreal
 
Northern Voyageur - 13 March 2010 01:44 PM

To fix the wrong URL here is what I did.

create a file
app/code/local/Mage/Review/Product/View/List.php

copy this into the file
...

Thanks for this.

But just a small correction: the path to create the file should be:

app/code/local/Mage/Review/Block/Product/View/List.php

Works great though!

Nicolas

 
Magento Community Magento Community
Magento Community
Magento Community
 
felsyeh
Jr. Member
 
Total Posts:  7
Joined:  2009-12-30
 

I plugged the code into app/code/local/Mage/Review/Block/Product/View/List.php but was not able to get it to work.

I want to put a link to the reviews page from the product page.  What is the code for the link and what file do you put it in?

I have this in the view.phtml:

<p><a href="<?php echo $this->getReviewsUrl() ?>#review-form"><?php echo $this->__('Be the first to review this product') ?></a></p>

 
Magento Community Magento Community
Magento Community
Magento Community
 
felsyeh
Jr. Member
 
Total Posts:  7
Joined:  2009-12-30
 

fyi I am using Magento 1.4.0.1

Is that fix only for 1.3?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Paulus
Guru
 
Total Posts:  335
Joined:  2008-07-21
 

Ugh, just noticed our
/review/product/list/id/99/category/345/#review-form

page does not display the review form at all.

I succesfully added it to the tabs with the help of this thread, but that is not enough. Can anybody PLEASE point us in the right direction as to where we can check this?
We used winmerge to compare all files in both default and our custom skin, but no luck in finding a fix. Must be some xml file i am sure, just don’t know which one:/

Help is very much appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Appmerce
Guru
 
Avatar
Total Posts:  376
Joined:  2008-05-13
Amsterdam, The Netherlands
 

For 1.4 see this solution
http://www.magentocommerce.com/boards/viewthread/8583/#t210522

It adds both reviews & the review form

 
Magento Community Magento Community
Magento Community
Magento Community
 
santosh_borate
Jr. Member
 
Total Posts:  8
Joined:  2010-03-16
 

Hi I have same problem , while displaying the reviews and review form on product detail page.

i have used following two steps.

1.  To display basic reviews on a product page, add the following line

<block type="review/product_view_list" name="product.info.product_additional_data" as="reviews" template="review/product/view/list.phtml"/>

to catalog.xml within catalog_product_view.

2. add

<?php echo $this->getChildHtml('reviews'?>

to catalog/product/view.phtml template,

But still it is not showing the reviews block on product detail page.

Can anybody please help me to understand why this is not working ??

Is there any setting is required to do this. i think i am missing something. i have cheked it in magento veriosn 1.3.2.4 and 1.4.0.1

I have set the debug mode on , it doesn’t show the review block.

Please help me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kefjuh
Jr. Member
 
Total Posts:  2
Joined:  2010-05-03
 

I searched and searched for hours to get a solution. Here’s how I did it:

Reviews laten zien in Magento Modern Theme
1.  Open /app/design/frontend/default/modern/layout/catalog.xml
2.  Search for: <catalog_product_view>
3.  Paste the following beneath it: <block type="review/product_view_list" name="product.info.product_additional_data" as="reviews" template="review/product/view/list.phtml"/>
How to show the reviews inside a tab
1.  Search for (catalog.xml) <block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs" template="catalog/product/view/tabs.phtml" >
2.  Add the following beneath it:  <action method="addTab" translate="title" module="catalog"><alias>reviews</alias><title>Reviews</title><block>review/product_view_list</block><template>review/product/view/list.phtml</template></action>
Done!

 
Magento Community Magento Community
Magento Community
Magento Community
 
usauggs
Jr. Member
 
Total Posts:  26
Joined:  2009-08-23
 

@kefujuh, what you said does not work, i wonder why, i\’m using 1.4.0.1 by the way

 
Magento Community Magento Community
Magento Community
Magento Community
 
seany
Jr. Member
 
Total Posts:  15
Joined:  2010-01-08
 

Thanks guys, I’ve added this to magento 1.4.0.1 and it works like a gem.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Matt Alexander
Member
 
Avatar
Total Posts:  44
Joined:  2009-03-25
Taos, New Mexico, USA
 
tjonnyc - 24 December 2009 01:56 PM

Hello all,

Since it seems like you guys know what you’re talking about, I’d appreciate it if you could help me out with a small issue.

I’m using Magento 1.3.2.3, with the EasyTabs extension.

The problem I’m having is with the “Write Your Review” link.

If the code

<a href="<?php echo $this->getReviewsUrl() ?>#review-form" rel="nofollow">
    
<?php echo $this->__('Add Your Review'?>
</a>

is placed inside the “Reviews” tab, it produces the following URL on the front-end:

http://www.mydomain.com/category/item.html#review-form

...which does absolutely nothing when clicked on.

In the original, it would produce the following:

http://www.mydomain.com/review/product/list/id/366/category/35/#review-form

It seems like something simple I’m overlooking (like using some other syntax instead of getReviewsUrl), but I can’t figure it out.

Why is it pointing to {current page}#review-form, instead of the specific product ID?

Is there a way to fix it?

Alternately, can anyone show me a way to create the “Add Your Review” link on some other page (i.e. as an “independent” block)?

Thanks in advance!

Enter this into your template PHTML file:

<a href="<?php echo Mage::getUrl('review/product/list', array('id' => $_product->getId())); ?>#review-form"><?php echo $this->__('Add Your Review'?></a>

 
Magento Community Magento Community
Magento Community
Magento Community
 
andysaksena
Member
 
Total Posts:  44
Joined:  2010-05-16
 
kefjuh - 17 May 2010 10:05 AM

I searched and searched for hours to get a solution. Here’s how I did it:

Reviews laten zien in Magento Modern Theme
1.  Open /app/design/frontend/default/modern/layout/catalog.xml
2.  Search for: <catalog_product_view>
3.  Paste the following beneath it: <block type="review/product_view_list" name="product.info.product_additional_data" as="reviews" template="review/product/view/list.phtml"/>
How to show the reviews inside a tab
1.  Search for (catalog.xml) <block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs" template="catalog/product/view/tabs.phtml" >
2.  Add the following beneath it:  <action method="addTab" translate="title" module="catalog"><alias>reviews</alias><title>Reviews</title><block>review/product_view_list</block><template>review/product/view/list.phtml</template></action>
Done!

Thanks man...worked for me.....

Cheers

 
Magento Community Magento Community
Magento Community
Magento Community
 
atif_kht
Jr. Member
 
Total Posts:  23
Joined:  2011-01-11
 
Rob Tull - 01 June 2009 11:11 AM

The block you guys are looking for can be found in interface/theme/layout/review.xml.

The reviews are all handled by the Review module, and all the layout is in the above file.

In this case, to display basic reviews on a product page, you want to add the following line

<block type="review/product_view_list" name="product.info.product_additional_data" as="reviews" template="review/product/view/list.phtml"/>

to your catalog.xml within catalog_product_view.

Then just make sure you add

<?php echo $this->getChildHtml('reviews'?>

to your catalog/product/view.phtml template, and you’re off and running.

Hope that helps. Cheers!

THAT WORKS GR8 FOR ME TOO AND I ALSO FOUND THE OTHER LINE TO BRING THE REVIEW FORM TOO, TO MY PAGE AFTER REVIEWS IN CASE ANY CUSTOMER WOULD LIKE TO ADD ANOTHER REVIEW.
THIS ONE WAS THE LINE I ADDED TO CATALOG JUST AFTER ABOVE MENTIONED LINE TO BE PACED FOR GETTING REVIEWS BY ROB
<block type="review/form" name="product.review.form" as="review_form">

AND CALL THIS LINE AT VIEW.PHTML
<?php echo $this->getChildHtml('review_form') ?>

 
Magento Community Magento Community
Magento Community
Magento Community
 
Matt Alexander
Member
 
Avatar
Total Posts:  44
Joined:  2009-03-25
Taos, New Mexico, USA
 
atif.kht - 17 January 2011 07:48 PM

THAT WORKS GR8 FOR ME TOO AND I ALSO FOUND THE OTHER LINE TO BRING THE REVIEW FORM TOO, TO MY PAGE AFTER REVIEWS IN CASE ANY CUSTOMER WOULD LIKE TO ADD ANOTHER REVIEW.
THIS ONE WAS THE LINE I ADDED TO CATALOG JUST AFTER ABOVE MENTIONED LINE TO BE PACED FOR GETTING REVIEWS BY ROB
<block type="review/form" name="product.review.form" as="review_form">

AND CALL THIS LINE AT VIEW.PHTML
<?php echo $this->getChildHtml('review_form') ?>

Whew, I’m getting a headache.

 
Magento Community Magento Community
Magento Community
Magento Community
 
KnausO
Jr. Member
 
Total Posts:  2
Joined:  2010-02-27
 

Hi, thanks for such great tutorials!

Also is there a way I can display just text withouth the raitng stuff? I want to use it just so users can comment on a specific products.
Can I clean up the php file to go without the rating system all you guys/girls think everything will fall apart?

thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
mellog
Jr. Member
 
Total Posts:  29
Joined:  2010-05-22
 
itchytrig - 04 November 2009 01:12 AM

Oh,

One thing I can’t seem to fix, if anyone can assist:

In order to control the number of reviews on a review page, there appears to be a toolbar / counter (dropdown selection).

As this fix, above allows for the reviews to be shown directly on a product page, we would still need to have some control on how many reviews are displayed at a time… I thought by adding this XML line to the same catalog.xml page, that this would then appear:

<block type="page/html_pager" name="product_review_list.toolbar" />

The include exists in the list.phtml that wraps around the reviews, see here:

<?php echo $this->getChildHtml('toolbar'?>

But it doesn’t… any help much appreciated!

Magento 1.4. Change the default number of reviews. Go to app\code\core\Mage\Page\Block\Html\ file Pager.php. Add to line 41 5=>5 in the row with 10=>10 etc.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 2 of 4