Jump to content

[Solved] Product comments average rating not showing under product description


Recommended Posts

Hello people. I'm using the default theme of prestashop, version 1.5.6.1 with the Product comments module version 2.9.1.

 

I remember at one point that an "average rating" with stars was displayed underneath the product description. If you clicked that, you would end up at the "comments" tab, where you could read/post comments.

 

I found out that the code resides in modules/productcomments/productcomments-extra.tpl. I allowed "guest comments". It also see it hooked at: "outofstock product", "pages header", "extra product comparison", "tabs on product page", "tabs content on the product page".

 

Problem: the code doesn't seem to get loaded so I don't see the average ratings anymore (I used to see them but forgot which version. I do however still have the comments tab where I can read/post comments.

 

Question: is there a way to rollback or downgrade the module to previous versions? What could be the cause this doesn't work anymore? Other suggestions to fix this?

 

If you need the url, it's http://newdashcam.com

Edited by Administratоr (see edit history)
Link to comment
Share on other sites

Hi Admin,

 

Can you provide a link to a product that should have some rating? Now not sure if it doesn't show, or really has none...

 

pascal

Pascal,

 

This dashcam has a couple of reactions + ratings: http://newdashcam.com/nl/dashcams/8-dvr-207gs.html

Scroll down and then click the tab "Comments". They're all there. However, you shouldn't have to scroll down because at the top (under item quantity) the average star rating should be shown - with a link to the "comments" tab.

Link to comment
Share on other sites

Not sure anymore, but wasn't the stars in the product detail area another module called 'Product rating' or so?

 

 

If it was the same as above, maybe the module is not transplanted on all the hooks.

 

Does anyone who has this module installed, and working, have a list of hooks this module should be transplanted on??

Link to comment
Share on other sites

Not sure anymore, but wasn't the stars in the product detail area another module called 'Product rating' or so?

 

 

If it was the same as above, maybe the module is not transplanted on all the hooks.

 

Does anyone who has this module installed, and working, have a list of hooks this module should be transplanted on??

The code for average rating + displaying it on product page is included in this module, and it used to work correctly but suddenly (after a couple of module updates) the stars are gone. I wish there was a way to rollback a module update. Is there a way to "debug this"?

Link to comment
Share on other sites

Hello future readers of this thread.

 

The solution had to do with hooks. Apparently the module is hooked to the "outofstock" action, which means it doesn't get displayed whenever a product is in stock (usually 99% of the time).

 

So apparently in the past there was a bug in the code which caused the "outofstock" action to be displayed anyway, also displaying the average rating. Now this bug appears to be fixed, also causing the average rating to be gone.

 

Solution: hook the module to displayRightColumnProduct and there it is. I also removed the hook from the actionProductOutofStock because I don't want the module to be displayed twice if I run out of stock.

Link to comment
Share on other sites

Hi Admin,

Nice! Interesting that it worked like that. Well noticed!

 

Maybe for completeness sake, can you add the code for then new hook you created, so that others can add this to the module code when needed?

 

Thanks, and good work,

pascal.

Pascal,

 

I used the "module positioning" feature in backoffice. I selected the "productcomments" module and clicked the button on the top right "position a module" (PS not sure if that's the correct translation but you should be able to find your way with some logical thinking). Finally I selected the displayrightcolumnproduct hook (is included in the default theme of PS1.5).

 

No need to edit any files.

Link to comment
Share on other sites

×
×
  • Create New...