Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2012
    Location
    California
    Posts
    202
    Plugin Contributions
    0

    Default Extra Characters in the comment section on printed forms

    ZC 1.5.7c
    PHP 7.2
    Edit Order 4.6
    TyPackage Tracker 4.0 with corrections from GitHub

    I am getting HTML tags etc along with the comments on printed forms.
    The on screen comments do not have this issue.
    Is there a way to prevent this?

    Name:  Extra charachters in comments on printed forms.jpg
Views: 113
Size:  18.6 KB

  2. #2
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,239
    Plugin Contributions
    1

    Default Re: Extra Characters in the comment section on printed forms

    ZC v1.5.7c

    I, too, see this. (invoice.php & packingslip.php are unchanged from stock)
    Simon

  3. #3
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,239
    Plugin Contributions
    1

    Default Re: Extra Characters in the comment section on printed forms

    Looking at the ZC Github repo, I see that in ZC v1.5.8 the instances of 'zen_db_input' in admin/invoice.php & packingslip.php have been changed to 'zen_output_string_protected'. Working from this I believe that changing

    Code:
    zen_db_input
    to

    Code:
    zen_output_string
    in those two files will allow HTML to be properly displayed in the order comments fields of the packing slip and invoice previews.
    Simon

  4. #4
    Join Date
    Jun 2012
    Location
    California
    Posts
    202
    Plugin Contributions
    0

    Default Re: Extra Characters in the comment section on printed forms

    Quote Originally Posted by simon1066 View Post
    Looking at the ZC Github repo, I see that in ZC v1.5.8 the instances of 'zen_db_input' in admin/invoice.php & packingslip.php have been changed to 'zen_output_string_protected'. Working from this I believe that changing

    Code:
    zen_db_input
    to

    Code:
    zen_output_string
    in those two files will allow HTML to be properly displayed in the order comments fields of the packing slip and invoice previews.
    Thank you for the input.
    I tried your recommendation but it did not work.
    It does not break anything but the extra characters are still there.
    Your repair suggestion is on the extract from the database side, the error is occurring when the data is first being placed in the database.

  5. #5
    Join Date
    Jun 2012
    Location
    California
    Posts
    202
    Plugin Contributions
    0

    Default Re: Extra Characters in the comment section on printed forms

    Quote Originally Posted by wsworx View Post
    Thank you for the input.
    I tried your recommendation but it did not work.
    It does not break anything but the extra characters are still there.
    Your repair suggestion is on the extract from the database side, the error is occurring when the data is first being placed in the database.
    One note is that if I use the comments input window in EditOrders 4.6 I do not get the extra characters in the comments window of the order or on the invoice and packing slip. I do not want to do that though as it means extra clicking and wait time just to update shipping info. So however EO has the input setup is how ZC needs it setup.
    Last edited by wsworx; 28 Jun 2021 at 04:09 PM.

  6. #6
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,691
    Plugin Contributions
    9

    Default Re: Extra Characters in the comment section on printed forms

    in my testing, the screenshot from the OP is not an unmodified version of the invoice or the packingslip. both of these scripts only print the first comment.

    the line in question is here:

    https://github.com/zencart/zencart/b...voice.php#L293

    in my testing, the removal of the zen function does the job, ie,

    PHP Code:
    <td><?php echo ($order_history['comments'] == '' TEXT_NONE nl2br($order_history['comments'])); ?>&nbsp;</td>

    Quote Originally Posted by wsworx View Post
    One note is that if I use the comments input window in EditOrders 4.6 I do not get the extra characters in the comments window of the order or on the invoice and packing slip. I do not want to do that though as it means extra clicking and wait time just to update shipping info. So however EO has the input setup is how ZC needs it setup.
    i would not jump to such conclusions.

    my feeling is that you are using the ckeditor to edit your comments. removal of that editor and using plain text (which looks to be what EO does, despite the config value for the editor) would also resolve your problem.... although not for the comments already stored in your db. you would also lose all of the functionality that ckeditor provides.

    removal goes like so:

    admin -> tools -> define pages editor -> top right is a pull down for text editor.

    hope that helps.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  7. #7
    Join Date
    Jun 2012
    Location
    California
    Posts
    202
    Plugin Contributions
    0

    Default Re: Extra Characters in the comment section on printed forms

    Quote Originally Posted by carlwhat View Post
    in my testing, the screenshot from the OP is not an unmodified version of the invoice or the packingslip. both of these scripts only print the first comment.

    the line in question is here:

    https://github.com/zencart/zencart/b...voice.php#L293

    in my testing, the removal of the zen function does the job, ie,

    PHP Code:
    <td><?php echo ($order_history['comments'] == '' TEXT_NONE nl2br($order_history['comments'])); ?>##</td>



    i would not jump to such conclusions.

    my feeling is that you are using the ckeditor to edit your comments. removal of that editor and using plain text (which looks to be what EO does, despite the config value for the editor) would also resolve your problem.... although not for the comments already stored in your db. you would also lose all of the functionality that ckeditor provides.

    removal goes like so:

    admin -> tools -> define pages editor -> top right is a pull down for text editor.

    hope that helps.
    Thank you carlwhat, that took care of it.
    My only concern is why would they have it written that way and was it just an oversight.

 

 

Similar Threads

  1. Add a comment section to each product?
    By NekkidFish in forum General Questions
    Replies: 3
    Last Post: 2 Jun 2012, 03:28 AM
  2. Replies: 8
    Last Post: 27 Mar 2011, 04:03 PM
  3. Maximum number of characters in comment box?
    By jurjenruben in forum General Questions
    Replies: 2
    Last Post: 4 Apr 2008, 03:09 PM
  4. Comment-out a section of My Account ?
    By benjames in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 28 Jan 2007, 09:49 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR