Jump to content

Product Comments not working


nubekids

Recommended Posts

Hello, nothing coming up as js error. I've tried unisntalling and reinstalling the module, both through BO and FTP, but module keeps showing in the modules list in the BO...

nothing seems to happen when i select the comments tab

Link to comment
Share on other sites

1. you can try to enable DEV mode and see if there is any error message displayed on the page.

 

set _PS_MODE_DEV_ to true in file /config/defines.inc.php 

 

 

2. start your browser debug tool and go to Console to see if there is any javascript errors

Press F12 key when you on that page 

Link to comment
Share on other sites

1. can you also try to see if it is related to languages. 

try to choose different language if your store has more than one language.

 

2. can you also check if you have approved the review?

By default, I think the review/comments may need to be moderated - check your module configuration.

Link to comment
Share on other sites

 

Nothing, not language related either. And comments are approved. i can see there is a comment, but link is not taking me anywhere when i click on it, it just stays on the product page

 

 

if that is the case, then I guess it must something wrong with the query statement, it will need to further debug to find our what is the cause.

Link to comment
Share on other sites

  • 5 weeks later...
  • 3 months later...
  • 3 years later...

I am using P. 1.7.6.9 and whenever i try to post a message as a guest - it shows that 

"Your review cannot be sent

Sorry, your review cannot be posted."

 

But, i can see the reviews are being counted if those comments are approved at the back office. And, at the front office i couldn't check the reviews. Nothing was sowing there!!

 

Does anyone have a solution?

 

Thanks

Link to comment
Share on other sites

I have the same problem.

On 11/19/2020 at 10:04 PM, num47 said:

I am using P. 1.7.6.9 and whenever i try to post a message as a guest - it shows that 

"Your review cannot be sent

Sorry, your review cannot be posted."

 

But, i can see the reviews are being counted if those comments are approved at the back office. And, at the front office i couldn't check the reviews. Nothing was sowing there!!

 

Does anyone have a solution?

 

Thanks

Does anyone have a solution?

Link to comment
Share on other sites

4 hours ago, chattago2002 said:

I have the same problem.

Does anyone have a solution?

I am not sure if you have address "www" in your domain while setting up the website. If So, Change the url from "https://www.yourdomein.com" to "https://yourdomain.com". This solved me the problem. 

Link to comment
Share on other sites

  • 5 months later...

I have gone through all your comment and here is the solution.  

Just upgrade your module if you have not, Clear cache of your store using the performance tool. Then after that, clear your browser cache or use google chrome incognito to test.  Worked perfectly well for me.   You are free to visit my YOUTUBE CHANNEL HERE>>https://www.youtube.com/channel/UCSVVOWB0v8pgCH3Fb-AKvoA?sub_confirmation=1  AND SUBSCRIBE FOR UPDATES OF PRESTASHOP ISSUE. 

Link to comment
Share on other sites

  • 10 months later...

If anyone stumbles upon this: 
My base-theme had a custom "post-comment.js" file. In it was old/incorrect code. 

As it tried to JSON.parse an already created JSON, it always showed "Your review cannot be sent" - even though it did. 

