Originally Posted by
simon1066
Thank you for updating this mod @swguy.
Fresh install of this mod on an existing ZC v1.57c store. HTML tags don't seem to be carried over to the comments field on the order details page.
I can for instance wrap some boilerplate comment text in <b></b>, this shows as bold in the order_comment_boilerplate page. Not so if I add the Predefined Comments to the order details page.
(I can successfully add HTML tagged text to the order details comments field, manually)
Edit: I am not using CKEditor
This seems to be caused by the introduction of this new code in Admin/orders.php
Code:
$(document).ready(function() {
$('#predefined_comments').change(function(){
val = $(":selected", this).index();
<?php if ($editor_handler !== '') { ?>
$('textarea[name="comments"]').val(commentsArray[val].comment);
<?php } else { ?>
var html_comment = $.parseHTML(commentsArray[val].comment);
var text = $(html_comment).text();
$('textarea[name="comments"]').html(text);
<?php } ?>
});
});
</script>
<?php /* EOF Zen4All Order Comment 2 of 3 */ ?>
as opposed to the previous code, which worked, of
Code:
$(document).ready(function() {
$('#predefined_comments').change(function(){
val = $(":selected", this).index();
$('textarea[name="comments"]').val(commentsArray[val].comment);
});
});
</script>
<?php /* EOF Zen4All Order Comment 2 of 3 */ ?>
Bookmarks