Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Sep 2012
    Posts
    253
    Plugin Contributions
    0

    Default Special Instructions or Order Comments

    I am printing the order email to a receipt printer. This receipt printer reduces the print font size to ensure that every line will fit the width of the page instead of wrapping the text. The problem I am coming across is the order confirmation page has a text box "Special Instructions or Order Comments" with what appears to be an unlimited amount of characters. How can I force a line break after say 40 characters or limit the amount of text in that box to a given number of characters. It looks like the ideal would be right around 40 characters. I would prefer to force a line break.

    Thank you for your help!

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Special Instructions or Order Comments

    This has caused me annoyances too. The comments are specifically formatted to not wrap, and there will be a way to alter that in the code. I looked a bit at it once, and in a few months it will be important to me again. I will poke at it at some point; if anyone else has time now, that would be great.

  3. #3
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Special Instructions or Order Comments

    Is this what you want?
    Name:  character_limit.JPG
Views: 287
Size:  24.9 KB
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Special Instructions or Order Comments

    I think the issue is not an overall character limit, it is that the comments appear in output with "no-wrap" formatting that can force the page to be very wide, or the printout made miniscule to accommodate the comments on one line.

    The OP suggestion of inserting breaks, or simply allowing the text to wrap naturally for the page, would make better output. (I hate scrolling far to the right to look at orders and to get to the "back" button.)
    My case is actually text attributes, which can be a long paragraph on one line.

  5. #5
    Join Date
    Sep 2012
    Posts
    253
    Plugin Contributions
    0

    Default Re: Special Instructions or Order Comments

    Ideally I would prefer the wrap. As GJH42 says if you have to scroll far over to the right on an email than the print on my receipt paper is so small sometimes a magnifying glass isn't any help to reading it. However if I can't get a word wrap than the character limit would be the next best thing. I just have to adjust it to 40-50 characters maximum.

  6. #6
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Special Instructions or Order Comments

    character count is user controlled, are you printing from admin?
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  7. #7
    Join Date
    Sep 2012
    Posts
    253
    Plugin Contributions
    0

    Default Re: Special Instructions or Order Comments

    I am using the html email that is sent to the store upon order confirmation. I then have automatic email manager check the inbox and print any incoming emails to an Epson TM-U220B receipt printer.
    It has to be automatic printing as we are a pizza delivery company and take all orders through zen-cart. So it automatically prints to the kitchen.

  8. #8
    Join Date
    Sep 2012
    Posts
    253
    Plugin Contributions
    0

    Default Re: Special Instructions or Order Comments

    Would putting something such as this in the css work? If so where would I insert it?

    Code:
    div {
      width: 50px;
      word-wrap: break-word;
      display: table-cell;
    }

  9. #9
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Special Instructions or Order Comments

    I just checked the admin order page, and it has attribute elements contained in <nobr> elements, which is a deprecated (obsolete?) tag that forbids its content from breaking to a new line. I haven't found a CSS way to overcome that yet. It may need to be altered in the PHP file (and should be, for the future).
    I haven't investigated order comments or e-mails yet.

  10. #10
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Special Instructions or Order Comments

    I edited /admin/orders.php and replaced <nobr> and </nobr> with <span class="nobr"> and </span> in three places, lines 565, 568 and 977.
    Now orders with long text attribute strings wrap to fit the space available, and apparently preserve line breaks entered in the text. I have seen no errors at this point.

    I would suggest investigating the appropriate files for other instances of the no-wrap behavior per the OP to see if they can be treated similarly.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Special Instructions or Order Comments
    By Randa in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 14 Oct 2009, 03:57 PM
  2. Special Instructions or Order Comments
    By kminnich in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 22 Oct 2008, 05:48 AM
  3. Special Instructions/Order Comments Error
    By kenaniah in forum General Questions
    Replies: 4
    Last Post: 12 Dec 2006, 06:19 AM
  4. Special Instructions or Comments About Your Order
    By vinnieb in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 15 Sep 2006, 05:01 AM

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