Bigredman74 Posted June 7, 2005 Share Posted June 7, 2005 Use the function "print_r($arrayname)" on the variable that is printing out "Array". That will tell you what is in the array and then you can reference the contents if what you want is in there. <{POST_SNAPBACK}> Thanks Jonathan. When I use "print_r($bin)" with three test products I get "Array ( [products_bin_number] => BIN1 ) Array ( [products_bin_number] => BIN6 ) Array ( [products_bin_number] => BIN1234 )". The BIN1, BIN6, and BIN1234 is what I want displayed on the packing slip, but "Array" is displayed instead. Here is the code I am using in the packing slip template: // GET BIN NUMBER FROM DATABASE $order_model = $order->products[$i]['model']; $bin_query[i] = tep_db_query("SELECT products_bin_number FROM " . TABLE_PRODUCTS . " WHERE products_model = '$order_model'"); $bin_number[i] = tep_db_fetch_array($bin_query[i]); print_r($bin_number[i]); // print contents of the array to the screen. // BEGIN WRITING ORDER TABLE CONTENTS $pdf->addText($x,$pos,TABLE_HEADER_FONT_SIZE, $bin_number[i]); Any suggestions? Quote My Published & Modified Contributions Helpful Forum Topics: Basic Design Tips & Tricks | Simple Steps to Better Forum Searching | Speed / Performance Optimizations Link to comment Share on other sites More sharing options...
jknacnud Posted June 7, 2005 Share Posted June 7, 2005 Thanks Jonathan. When I use "print_r($bin)" with three test products I get "Array ( [products_bin_number] => BIN1 ) Array ( [products_bin_number] => BIN6 ) Array ( [products_bin_number] => BIN1234 )". The BIN1, BIN6, and BIN1234 is what I want displayed on the packing slip, but "Array" is displayed instead. Here is the code I am using in the packing slip template: // GET BIN NUMBER FROM DATABASE $order_model = $order->products[$i]['model']; $bin_query[i] = tep_db_query("SELECT products_bin_number FROM " . TABLE_PRODUCTS . " WHERE products_model = '$order_model'"); $bin_number[i] = tep_db_fetch_array($bin_query[i]); print_r($bin_number[i]); // print contents of the array to the screen. // BEGIN WRITING ORDER TABLE CONTENTS $pdf->addText($x,$pos,TABLE_HEADER_FONT_SIZE, $bin_number[i]); Any suggestions? <{POST_SNAPBACK}> If your array looks like this: $bin_number[i] contains "Array ( [products_bin_number] => BIN6 )" Then try referencing the values like this: $whatyouwant = $bin_number[i][products_bin_number] Quote Jonathan Duncan JKD Web Magic Web Site Hosting and Design http://www.jkdwebmagic.com/ Link to comment Share on other sites More sharing options...
Bigredman74 Posted June 7, 2005 Share Posted June 7, 2005 It works! Thank you Jonathan for your help. Here's the new code block that I'm using now. Hopefully it will be beneficial to someone with a similar problem. // GET BIN NUMBER FROM DATABASE $order_model = $order->products[$i]['model']; $bin_query[i] = tep_db_query("SELECT products_bin_number FROM " . TABLE_PRODUCTS . " WHERE products_model = '$order_model'"); $bin_number[i] = tep_db_fetch_array($bin_query[i]); $bin = $bin_number[i][products_bin_number]; //print_r($bin_number[i]); // print contents of the array to the screen. // BEGIN WRITING ORDER TABLE CONTENTS $pdf->addText($x,$pos,TABLE_HEADER_FONT_SIZE, $bin); Thanks again Jonathan. Quote My Published & Modified Contributions Helpful Forum Topics: Basic Design Tips & Tricks | Simple Steps to Better Forum Searching | Speed / Performance Optimizations Link to comment Share on other sites More sharing options...
Guest Posted August 14, 2005 Share Posted August 14, 2005 (edited) I have just installed Batch Print Center but everytime I get this error: 1054 - Unknown column 'o.orders_prefix' in 'field list' select o.orders_id,o.orders_prefix,h.comments,MIN(h.date_added) from orders o, orders_status_history h where o.orders_id in (1859) and h.orders_id = o.orders_id group by o.orders_id [TEP STOP] Does anyone know how to solve? Edited August 14, 2005 by rjongen Quote Link to comment Share on other sites More sharing options...
Guest Posted August 14, 2005 Share Posted August 14, 2005 I have just installed Batch Print Center but everytime I get this error:Does anyone know how to solve? <{POST_SNAPBACK}> nobody knows? Quote Link to comment Share on other sites More sharing options...
radders Posted August 14, 2005 Share Posted August 14, 2005 (edited) That version is only to be used by people with contribution 1601 -Order_Number_Prefixe- installed . Try using the previous version of batch print center. Edited August 14, 2005 by radders Quote Link to comment Share on other sites More sharing options...
Guest Posted August 14, 2005 Share Posted August 14, 2005 That version is only to be used by people with contribution 1601 -Order_Number_Prefixe- installed . Try using the previous version of batch print center. <{POST_SNAPBACK}> Okay, thank you. It is working now. Another question: Is it possible that the contribution is not printing a .pdf but the invoice I have created in osCommerce, the admin/invoice.php? Because I have manually editted a lot to the invoice.php.. Thanks in advance! B) Quote Link to comment Share on other sites More sharing options...
Guest Posted August 15, 2005 Share Posted August 15, 2005 Hello, Thank you for your great Contributions. however i run into this little problem after i input everything and hit "SEND" 1054 - Unknown column 'o.orders_prefix' in 'field list' select o.orders_id,o.orders_prefix,h.comments,MIN(h.date_added) from orders o, orders_status_history h where o.orders_id in (1) and h.orders_id = o.orders_id and o.orders_status = 1 and h.orders_status_id = 1 group by o.orders_id [TEP STOP] Please help. Thank you Quote Link to comment Share on other sites More sharing options...
Guest Posted August 15, 2005 Share Posted August 15, 2005 sorry please ignore my question^^ i found the answer. thank you Quote Link to comment Share on other sites More sharing options...
radders Posted August 15, 2005 Share Posted August 15, 2005 Another question: Is it possible that the contribution is not printing a .pdf but the invoice I have created in osCommerce, the admin/invoice.php? Because I have manually editted a lot to the invoice.php.. Thanks in advance! B) <{POST_SNAPBACK}> You would need either to use a different contribution or to make a new template for this contribution which mimics the changes you have made. Quote Link to comment Share on other sites More sharing options...
altDev Posted August 16, 2005 Share Posted August 16, 2005 I have been using Batch Print Center 1.1 for about 6 months without a hitch, and all of a sudden I get this, Program Message: There were no orders selected for export, try changing your order options. I have plenty of orders waiting with the status of processing but.. So, I went ahead and upgraded to BPC 3.1 and the same thing. I did install one contribution prior to this problem, Admin Send Password V1.1 , but there was only one core file change, customers.php. So, I uninstalled that and still the same thing.. Can someone help me? btw, super props to the author of this fine contribution, prior to it not working it saved us so much time, hence why we are freakinout :) Quote James Scheller Link to comment Share on other sites More sharing options...
altDev Posted August 16, 2005 Share Posted August 16, 2005 *bump* Update to last thread. I can get it to work if I put in order number 1000-3000 and only status processing but doesn't work with the date function. Jaymz Quote James Scheller Link to comment Share on other sites More sharing options...
radders Posted August 16, 2005 Share Posted August 16, 2005 Well I tried mine to see if the date function was still working (I usually select by order number) and it worked fine so I don't really know what to suggest. Quote Link to comment Share on other sites More sharing options...
altDev Posted August 16, 2005 Share Posted August 16, 2005 Ya, its pretty strange. I figured it wasn't in the coding because of the sudden nature of which it happened but was hoping someone may have seen this before and could suggest a fix.. but looks like doing it by order number will work just fine. Can I comment out the date ranges so that they won't show and only allow for order numbers to process the batch? If thats possible, can I have it always show a pre-defined set of order numbers, 1000-3000? Quote James Scheller Link to comment Share on other sites More sharing options...
altDev Posted August 16, 2005 Share Posted August 16, 2005 Also, here is a screen shot of my last problem. 1) How do I pass the cut off information to the next page? 2) How do I get all the text to align correctly. Thanks so much for your help! Jaymz Quote James Scheller Link to comment Share on other sites More sharing options...
altDev Posted August 16, 2005 Share Posted August 16, 2005 srry.. here is the screenshot; Quote James Scheller Link to comment Share on other sites More sharing options...
radders Posted August 16, 2005 Share Posted August 16, 2005 (edited) I suspect that you are not using A4 paper. In that case you need to adjust the dimensions of the paper and also the top of paper setting --look for something like $y=810; after the definitions in the template file. Also you need to include (around line 320) in the section headed: // Sort through the products Put it just after 'pos' is calculated in order to stop you losing the bottom of the order list: //page feed if ($pos <= 30) { $pdf->ezNewPage(); $pos =780; } // end page feed Edited August 16, 2005 by radders Quote Link to comment Share on other sites More sharing options...
altDev Posted August 16, 2005 Share Posted August 16, 2005 RIGHT ON!! Its all good now, thanks Radders! You are awesome! Quote James Scheller Link to comment Share on other sites More sharing options...
bad_lemming Posted September 2, 2005 Share Posted September 2, 2005 I installed this contribution a few months ago. I am now getting ready to go live so I am checking out my proccesses to make sure all is well. Well, now for some reason, my products aren't showing up on my invoices/packing slips. Any ideas? Quote Link to comment Share on other sites More sharing options...
bad_lemming Posted September 2, 2005 Share Posted September 2, 2005 meh, i figured out the problem, for some reason I had cleared out the orders_products table at some point, sorry for the uneeded post. Quote Link to comment Share on other sites More sharing options...
Repute Posted September 5, 2005 Share Posted September 5, 2005 I get this error, just installed Batch print order 3.1: Warning: main(BATCH_PRINT_INCbatch_print_header.php): failed to open stream: No such file or directory in /home/.rambunctious/stardog/stardogshop/admin/batch_print.php on line 140 Warning: main(BATCH_PRINT_INCbatch_print_header.php): failed to open stream: No such file or directory in /home/.rambunctious/stardog/stardogshop/admin/batch_print.php on line 140 Fatal error: main(): Failed opening required 'BATCH_PRINT_INCbatch_print_header.php' (include_path='.:/usr/local/lib/php') in /home/.rambunctious/stardog/stardogshop/admin/batch_print.php on line 140 Anybody who knws the solution for this? Thanx in advance, Matt Quote Link to comment Share on other sites More sharing options...
hurl Posted October 11, 2005 Share Posted October 11, 2005 I am having trouble with the label template. I am trying to print labels from a range of orders. The problem is that it leaves off the first one. Or if I try to print just one label using the order id number I get a blank pdf. Has anyone else seen this problem? Quote Link to comment Share on other sites More sharing options...
hurl Posted October 11, 2005 Share Posted October 11, 2005 Warning: main(BATCH_PRINT_INCbatch_print_header.php): failed to open stream: No such file or directory in /home/.rambunctious/stardog/stardogshop/admin/batch_print.php on line 140 Warning: main(BATCH_PRINT_INCbatch_print_header.php): failed to open stream: No such file or directory in /home/.rambunctious/stardog/stardogshop/admin/batch_print.php on line 140 Matt, about line 146 you will find this block of code require(BATCH_PRINT_INC . 'batch_print_header.php'); require(BATCH_PRINT_INC . 'batch_print_body.php'); require(BATCH_PRINT_INC . 'batch_print_footer.php'); and before that around line 64 you should find require(DIR_WS_CLASSES . 'currencies.php'); require(BATCH_PRINT_INC . 'class.ezpdf.php'); require(DIR_WS_CLASSES . 'order.php'); looks like you are missing something having to do with the "BATCH_PRINT_INC" defined variable the easiest fix would be to upload a clean version of the batch_print.php file again. But the error message tells you that it cannot parse BATCH_PRINT_INC so there is a problem with the sections of code that refer to that. Quote Link to comment Share on other sites More sharing options...
blurb Posted October 11, 2005 Author Share Posted October 11, 2005 Warning: main(BATCH_PRINT_INCbatch_print_header.php): failed to open stream: No such file or directory in /home/.rambunctious/stardog/stardogshop/admin/batch_print.php on line 140 Usually caused by bad configuration. Either the batch_print_header.php isn't on your server or you have a path set wrong so the main script can not find the file in question. cheers shaun I am having trouble with the label template. I am trying to print labels from a range of orders. The problem is that it leaves off the first one. Or if I try to print just one label using the order id number I get a blank pdf. Has anyone else seen this problem? As stated in the known-issues.txt file currently the label system has bugs. Like the missing the lowest label number. The work around is to choose 1 label more then you want and the label program will drop that first label giving the labels you want. The blank pdf is again the label program dropping the first label and if you only have 1 chosen then you will see a blank .. so choose 2 and again the program will drop 1 giving you just the label you wanted. I simply don't have the time to find the issue with this and to date no one has offered to recode it to work correctly. cheers shaun Quote Link to comment Share on other sites More sharing options...
Dantium Posted October 18, 2005 Share Posted October 18, 2005 This is a great contribution however I am unable to get it to render japanese text to the PDF. Is there any solution to this that anyone can think of? Thanks! TenTen 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.