Product review in a popup
-
12-12-2019 - |
Question
what I want to do is that when the user clicks in the review's summary this opens up a popup with the review. That finally I got it with the fancybox and a hidden div that contains this
<?php echo $this->getLayout()->createBlock('review/product_view_list')->setTemplate('review/product_info_review.phtml')->toHtml(); ?>
so when you click in the summary the fancyboax loads that div. But my form doesn't work, the submit button does nothing.
Solution 3
Thanks for your suggestions but finally what I decided to do was load the tab with the review but not visible and with fancybox show that part.
Maybe later with more time I'll do it in the correct way with a controller.
OTHER TIPS
Think that best way is -
- create controller for review popup page
- add/remove blocks for review popup page - via layout
So, you load content to popup after click.
Or maybe other, think that this depends by SEO settings
Ensure that you are not nesting form tags. Fancybox strips the invalid form tag out of the nested form when it duplicates the element.
Because you are not displaying the review form you simply need to move it to the bottom of view.phtml ( out of the product add to cart form ) and your review form will work properly.