-
- zmove
-
Total Posts: 317
Joined: 2008-04-30
|
Hi,
I saw that you can add custom tabs on the product page with the modern theme.
I could find how to add review list using this code in review.xml
<catalog_product_view> <reference name="product.info.tabs"> <action method="addTab" translate="title" module="review"> <alias>avis</alias> <title>Avis/commentaires</title> <block>review/product_view_list</block> <template>review/product/view/list_tab.phtml</template> </action> </reference> </catalog_product_view>
I found how to extend it a little to add the toolbar for example like that :
<reference name="product.info.tabs"> <block type="page/html_pager" name="product_review_list.toolbar" as="toolbar"/> <action method="addTab" translate="title" module="review"> <alias>avis</alias> <title>Commentaires</title> <block>review/product_view_list</block> <template>review/product/view/list.phtml</template> </action> </reference>
But, following the same logic, impossible to output the review form. Though, there is a <?php echo $this->getChildHtml('review_form') ?>
in the review/product/view/list.phtml file, so why the review form is not printed ?
I would add that I’m able to add the review form in a new tab using this :
<catalog_product_view> <reference name="product.info.tabs"> <action method="addTab" translate="title" module="review"> <alias>form</alias> <title>Review form</title> <block>review/form</block> <template>review/form.phtml</template> </action> </reference> </catalog_product_view>
Now, how to add the both block into only one tab ?
Any help would be appreciated. Thanks
|
|
-
- Posted: February 11 2009
-
| top
-
|
|
|
|
|
|
-
- Dustin
-
Total Posts: 160
Joined: 2008-03-13
Columbus, OH
|
I am trying to get this to work as well. I can get the tab in the bar and the reviews to load, but not the actual review form.
|
|
-
- Posted: February 20 2009
-
| top
| # 1
-
|
|
|
|
|
|
-
- zmove
-
Total Posts: 317
Joined: 2008-04-30
|
Any news on it ? I saw several magento shop implementing this feature (don’t remember what stores), so It should be possible.
|
|
-
- Posted: February 26 2009
-
| top
| # 2
-
|
|
|
|
|
|
-
- Hanneman
-
Total Posts: 7
Joined: 2007-11-15
Eindhoven, The Netherlands
|
Try this in the review tab .phtml. Maybe not the most ‘clean’ solution but it works.
The review form should also be defined in your layout xml.
<?php $layout = Mage::getSingleton('core/layout'); $block = $layout->getBlock('content')->getChild('product.info')->getChild('info_tabs')->getChild('review_form'); echo $block->toHtml(); ?>
|
|
-
- Posted: March 4 2009
-
| top
| # 3
-
|
|
|
|
|
|
-
- zmove
-
Total Posts: 317
Joined: 2008-04-30
|
Hi,
It seems to work, here is a details how I did it :
I added the call to the review form in the review.xml file, so I have that :
<catalog_product_view> <reference name="product.info.tabs"> <block type="review/form" name="product.review.form" as="review_form"/>
<action method="addTab" translate="title" module="review"> <alias>avis</alias> <title>Avis / commentaires</title> <block>review/product_view_list</block> <template>review/product/view/list.phtml</template> </action> </reference> </catalog_product_view>
In template/review/product/list.phtml, I added your code at the end.
And it works
Thank you
|
|
-
- Posted: March 11 2009
-
| top
| # 4
-
|
|
|
|
|
|
-
- skicrave
-
Total Posts: 51
Joined: 2007-12-02
|
Thanks for posting this information, this has been on my list of features to implement!
Is there any way to link directly to the reviews tab?
|
|
-
- Posted: March 17 2009
-
| top
| # 5
-
|
|
|
|
|
|
-
- Alouette
-
Total Posts: 24
Joined: 2008-05-23
|
zmove - 11 March 2009 01:58 AM Hi,
It seems to work, here is a details how I did it :
I added the call to the review form in the review.xml file, so I have that :
<catalog_product_view> <reference name="product.info.tabs"> <block type="review/form" name="product.review.form" as="review_form"/>
<action method="addTab" translate="title" module="review"> <alias>avis</alias> <title>Avis / commentaires</title> <block>review/product_view_list</block> <template>review/product/view/list.phtml</template> </action> </reference> </catalog_product_view>
In template/review/product/list.phtml, I added your code at the end.
And it works
Thank you
Works great!Thank you for your input!!
|
|
-
- Posted: May 23 2009
-
| top
| # 6
-
|
|
|
|
|
|
-
- MarvinToys
-
Total Posts: 194
Joined: 2008-07-27
|
.
i want do this with custom options but it doesnt work:
anybody an Idea ???
|
|
-
- Posted: June 10 2009
-
| top
| # 7
-
|
|
|
|
|
|
-
- Alouette
-
Total Posts: 24
Joined: 2008-05-23
|
Hello,
but how to you link the ‘ 1 review’ / add your review’ to the new review tab?
I have a new tab showing properly, but if you click on it, it will still go to the other page of review whereas I would want it to go the the Review Tab?
cheers
|
|
-
- Posted: June 16 2009
-
| top
| # 8
-
|
|
|
|
|
|
-
- Paul-xib
-
Total Posts: 116
Joined: 2009-02-02
The Netherlands
|
also struggling with this small problem.
I made some tabs. it all works fine except the reviews. they won’t show/open inside the tab reviews.
when i look at the source it is calling the review options and form. but it’s not showing. also the tabs don’t work when this happens.
What do i need to edit to fix this? i am getting nuts here
example:
http://www.grafiluxzonwering.be/offerte-aanvragen/jasno-blinds.html
|
|
-
- Posted: June 30 2009
-
| top
| # 9
-
|
|
|
|
|
|
-
- Keith Moon
-
Total Posts: 20
Joined: 2009-03-08
London
|
Hello everyone
Iâm trying to call the number of reviews a product has on tabs.phtml by using this command:
<?php echo $this->__('%d Review(s)', $this->getReviewsCount()) ?>
However, it keeps returning 0 Review(s). Am I missing something? Probably a mage, right?
Thanks a lot!
|
|
|
|
|
|
|
|
-
- skicrave
-
Total Posts: 51
Joined: 2007-12-02
|
Alouette - 16 June 2009 06:53 AM Hello,
but how to you link the ‘ 1 review’ / add your review’ to the new review tab?
I have a new tab showing properly, but if you click on it, it will still go to the other page of review whereas I would want it to go the the Review Tab?
cheers
I don’t think it’s possible with the JavaScript used to display the tabs in the modern theme. I would also like to know how to open a specific tab, but I don’t think it can be done.
|
|
|
|
|
|
|
|
-
- immaterial thought
-
Total Posts: 5
Joined: 2008-01-31
|
I have this for the most part figured out and thought I would share. I created a new list.phtml called list_tab.phtml file - shown below template/review/product/view/list_tab.phtml
The key changes are the review title link which changed to
href="review/product/view/id/<?php echo ($_review->getId()) ?>"
and the call for the review form which changed to
<?php echo $this->getLayout()->createBlock('review/form')->setBlockId('')->toHtml() ?>
I also removed the call for the toolbar from the original list.phtml file because I have not been able to get it to work yet (Does anyone have a fix for this)
<?php $_items = $this->getReviewsCollection()->getItems();?> <?php if (count($_items)):?> <div class="padder"> <ol> <?php foreach ($_items as $_review):?> <li> <a href="review/product/view/id/<?php echo ($_review->getId()) ?>"><strong><?php echo $this->htmlEscape($_review->getTitle()) ?></strong></a> <?php echo $this->__('Review by %s', $this->htmlEscape($_review->getNickname())) ?> <table class="ratings-list" cellspacing="0"> <tbody> <?php foreach ($_review->getRatingVotes() as $_vote): ?> <tr> <td class="label"><strong><?php echo $_vote->getRatingCode() ?></strong></td> <td> <div class="rating-box"> <div class="rating" style="width: <?php echo $_vote->getPercent() ?>%;"></div> </div> </td> </tr> <?php endforeach; ?> </tbody> </table> <p><?php echo nl2br($this->htmlEscape($_review->getDetail())) ?> <?php echo $this->__('(Posted on %s)', $this->formatDate($_review->getCreatedAt()), 'long') ?></p> </li> <?php endforeach; ?> </ol>
</div> <?php endif;?>
<br/> <?php echo $this->getLayout()->createBlock('review/form')->setBlockId('')->toHtml() ?>
I also made changes to the catalog.xml adding the following line to the product.info.tabs section to create the tab
<action method="addTab" translate="title" module="review"><alias>reviews</alias><title>Reviews</title><block>review/product_view_list</block><template>review/product/view/list_tab.phtml</template></action>
I hope this helps - If anyone has a fix for the toolbar not working I would appreciate it.
|
|
-
- Posted: October 15 2009
-
| top
| # 12
-
|
|
|
|
|
|
-
- skicrave
-
Total Posts: 51
Joined: 2007-12-02
|
I really wish Magento used jQuery (for lots of reasons), because it would make this task much easier. Currently it’s not possible to link directly to a tab, which means you can send people directly to the review form which makes it very hard to solicit for reviews. I’m going to have to work on this issue because we noticed a major decrease in the number of reviews when we moved them to a tab, which is unfortunate.
|
|
-
- Posted: October 26 2009
-
| top
| # 13
-
|
|
|
|
|
|
-
- strelok
-
Total Posts: 41
Joined: 2009-05-03
|
Hi,
I’m trying to add the review form to the product page too, i’m using the extension “easytabs”.
I have a big problem: the review form prints correctly, but when I click “submit”, there is no javascript validation (even if the form is empty), and the review is not posted. Instead, the product is added to the cart :-(
Does anyone know what could be happening? I checked the html generated, and the <div class=review-form-div> is exactly the same on the product page, and on the reviews page… Yet on the product page it doesn’t work…
I need help please
The form is added to the review tab on the product page with this code:
<div class="review-form-div"> <?php echo $this->getChildHtml('review_form') ?> <?php echo $this->getLayout()->createBlock('review/form')->setBlockId('product.review.form')->toHtml() ?> </div>
Strelok
|
|
-
- Posted: November 14 2009
-
| top
| # 14
-
|
|
|
|
|
|
-
- -- Maggi --
-
Total Posts: 7
Joined: 2008-12-08
|
To show the toolbar just add this code to the “content” part of “catalog_product_view” in the catalog.xml:
<block type="page/html_pager" name="product_review_list.toolbar" />
|
|
-
- Posted: January 11 2010
-
| top
| # 15
-
|
|
|
|
|
|
Connect