-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent MakeRatingMandatory feature breaks review in 3rd party theme #210
base: dev
Are you sure you want to change the base?
Prevent MakeRatingMandatory feature breaks review in 3rd party theme #210
Conversation
@@ -40,6 +40,8 @@ jQuery(document).ready(function () { | |||
const commentPostErrorModal = $('#product-comment-post-error'); | |||
|
|||
const criterionsList = $('#criterions_list'); | |||
if (typeof productCommentMandatoryMessage === 'undefined') | |||
productCommentMandatoryMessage = 'Please choose a rating for your review.'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has to be a translatable phrase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Certainly it is, in this template file. This PR is a patch for hummingbird 0.2.0 or third-party themes that has their own override post-comment-modal.tpl - not implemented productcomment 7.0.0's new review-mandatory feature yet. In these cases, a non-technical shop-owner will just complain ''my client can not do review after upgrading productcomment to v7.0.0'' , then an English phrase is clearly better than a broken review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text you added has to be a translatable phrase.
Please put this code to hook after line 7 on product-comments-list.tpl
and please don't change file post-comment.js |
@pawelkierklo hummingbird theme has its own override product-comments-list.tpl, so putting productCommentMandatoryMessage declaration in module template file won't solve the problem. |
The issue was locally solved in hummingbird beta but still happens in hummingbird 0.2.0.
This PR solve the issue globally for all themes. If the shop owner want to use their own translation string then they must take care escape characters themselves ;)
Before PR you will see the issue as described in the above ticket, after PR the issue won't happen.