Jump to content

Edit History

Flitepal

Flitepal

How to do that on PrestaShop8:

Go to:

/public_html/modules/productcomments/views/templates/hook/post-comment-modal.tpl

Find this div:

                        <div
                          class="grade-stars"
                          data-grade="3"
                          data-input="criterion[{$criterion.id_product_comment_criterion}]">
                        </div>

Change 3 to 5

Then go to:

/public_html/modules/productcomments/views/js/post-comment.js

go to  function clearPostCommentForm()

  function clearPostCommentForm() {
    $('#post-product-comment-form input[type="text"]').val('');
    $('#post-product-comment-form input[type="text"]').removeClass('valid error');
    $('#post-product-comment-form textarea').val('');
    $('#post-product-comment-form textarea').removeClass('valid error');
    $('#post-product-comment-form .criterion-rating input').val(3).trigger('change');
  }

Last line in this function change 3 to 5 in val(). This covers the issue when the form is reloaded and the grade is 3 again.

After all done, go to Advanced Parameters -> Performance and clear your cache. For me it wouldn't work unless I do it. Refresh page and enjoy. You've just put an end to your customers leaving excellent reviews with 3 out of 5 stars by mistake.

Flitepal

Flitepal

How to do that on PrestaShop8:

Go to:

/public_html/modules/productcomments/views/templates/hook/post-comment-modal.tpl

Find this div:

                        <div
                          class="grade-stars"
                          data-grade="3"
                          data-input="criterion[{$criterion.id_product_comment_criterion}]">
                        </div>

Change 3 to 5

Then go to:

/public_html/modules/productcomments/views/js/post-comment.js

go to  function clearPostCommentForm()

  function clearPostCommentForm() {
    $('#post-product-comment-form input[type="text"]').val('');
    $('#post-product-comment-form input[type="text"]').removeClass('valid error');
    $('#post-product-comment-form textarea').val('');
    $('#post-product-comment-form textarea').removeClass('valid error');
    $('#post-product-comment-form .criterion-rating input').val(3).trigger('change');
  }

Last line in this function change 3 to 5 in val(). This covers the issue when the form is reloaded and the grade is 3 again.

After all done, go to Advanced Parameters -> Performance and clear your cache. For me it wouldn't work unless I do it. Refresh page and enjoy. You've just put an end to your customers leaving excellent reviews with 3 out of 5 stars.

Flitepal

Flitepal

How to do that on PrestaShop8:

Go to:

/public_html/modules/productcomments/views/templates/hook/post-comment-modal.tpl

Find this div:

                        <div
                          class="grade-stars"
                          data-grade="3"
                          data-input="criterion[{$criterion.id_product_comment_criterion}]">
                        </div>

Change 3 to 5

Then go to:

/modules/productcomments/views/js/post-comment.js

go to  function clearPostCommentForm()

  function clearPostCommentForm() {
    $('#post-product-comment-form input[type="text"]').val('');
    $('#post-product-comment-form input[type="text"]').removeClass('valid error');
    $('#post-product-comment-form textarea').val('');
    $('#post-product-comment-form textarea').removeClass('valid error');
    $('#post-product-comment-form .criterion-rating input').val(3).trigger('change');
  }

Last line in this function change 3 to 5 in val(). This covers the issue when the form is reloaded and the grade is 3 again.

After all done, go to Advanced Parameters -> Performance and clear your cache. For me it wouldn't work unless I do it. Refresh page and enjoy. You've just put an end to your customers leaving excellent reviews with 3 out of 5 stars.

×
×
  • Create New...