rdvapors wrote:it is a little un-nerving to see errors on your page
I can relate to that.
OC2PS wrote:One issue with OpenCart's default aggregate rating is that it truncates the fraction instead of rounding it off. So if your aggregate rating is 4.9 (i.e. anything less than perfect 5 but more than 4), then OpenCart shows rating as 4 and 4 stars. This is not good or fair as your customers might think that average rating is lower than it is. But it's even worse if you are using Rich Snippets because then this lower than real rating shows on Google results page.
So, an additional task that this extension performs from v 1.8 onwards is that it fixes the ratings. With this extension your shop shows stars based on rounded off average rating, and Google is provided accurate average rating, which seems more realistic to Google and will help your Rich Snippet show up more quickly in results, and not be snippet-spam flagged.
This is what messes up the stars. You see, the way OpenCart shows you the "right" numbers of stars (actually less than what you deserve, but whatever), by prefixing and suffixing the rating number..something like stars-?.png (where ? is a variable) so if the number OC sees is 4, it calls stars-4.png
When this extension corrects the ratings behavior of OpenCart, and makes it more accurate e.g. 4.8 instead of 4, ? takes the value 4.8 (actually 4.8000), Opencart tries to call stars-4.8000.png which is a file that doesn't exist. So this extension looks around in all the known places (everything that's packaged with core software) and fixes that.
However, if you have another module installed that is not shipped with the core, then this extension doesn't have any idea about it. The extension still tries to patch all stars but if your module is using a non-standard way to call the stars, then errors can happen.
In your case, the errors are likely happening because of the "Customers who bought this also bought" module. To eliminate the errors, you need to apply the patch suggested in the original post
OC2PS wrote:Warning
If you have added any custom modules that show rating stars, this extension may cause the stars to stop showing. The fix is simple - in the affected module's template file, change
Code: Select all
stars-<?php echo $product['rating']; ?>.png
to
Code: Select all
stars-<?php echo round($product['rating']); ?>.png