jackhandy Posted September 17, 2003 Share Posted September 17, 2003 Is it something to do with calling remote files. I discovered that a few of the admin utilities out there will break my hack for getting multiple invoices to print properly, as the include() statement is making a fresh http request to the server from the server (and not the browser where a login cookie might reside). I am exploring a few options to use curl and/or including the content of the invoice or packing slip in Multi-Edit, itself. After a few hours of re-engineering this solution I think I have something that will not break your site's security, and will work consistently: In admin/invoice.php and admin/packingslip.php you need to change all require/include statements to require_once(or include_once): require_once('includes/application_top.php'); require_once(DIR_WS_CLASSES . 'currencies.php'); include_once(DIR_WS_CLASSES . 'order.php'); Also, you need to add in an option to check to see if an order ID ($oID) hasn't already been set (passed) in: if (!isset($oID)) {$oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);} Now, in admin/edit_orders.php replace the invoice and packing case statements with the following: case 'invoice': { $number_of_orders_query = tep_db_query("SELECT count(*) as total FROM " . TABLE_ORDERS . ""); $number_of_orders = tep_db_fetch_array($number_of_orders_query); $j = $number_of_orders['total']; $p=0; do { $option[$p]; if (!$option[$p] ==''){ $oID = $option[$p]; // set orderID to pass into invoice require(DIR_WS_LANGUAGES . 'english/invoice.php'); // set language params include('invoice.php'); echo '<br style="page-break-after:always;">'."\r\n"; } $p++; } while ($p<$j); ?> <a href="orders_editable.php">Return to orders page</a> <? break; } case 'packing': { $number_of_orders_query = tep_db_query("SELECT count(*) as total FROM " . TABLE_ORDERS . ""); $number_of_orders = tep_db_fetch_array($number_of_orders_query); $j = $number_of_orders['total']; $p=0; do { $option[$p]; if (!$option[$p] ==''){ $oID = $option[$p]; // set orderID to pass into packingslip require(DIR_WS_LANGUAGES . 'english/packingslip.php'); // call language params include('packingslip.php'); echo '<br style="page-break-after:always;">'."\r\n"; } $p++; } while ($p<$j); ?> <a href="orders_editable.php">Return to orders page</a> <? break; } Give me feedback on how this patch worked for you, and I'll see about posting it as part of the contribution. And possibly add in a pick list option. B) Quote jackhandy - http://jackhandy.com Link to comment Share on other sites More sharing options...
azer Posted September 17, 2003 Share Posted September 17, 2003 im trying to transalte your contribution to french and all the install works well ... my only trouble with that when i enter the date , i have this message: Program Message: There were no orders selected for export, try changing your order options. but i have orders in my shop ! i think it s a problem of date format since we use day-month-year any advice on how to fix that problem ? Quote MS2 Link to comment Share on other sites More sharing options...
stephaniezara Posted September 17, 2003 Share Posted September 17, 2003 I would like to add this contribution, http://www.oscommerce.com/community/contributions,1235 but it requires uploading the application_top that is in the zip file. I have alreadymodified my application_top and mine is much longer. How can I integrate the new one into mine? Do you offer instructions on which bits of code to add and where? Any help would be appreciated as I think this contrib. could be just what I am looking for. Quote Link to comment Share on other sites More sharing options...
TomThumb Posted October 19, 2003 Share Posted October 19, 2003 Stephanie, You can use a file compare utility. These let you compare files side by side and highlight the differences and can easily move all or selected differences from one file to another. On the windows platform try WinMerge http://winmerge.sourceforge.net/ On the linux platform try XXDiff http://xxdiff.sourceforge.net/ Quote while (!succeed) {try()}; GMT -6:00 Link to comment Share on other sites More sharing options...
shahed Posted October 22, 2003 Share Posted October 22, 2003 this might be another topic but related, is there any way I can print Shipping Level with Invoice with UPS tracking number because my client ship about 100+ orders everyday and we need to come out with a shortcut solutions to print invoices+ shipping levels. Quote Link to comment Share on other sites More sharing options...
kooyan Posted November 5, 2003 Share Posted November 5, 2003 Thanks a lot for this contribution, I just downloaded the newest files, installed it and got some problems ;) . The line with the shipping cost looks not so good because it is to long to fit on the printout. I saw this here in a few postings before, too. The second thing is, although I choose get all orders I get only a pdf-file with one order. I tried several different days and I only get a file with one order in the daily document. Maybe you can help me :) what can I do? Thanks so much. With best regards Stefan Quote Link to comment Share on other sites More sharing options...
kooyan Posted November 5, 2003 Share Posted November 5, 2003 ---- Program Message: A PDF of 1 order(s) was successful! Click here to download the order file. ---- Maybe this helps, of course the day has more than one order :) Quote Link to comment Share on other sites More sharing options...
kooyan Posted November 5, 2003 Share Posted November 5, 2003 Sorry to post again, but I recognized the programm is able to create more pages at the same time. I tried to use a historic date, where the order status is "already sent" and the report worrked fine. Only if I use a status "We are packing" or if I use "none" it is not working like it should. It only takes of the orders (in my case one). But it seems to be something with the order status. BTW I use "MS1" and the "german language" and "05/19/2003 - Batch Print Update ". Is there something I should configure else? With best regards Stefan Quote Link to comment Share on other sites More sharing options...
kooyan Posted November 6, 2003 Share Posted November 6, 2003 I was able to narrow this down a little bit more. The problem is the switch: -Show customer comments? (Will only show comments placed by the customer at time of order.) If I turn it on, the pdf only of the orders with a comment will be build. If I turn it off everything seems to works good, but it is not printing the comment on the pdf, which I need :-). I understand th switch as a printing option not as a selection, am I wrong? HTH Stefan Quote Link to comment Share on other sites More sharing options...
defender39 Posted February 1, 2004 Share Posted February 1, 2004 The line with the shipping cost looks not so good because it is to long to fit on the printout. I saw this here in a few postings before, too. I am having similar issues. My shipping options are long names and the text looks aweful. How do I adjust that table over some? Or justify it differently. Nice contrib btw Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.