Forums / General Questions / Redirect after submitting a review

Redirect after submitting a review

Locked

Started by acetate on 8 Jan 2007, 12:07 PM · Views: 1,674

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
8 Jan 2007, 12:07 PM
#1
acetate avatar

acetate

New Zenner

Join Date:
Feb 2006
Posts:
31
Plugin Contributions:
0

Redirect after submitting a review

Hi All,

I am using the dgReviews mod which shows product reviews on the main product info display page and it is working fine. What I want to be able to do however is after a user submits a review the site redirects back to the product info display page. The current default behavior is to go to the page derived from tpl_product_reviews_default.php.

Is there a way of modifying the behavior of the reviews Submit button to redirect to the product info page after submitting the review??? Or is there any easy way to do a redirect?

I've got a hack method working of putting a <meta http-equiv="refresh" content="0; url=xxx"> at the top of tpl_product_reviews_default.php but it's a poor way of doing it and you still see the reviews default page flash up for a second before the redirect happens.

Any help appreciated. Cheers.

23 Jan 2007, 12:35 PM
#3
acetate avatar

acetate

New Zenner

Join Date:
Feb 2006
Posts:
31
Plugin Contributions:
0

Re: Redirect after submitting a review

Sorry for the late reply - v1.3.7

23 Jan 2007, 8:40 PM
#4
md5577 avatar

md5577

New Zenner

Join Date:
Feb 2005
Location:
Belle Vernon, Pa
Posts:
28
Plugin Contributions:
0

Re: Redirect after submitting a review

acetate:

Sorry for the late reply - v1.3.7

navigate to header.php located here

/includes/modules/pages/product_reviews_write/header.php

around line # 111 **change from **

 // end send email

    zen_redirect(zen_href_link(FILENAME_PRODUCT_REVIEWS, zen_get_all_get_params(array('action'))));
```**to **

```php
 // end send email
zen_redirect(zen_href_link(FILENAME_PRODUCT_INFO, zen_get_all_get_params(array('action'))));
```This should work for ya, I tested it and it seems to work fine but use it at your own risk :)

**Make sure you back up your files in case you make a mistake or need to revert back to the original state of your zen cart.**
26 Jan 2007, 1:38 AM
#5
acetate avatar

acetate

New Zenner

Join Date:
Feb 2006
Posts:
31
Plugin Contributions:
0

Re: Redirect after submitting a review

Hey many thanks - that works a treat :)

28 Oct 2007, 6:12 PM
#6
bftuk avatar

bftuk

New Zenner

Join Date:
Oct 2007
Posts:
3
Plugin Contributions:
0

Re: Redirect after submitting a review

md5577:

navigate to header.php located here

/includes/modules/pages/product_reviews_write/header.php

around line # 111 **change from **

// end send email

zen_redirect(zen_href_link(FILENAME_PRODUCT_REVIEWS, zen_get_all_get_params(array('action'))));
> 
> ```php
 // end send email
zen_redirect(zen_href_link(FILENAME_PRODUCT_INFO, zen_get_all_get_params(array('action'))));
```This should work for ya, I tested it and it seems to work fine but use it at your own risk :)
> 
> **Make sure you back up your files in case you make a mistake or need to revert back to the original state of your zen cart.**

Did'nt work 100% with my install. Possibly due to using SEF urls, but the product info did not display on returing after submitting a URL and took me to this url and not the SEF one.

index.php?main_page=product_reviews&products_id=1

Any ideas?