Jump to content

Direct link to product review from email


andrew

Recommended Posts

OK - we are trying to get more product reviews to help customers make a better choice about what they are buying.

 

We send an email asking for a review - but that just links back to the product (even though it contains the #new_comment_form as part of the link)

 

That means that the customer has to click on "Write review" - it would be a lot better if it could load the page and automatically pop-up the fancybox form.

 

For example:

 

http://brilliantbikes.co.uk/brompton-brake-parts-and-cables/333-brompton-brake-pad-inserts.html#new_comment_form

 

I'm pretty sure it's related to js - i can get productcomments.js to pop up a "hello world" message when the page loads - but not to pop open the comments form.

 

(I use this code - not sure if it's the along the right lines)

   var hash = window.location.hash;

    if(hash == '#new_comment_form'){   
    alert( "Hello world" );
    }

 

Any help would be appreciated

 

 

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 months later...

After trying a few variants I have the popup showing with a little JS thrown in to the top of:

 

/themes/your_theme_name/modules/productcomments/productcomments.tpl

<script type="text/javascript">
jQuery(document).ready(function() {
    var hash = window.location.hash;
    if (hash == '#new_comment_form')
        $("#new_comment_tab_btn").click();
});
</script>

Tested on PS 1.5 module v2.3

  • Like 2
Link to comment
Share on other sites

  • 7 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...