1

Is it possible to use two different layouts for these two review page URL's?

http://www.domain.com/laptop1-reviews

http://www.domain.com/review/product/list/id/33661/

Both display exactly the same content.

But is it possible to display on one of the two only the reviews and on the other URL only the reviewform?

JGeer
  • 1,418
  • 11
  • 59
  • 122
  • yes possible..... will give you full module of your previous question on tomorrow http://magento.stackexchange.com/questions/69682/load-review-form-on-external-page/70619#70619 – Amit Bera Jun 10 '15 at 18:17
  • have you check the link.. i was update. the code – Amit Bera Jun 11 '15 at 09:30
  • @AmitBera What is the URL of the review form and the reviews page? – JGeer Jun 11 '15 at 10:20
  • suppose linen-blazer-585.html is product then you can this product review page by suffix add -review-form end of product url ( linen-blazer-585.html-review-form) – Amit Bera Jun 11 '15 at 10:25
  • @AmitBera Many thanks, but now on this page: linen-blazer-585.html-review-form the entire review form is displayed. So how can I remove the reviews there and only display the review form? – JGeer Jun 11 '15 at 11:36
  • goto app/design/frontend/YourPackage/YourTemplate/template/review/product/view/list.phtml and remove all code from where except <?php echo $this->getChildHtml('review_form') ?> – Amit Bera Jun 11 '15 at 12:08
  • @AmitBera That removes the reviews also on the 'linen-blazer-585.html-reviews' page. And I want to keep 1 page with reviews and 1 page with only the form. – JGeer Jun 11 '15 at 12:12
  • @AmitBera I will, but it is not working yet. – JGeer Jun 11 '15 at 12:20
  • what is the problem...? – Amit Bera Jun 11 '15 at 12:21
  • @AmitBera The line you provide removes the reviews also on the 'linen-blazer-585.html-reviews' page. And I want to keep 1 page with reviews and 1 page with only the form. – JGeer Jun 11 '15 at 12:22
  • Dear jelle, it better to create new question... it will give you the solution... – Amit Bera Jun 11 '15 at 12:36
  • questions is mixed up... – Amit Bera Jun 11 '15 at 12:37
  • @AmitBera Why, that was my mean question of this topic. How to split the review form from the review page. – JGeer Jun 11 '15 at 13:58

1 Answers1

1

as you have follow this link Load review form on external page for this answe

Now you want to remove from reviews listing whenever try to access using review page using productUrl-review-form this type url pattern.

In this set a flag using magento registry variable which tell you the request is coming from productUrl-review-form instead of review/product/list/id/33661/

on class Dev_Productreview_Controller_Router add this code

Mage::register('review_comming_from',true);

after

$request->setAlias(
                Mage_Core_Model_Url_Rewrite::REWRITE_REQUEST_PATH_ALIAS,
                $identifier
        );

then fetch the data in

app/design/frontend/YourPackage/YourTemplate/template/review/product/view/list.‌​phtml

and check the request is coming from

    if(Mage::regsitry('review_comming_from')):
    //coming from custom page
    else:
    // magento default review page
 endif;

This condition will help you.

Amit Bera
  • 77,456
  • 20
  • 123
  • 237