Mage Reviews
[resolved] Comment Star Ratings are not displaying (2 posts)

  1. Jason
    Posted 2 years ago #

    Everything in this plugin has been working well except for the comments area. When I click the 0-5 star rating and type out the comment text and submit, only the comment text appears. Strangely, the average rating on the page does update with the additional star rating, but the stars next to each user comment does not appear.

    I've tried changing the theme and also tested it using "posts". I've also tried putting different comments.php files into my child theme from other theme folders to see if it was fix it...no luck so far.

    Anyone been encounter this as well and haven't figured out how to fix it? Any help would be appreciated!

    The page I have been testing on (this is a "page" and not a "post"):



  2. Jason
    Posted 1 year ago #

    Had to edit the code in mage-reviews.php (in cast folder) to make the stars appear in the comments section.

    Changed the function mage_display_comment_rating($text) to this code:

    function mage_display_comment_rating($text){
    	$val = mage_get_option('reviews','display_author_rating','1');
    	global $comment;
    	if (!is_object($comment)) return $text;
    	$parent = $comment->comment_post_ID;
    	if (mage_review_post_type($parent)) {
    	/*	if ($val != '0'){ */  /* do not need to have an author rating so this if-statement is disabled 15AUG2014 */
    	/*	echo "<br />"; */ /* bump stars down below the date in comment reviews 16AUG2014 */
    		$text = $val == '1'? $text.mage_get_comment_rating($comment) : mage_get_comment_rating($comment).$text;
    		/* originally 16AUG2014 - $text = $val == '1'? mage_get_comment_rating($comment).$text : $text.mage_get_comment_rating($comment); */
    /*		} */ /* do not need to have an author rating so this if-statement is disabled 15AUG2014 */
    	return $text; /* Note - where the comment text is posted*/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.