Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Codeinwp

    (@codeinwp)

    Hi @objetsdeplaisir,

    Thank you for this feedback.

    We are taking it into consideration and we will handle it in the shortest time possible.

    Best regards.

    Thread Starter objetsdeplaisir

    (@objetsdeplaisir)

    Hi,

    Here’s a solution:

    In wp-product-review\inc\cwp_frontpage.php :

    To fix the calculation of the average grade, line 74, replace:

    if(!empty($option1_grade)) { $overall_score += $option1_grade; $iter++; }
    if(!empty($option2_grade)) { $overall_score += $option2_grade; $iter++; }
    if(!empty($option3_grade)) { $overall_score += $option3_grade; $iter++; }
    if(!empty($option4_grade)) { $overall_score += $option4_grade; $iter++; }
    if(!empty($option5_grade)) { $overall_score += $option5_grade; $iter++; }

    with:

    if(!empty($option1_grade)||$option1_grade==='0') { $overall_score += $option1_grade; $iter++; }
    if(!empty($option2_grade)||$option2_grade==='0') { $overall_score += $option2_grade; $iter++; }
    if(!empty($option3_grade)||$option3_grade==='0') { $overall_score += $option3_grade; $iter++; }
    if(!empty($option4_grade)||$option4_grade==='0') { $overall_score += $option4_grade; $iter++; }
    if(!empty($option5_grade)||$option5_grade==='0') { $overall_score += $option5_grade; $iter++; }

    To fix the missing display of the “0” grades:

    • line 99, replace:
    if (!empty($option1_content) && !empty($option1_grade) &&  strtoupper($option1_content) != 'DEFAULT FEATURE 1')

    with:

    if (!empty($option1_content) && (!empty($option1_grade)||$option1_grade==='0') &&  strtoupper($option1_content) != 'DEFAULT FEATURE 1')
    • line 119, replace:
    if (!empty($option2_content) && !empty($option2_grade) && strtoupper($option2_content) != 'DEFAULT FEATURE 2')

    with:

    if (!empty($option2_content) && (!empty($option2_grade)||$option2_grade==='0') && strtoupper($option2_content) != 'DEFAULT FEATURE 2')
    • line 139, replace:
    if (!empty($option3_content) && !empty($option3_grade)&& strtoupper($option3_content) != 'DEFAULT FEATURE 3')

    with:

    if (!empty($option3_content) && (!empty($option3_grade)||$option3_grade==='0')&& strtoupper($option3_content) != 'DEFAULT FEATURE 3')
    • line 159, replace:
    if (!empty($option4_content) && !empty($option4_grade) && strtoupper($option4_content) != 'DEFAULT FEATURE 4')

    with:

    if (!empty($option4_content) && (!empty($option4_grade)||$option4_grade==='0') && strtoupper($option4_content) != 'DEFAULT FEATURE 4')
    • Line 177, replace:
    if (!empty($option5_content) && !empty($option5_grade) && strtoupper($option5_content) != 'DEFAULT FEATURE 5')

    with:

    if (!empty($option5_content) && (!empty($option5_grade)||$option5_grade==='0') && strtoupper($option5_content) != 'DEFAULT FEATURE 5')

    I hope this will help.

    Best regards

    Plugin Author Codeinwp

    (@codeinwp)

    Hi @objetsdeplaisir,

    Thank you for this feedback.

    We are taking it into consideration and we will handle it in the shortest time possible.

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Options rated 0 do not appear’ is closed to new replies.