Announcement

Collapse
No announcement yet.

Page breaks between orders in the batch?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Page breaks between orders in the batch?

    I swear I've seen this question asked a zillion times but trying to search for it comes up with one or two results that won't help. How can a page break be inserted so that each order within a batch will print out on it's own page?

    Thanks!
    Leslie
    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

    #2
    Re: Page breaks between orders in the batch?

    http://www.w3schools.com/cssref/pr_print_pageba.asp

    Comment


      #3
      Re: Page breaks between orders in the batch?

      i thought that was built in these days?
      Bruce Golub
      Phosphor Media - "Your Success is our Business"

      Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
      phosphormedia.com

      Comment


        #4
        Re: Page breaks between orders in the batch?

        New installs it definitely is, there's some older installs that missed it and some occasional Browser issues.
        Thanks,

        Rick Wilson
        CEO
        Miva, Inc.
        [email protected]
        https://www.miva.com

        Comment


          #5
          Re: Page breaks between orders in the batch?

          Originally posted by Rick Wilson View Post
          New installs it definitely is, there's some older installs that missed it and some occasional Browser issues.
          How can I tell if it "missed it"?
          Leslie Kirk
          Miva Certified Developer
          Miva Merchant Specialist since 1997
          Previously of Webs Your Way
          (aka Leslie Nord leslienord)

          Email me: [email protected]
          www.lesliekirk.com

          Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

          Comment


            #6
            Re: Page breaks between orders in the batch?

            You should have a div with an id of order containing each order (using the printable invoice)

            The CSS should look like this:

            Code:
            .order {
                text-align: left;
                width: 690px;
                padding: 20px;
                page-break-after: always;
            }
            The page-break-after is the important attribute there.
            Last edited by Brennan; 05-22-13, 09:45 AM.
            Brennan Heyde
            VP Product
            Miva, Inc.
            [email protected]
            https://www.miva.com

            Comment


              #7
              Re: Page breaks between orders in the batch?

              Looks like it's going to wind up being a browser issue. Thanks ya'll!
              Leslie Kirk
              Miva Certified Developer
              Miva Merchant Specialist since 1997
              Previously of Webs Your Way
              (aka Leslie Nord leslienord)

              Email me: [email protected]
              www.lesliekirk.com

              Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

              Comment


                #8
                Re: Page breaks between orders in the batch?

                Is it Safari by chance? It's been a while (probably since shipping DVD's last year) but I vaguely recall always bumping into this on my Mac with Safari and then switching to Chrome or FF to print them.
                Thanks,

                Rick Wilson
                CEO
                Miva, Inc.
                [email protected]
                https://www.miva.com

                Comment


                  #9
                  Re: Page breaks between orders in the batch?

                  It is also worth noting that the parent element (<div id="order">) cannot have a float on it for page-break-after to work.

                  http://stackoverflow.com/questions/4...n-all-browsers

                  Other things that can break page-break are: using page-break inside tables, floating elements, inline-block elements, and block elements with borders.
                  Brennan Heyde
                  VP Product
                  Miva, Inc.
                  [email protected]
                  https://www.miva.com

                  Comment


                    #10
                    Re: Page breaks between orders in the batch?

                    When I run the "Printable Invoice" batch report, it doesn't print with page breaks between orders. I checked the template:

                    Code:
                    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                    <html xmlns="http://www.w3.org/1999/xhtml">
                    <head>
                    <title>&mvte:page:name;</title>
                    <style type="text/css"><mvt:item name="inline_css" /></style>
                    </head>
                    <body>
                    
                    <mvt:foreach iterator="order" array="admin_order:orders">
                        <div class="order">
                            <div class="title-box-left">
                    etc

                    I checked the CSS, and the "order" style has "page-break-after:always;" just like the above post.

                    I'm using the original, un-edited template, and I've tried both IE8 and Firefox, and no go. (Incidentally, when I try to run the batch report in IE10, the whole page reloads, bringing me back to the main Admin page.)

                    What could possibly be going wrong?
                    Doug
                    Using Miva Merchant since 2004
                    StoreSMART.com

                    Comment


                      #11
                      Re: Page breaks between orders in the batch?

                      If you have an inspection tool in FF, right click (Inspect Element or Inspect with FireBug) near the top of the Batch Report output and locate one of the class="orders" div. See if the Page-break-after is somehow suppressed by some other code.
                      Bruce Golub
                      Phosphor Media - "Your Success is our Business"

                      Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
                      phosphormedia.com

                      Comment


                        #12
                        Re: Page breaks between orders in the batch?

                        Thanks for the tip. I checked, and there was a "float" I hadn't seen. But even after taking it out, it still doesn't print right. :/

                        Here's a screen cap of the code.
                        Last edited by sartaingerous; 07-28-17, 03:52 PM.
                        Doug
                        Using Miva Merchant since 2004
                        StoreSMART.com

                        Comment


                          #13
                          Re: Page breaks between orders in the batch?

                          just for fun (actually to rule out possible overwrites) add the following to the template <head> area:

                          <style>
                          @media print
                          {
                          div.orders {page-break-after:always}
                          }
                          </style>
                          Bruce Golub
                          Phosphor Media - "Your Success is our Business"

                          Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
                          phosphormedia.com

                          Comment


                            #14
                            Re: Page breaks between orders in the batch?

                            May want to try:

                            page-break-after:always !important;
                            Last edited by Dan - Glendale Designs; 07-11-13, 11:30 AM.

                            Comment


                              #15
                              Re: Page breaks between orders in the batch?

                              Great! That works in IE8 and IE10, which is what my order processing co-workers use. So that's all set for day-to-day use. Thanks a ton!

                              However, it still doesn't print correctly from Firefox. :P Oh well.
                              Last edited by VisHorizons; 07-11-13, 12:30 PM.
                              Doug
                              Using Miva Merchant since 2004
                              StoreSMART.com

                              Comment

                              Working...
                              X