Fixed an issue where the correct rating variable was not being added on category page

There is some logic above the $data['products'] array that was not being applied to anything.