Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2006
    Posts
    31
    Plugin Contributions
    0

    Default 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.

  2. #2
    Join Date
    Feb 2005
    Location
    Belle Vernon, Pa
    Posts
    29
    Plugin Contributions
    0

    Default Re: Redirect after submitting a review

    Which cart version are you using?

  3. #3
    Join Date
    Feb 2006
    Posts
    31
    Plugin Contributions
    0

    Default Re: Redirect after submitting a review

    Sorry for the late reply - v1.3.7

  4. #4
    Join Date
    Feb 2005
    Location
    Belle Vernon, Pa
    Posts
    29
    Plugin Contributions
    0

    Default Re: Redirect after submitting a review

    Quote Originally Posted by acetate View Post
    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

    PHP Code:
     // end send email

        
    zen_redirect(zen_href_link(FILENAME_PRODUCT_REVIEWSzen_get_all_get_params(array('action')))); 
    to

    PHP Code:
     // end send email
    zen_redirect(zen_href_link(FILENAME_PRODUCT_INFOzen_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.

  5. #5
    Join Date
    Feb 2006
    Posts
    31
    Plugin Contributions
    0

    Default Re: Redirect after submitting a review

    Hey many thanks - that works a treat :)

  6. #6
    Join Date
    Oct 2007
    Posts
    3
    Plugin Contributions
    0

    Default Re: Redirect after submitting a review

    Quote Originally Posted by md5577 View Post
    navigate to header.php located here

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


    around line # 111 change from

    PHP Code:
     // end send email

        
    zen_redirect(zen_href_link(FILENAME_PRODUCT_REVIEWSzen_get_all_get_params(array('action')))); 
    to

    PHP Code:
     // end send email
    zen_redirect(zen_href_link(FILENAME_PRODUCT_INFOzen_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?

 

 

Similar Threads

  1. Ultimate SEO Module + htaccess 301 redirect issue
    By justinanderson007 in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 31 Aug 2010, 04:12 PM
  2. Change Product Review to Site review.
    By chufty bill in forum General Questions
    Replies: 6
    Last Post: 11 Feb 2007, 01:53 PM
  3. Product Review Pending Approval: Email Titled Unreadable...
    By Peace Freak in forum Addon Language Packs
    Replies: 3
    Last Post: 24 Aug 2006, 05:01 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •