Full service web hosting, great prices and support. Starts at $1.99/month!
Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: invoice pdf produces sample invoice

  1. #1
    Active Member
    invoice pdf produces sample invoice


    Join Date
    Jan 2009
    Posts
    236
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    jmelson     $ 50.00
    Rep Power
    16


    Default invoice pdf produces sample invoice

    I'm using osCMax 2.5.4 when I click on the invoice pdf button, it produces a sample pdf output, not a pdf from the currently displayed order.
    So, what it produces is a 5 page batch order list, where each page has an order to "test user 111 street, City Arizona 25314" for various combinations of "almost free thingy"

    The plain invoice button works fine, but then you have to go through a bunch of clicks to print the screen to a pdf file.

    Is there a way to get the pdf output button to generate a pdf from the displayed order?

    Also, the pdf output has a grid with coordinate numbers superimposed over the document, that should not be in the final output.

    Thanks much,

    Jon

  2. #2
    osCMax Development Team

    invoice pdf produces sample invoice

    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    4,134
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    ridexbuilder     $ 15.00
    Rep Power
    96


    Default Re: invoice pdf produces sample invoice

    admin/orders.php determines which invoice template is used:
    PHP Code:
                switch ($pdf_check) {
                  case 
    'invoice':
                    require(
    DIR_WS_MODULES 'batch_print/templates/Invoice_s3.php');
                  break;
                  case 
    'packingslip':
                    require(
    DIR_WS_MODULES 'batch_print/templates/Packing-Slip.php');
                  break;
                  default:
                  break;
                } 
    // end switch 
    Within the chosen template:
    PHP Code:
    //require(BATCH_PRINT_INC . 'templates/' . 'grid.php'); 
    turns on/off the grid to allow easier matching to labels, during testing.

    When you open the generated PDF, I (and others) need to use Shift+Refresh (Refresh not from cache), to prevent seeing the previously generated PDF.

    (Oh, and ezPDF is anything but, IME)

    HTH
    EJ
    Last edited by ridexbuilder; 03-29-2018 at 03:12 PM. Reason: typo

    Developers resource at bitbucket
    *** *** ***
    oscmax.co.uk / ejsolutions.co.uk
    Hosting plans with installation, configuration, contributions, support and maintenance.
    *** FREE osCmax hosting available ***
    oscmaxtemplates.com

  3. #3
    Active Member
    invoice pdf produces sample invoice


    Join Date
    Jan 2009
    Posts
    236
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    jmelson     $ 50.00
    Rep Power
    16


    Default Re: invoice pdf produces sample invoice

    Quote Originally Posted by ridexbuilder View Post
    admin/orders.php determines which invoice template is used:

    Within the chosen template:
    PHP Code:
    //require(BATCH_PRINT_INC . 'templates/' . 'grid.php'); 
    turns on/off the grid to allow easier matching to labels, during testing.

    When you open the generated PDF, I (and others) need to use Shift+Refresh (Refresh not from cache), to prevent seeing the previously generated PDF.

    (Oh, and ezPDF is anything but, IME)

    HTH
    EJ
    OK, I see the commented line about grid.php in file includes/modules/batch_print/templates/Invoice_s3.php so why do I get the grid if it is commented out?

    But, the REAL problem is I always get some kind of canned sample file that does not have the order I want to get an invoice of. See the attached pdf file to see what it is producing.

    Thanks,

    Jon
    Attached Files Attached Files

  4. #4
    osCMax Development Team

    invoice pdf produces sample invoice

    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    4,134
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    ridexbuilder     $ 15.00
    Rep Power
    96


    Default Re: invoice pdf produces sample invoice

    admin/orders.php
    PHP Code:
                switch ($pdf_check) {
                  case 
    'invoice':
                    require(
    DIR_WS_MODULES 'batch_print/templates/Invoice_s3.php');
                  break;
    .. 
    Did you check the content?


    When you open the generated PDF, I (and others) need to use Shift+Refresh (Refresh not from cache), to prevent seeing the previously generated PDF.
    Simple test: replace Invoice_s3.php with one of the other invoice templates.
    Last edited by ridexbuilder; 03-30-2018 at 09:27 AM.

    Developers resource at bitbucket
    *** *** ***
    oscmax.co.uk / ejsolutions.co.uk
    Hosting plans with installation, configuration, contributions, support and maintenance.
    *** FREE osCmax hosting available ***
    oscmaxtemplates.com

  5. #5
    Active Member
    invoice pdf produces sample invoice


    Join Date
    Jan 2009
    Posts
    236
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    jmelson     $ 50.00
    Rep Power
    16


    Default Re: invoice pdf produces sample invoice

    I tried changing the require statement in admin/orders.php to Invoice.php, same result.
    I put that back and copied admin/includes/modules/batch_print/templates/orders.php to orders_s3.php, same result. I get a sample file that was composed in 2005. I did a save to file with a different name, so I am not getting a stale cached copy. I don't have any invoice templates but Invoice_s3.php and Invoice.php.

    (I'm not sure how to do a shift+refresh on Linux acrobat reader. But, I see the same in Acrobat and evince.)

    Jon

  6. #6
    osCMax Development Team

    invoice pdf produces sample invoice

    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    4,134
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    ridexbuilder     $ 15.00
    Rep Power
    96


    Default Re: invoice pdf produces sample invoice

    I haven't used Windoze daily for approx. 15 years, so Linux only here.
    I don't have the proprietary Adobe bloatware installed either: the PDF opens in a Firefox tab, then just a standard shift-Refresh.
    (I have xreader installed.)

    Developers resource at bitbucket
    *** *** ***
    oscmax.co.uk / ejsolutions.co.uk
    Hosting plans with installation, configuration, contributions, support and maintenance.
    *** FREE osCmax hosting available ***
    oscmaxtemplates.com

  7. #7
    Active Member
    invoice pdf produces sample invoice


    Join Date
    Jan 2009
    Posts
    236
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    jmelson     $ 50.00
    Rep Power
    16


    Default Re: invoice pdf produces sample invoice

    OK, you're using Firefox's document viewer. Nope, Firefox's document viewer shows the same 2005 sample document. Did you look at the pdf I attached in message #3 of this thread? I have no idea where this 2005 document is on my system, but it just keeps outputting this canned sample file. The NON-pdf invoice button produces a single page invoice in the browser that is fine, but I have to click through a bunch of menus to convert that to a pdf.

    Thanks very much,

    Jon

  8. #8
    osCMax Development Team

    invoice pdf produces sample invoice

    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    4,134
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    ridexbuilder     $ 15.00
    Rep Power
    96


    Default Re: invoice pdf produces sample invoice

    I do recall some mention or the actual file that has that sample, when I was trying to customise an invoice (into a shipping [sic] label.)
    That was a couple of month's back though, so don't know offhand.


    2 minutes later...
    For some reason your site is serving up catalog/admin/includes/modules/batch_print/temp_pdf/batch_orders.pdf
    Try renaming it to old and check permissions on the directory are 755, or whatever is appropriate for your server environment.
    Last edited by ridexbuilder; 03-31-2018 at 03:16 PM.

    Developers resource at bitbucket
    *** *** ***
    oscmax.co.uk / ejsolutions.co.uk
    Hosting plans with installation, configuration, contributions, support and maintenance.
    *** FREE osCmax hosting available ***
    oscmaxtemplates.com

  9. #9
    Active Member
    invoice pdf produces sample invoice


    Join Date
    Jan 2009
    Posts
    236
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    jmelson     $ 50.00
    Rep Power
    16


    Default Re: invoice pdf produces sample invoice

    YUP, you got it! So, I renamed includes/modules/batch_print/temp_pdf/batch_orders.pdf to ~~~/batch_orders.pdf_old, and now I get :

    The requested URL /osc2.5/catalog/<secretAdminName>/includes/modules/batch_print/temp_pdf/batch_orders.pdf was not found on this server.

    So, how do I get the invoice pdf button to point to the newly created pdf file? I do see temp_pdf appears on two lines of the <admin>/orders.php file, on lines 77 and 114.
    Those are :
    define('BATCH_PDF_DIR', BATCH_PRINT_INC . 'temp_pdf/');
    and
    tep_redirect(tep_href_link(DIR_WS_MODULES . 'batch_print/temp_pdf/batch_orders.pdf', '', 'NONSSL', false));

    So, is the problem that the store software is not able to write the new file into the temp_pdf directory? that directory and all above it are 755, as far as I can see.
    But, maybe it is ownership, not the RWX bits. I'll tinker with it and see.

    Thanks,

    Jon

  10. #10
    Active Member
    invoice pdf produces sample invoice


    Join Date
    Jan 2009
    Posts
    236
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    jmelson     $ 50.00
    Rep Power
    16


    Default Re: invoice pdf produces sample invoice

    OK, so I changed the owner of the catalog/<secretAdminName>/includes/modules/batch_print/temp_pdf directory to be www-data:www-data and now the print to pdf seems to work!
    Not sure of the security implications of that, but seems like that would be minor. (I have Apache2 set up so the whole admin section is not available on the WAN side of the server.)
    I'm pretty sure this problem was there in the 2.5 RC1 store that I ran for the last several years, too, although in that case it gave an error, I think, instead of just trying to use the placeholder file.

    Thanks!!

    Jon

Page 1 of 2 12 LastLast

Similar Threads

  1. PDF invoice & packing slip with message field and automatic editable invoice no
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 08-23-2013, 02:46 PM
  2. PDF invoice & packing slip with message field and automatic editable invoice no
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 08-22-2013, 03:16 AM
  3. PDF invoice & packing slip with message field and automatic editable invoice no
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 08-19-2013, 07:50 AM
  4. PDF invoice & packing slip with message field and automatic editable invoice no
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 08-18-2013, 01:37 PM
  5. PDF invoice & packing slip with message field and automatic editable invoice no
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 08-16-2013, 02:21 AM

Tags for this Thread

Bookmarks

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
  •