I changed this: 

    $.post($(this).attr('action'), $(this).serialize(), function(jsonResponse) {
      var jsonData = false;
      try {
        jsonData = JSON.parse(jsonResponse);
      } catch (e) {
      }
      if (jsonData) {

Into this: 

        $.post($(this).attr('action'), $(this).serialize(), function(jsonResponse) {
            var jsonData = jsonResponse;

            if (typeof jsonResponse === "string") {
                jsonData = JSON.parse(jsonResponse);
            }

            if (jsonData) {

Or you could use the current code of the productcomments-module directly: 

    $.post($(this).attr('action'), $(this).serialize(), function(jsonData) {
      if (jsonData) {
        if (jsonData.success) {

 

Link to comment
Share on other sites

  • 1 month later...
On 5/9/2021 at 9:07 AM, Mr. Trice said:

I have gone through all your comment and here is the solution.  

Just upgrade your module if you have not, Clear cache of your store using the performance tool. Then after that, clear your browser cache or use google chrome incognito to test.  Worked perfectly well for me.   You are free to visit my YOUTUBE CHANNEL HERE>>https://www.youtube.com/channel/UCSVVOWB0v8pgCH3Fb-AKvoA?sub_confirmation=1  AND SUBSCRIBE FOR UPDATES OF PRESTASHOP ISSUE. 

Hello @Mr. Trice,

 

what version of the module do you use?
I currently have 5.0.1 and can't update, so I guess it's the latest.

I did everything else like you but I still don't see the content of the comments.

 

I see the stars but the comments section is empty (I used an approved comment).

I use your message to make some considerations about what is wrong with me.

 

What I notice is that the "product-comment-list-item" section is not even shown.

It is present in the file
/productcomments/views/templates/hook/product-comment-item-prototype.tpl

and is invoked with
{include file = 'module: productcomments / views / templates / hook / product-comment-item-prototype.tpl' assign = "comment_prototype"}
in the productcomments / views / templates / hook / product-comments-list.tpl file

So I tried to add the corresponding code block directly and I noticed that a series of variables of this type appear on the screen:
data-product-comment-id = "@ COMMENT_ID @"

If I replace the content of these variables between the @ character, the correct data is shown on the screen, so it almost seems that I cannot recover the data entered in the review.

The values of the reviews are present in links that appear as the content of the div: "product-comments-list"

Link example:
https://www.comunianvini.it/shop/module/productcomments/ListComments?id_product=2370

link content:
{"comments_nb": 1, "comments_per_page": "5", "comments": [{"id_product": "2370", "id_product_comment": "10", "title": "Spiced Beer", "content": "I find it good", "customer_name": "Daniele q.", "Date_add": "18 \ / 05 \ / 22 10:56", "grade": "4", "firstname": "Daniele", " lastname ":" q. "," usefulness ": 0," total_usefulness ": 0}]}

 

I can't figure out if something is wrong with the module or my theme, because everything works in the theme demo.

Has anyone encountered problems similar to mine?

I apologize for the long message, but it's not easy to explain.

Thanks for the attention

 

 

Link to comment
Share on other sites

On 5/19/2022 at 12:27 PM, daniele dexter said:

Hello @Mr. Trice,

 

what version of the module do you use?
I currently have 5.0.1 and can't update, so I guess it's the latest.

I did everything else like you but I still don't see the content of the comments.

 

I see the stars but the comments section is empty (I used an approved comment).

I use your message to make some considerations about what is wrong with me.

 

What I notice is that the "product-comment-list-item" section is not even shown.

It is present in the file
/productcomments/views/templates/hook/product-comment-item-prototype.tpl

and is invoked with
{include file = 'module: productcomments / views / templates / hook / product-comment-item-prototype.tpl' assign = "comment_prototype"}
in the productcomments / views / templates / hook / product-comments-list.tpl file

So I tried to add the corresponding code block directly and I noticed that a series of variables of this type appear on the screen:
data-product-comment-id = "@ COMMENT_ID @"

If I replace the content of these variables between the @ character, the correct data is shown on the screen, so it almost seems that I cannot recover the data entered in the review.

The values of the reviews are present in links that appear as the content of the div: "product-comments-list"

Link example:
https://www.comunianvini.it/shop/module/productcomments/ListComments?id_product=2370

link content:
{"comments_nb": 1, "comments_per_page": "5", "comments": [{"id_product": "2370", "id_product_comment": "10", "title": "Spiced Beer", "content": "I find it good", "customer_name": "Daniele q.", "Date_add": "18 \ / 05 \ / 22 10:56", "grade": "4", "firstname": "Daniele", " lastname ":" q. "," usefulness ": 0," total_usefulness ": 0}]}

 

I can't figure out if something is wrong with the module or my theme, because everything works in the theme demo.

Has anyone encountered problems similar to mine?

I apologize for the long message, but it's not easy to explain.

Thanks for the attention

 

 

 

Hello, I inquired from my theme support and received the following response.

The "productcomments" module is fixed in theme v2.5.6 (mine is 2.5.0) and PrestaShop 1.7.7 (mine is 1.7.6.5)"

Since updating a theme and the prestashop version are two delicate things I would avoid this solution.

In my case, I think I'm going to buy a new module to manage reviews

 

Link to comment
Share on other sites

On 5/23/2022 at 5:40 PM, daniele dexter said:

Since updating a theme and the prestashop version are two delicate things I would avoid this solution.

They are delicate, but necessary. I wouldn't avoid upgrading Prestashop too long, as new updates very often also close security vulnerabilities. 

Link to comment
Share on other sites

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