blurb Posted December 13, 2004 Share Posted December 13, 2004 Hi, I have created a new contrib based heavily on batch order center with some code from print sticky labels. http://www.oscommerce.com/community/contributions,2720 The idea was to create one place to be able to print just about anything you need. You can print orders,invoices,packaging slips, christmas cards, Sticky Labels, Letterheads and probably lots of other stuff in bulk to PDF. Print to envelopes, A4,A5 , letter .. you name it. I have already done 5 or so sample templates. There is even a template which combines packing and invoice to create 2 pages for every order you print. The way it works is you choose from a list of templates what type of pdf to create. Then you choose by invoice number, a list of numbers, a range of numbers, or between 2 dates using spiffycal popup calenders. You choose if you want to limit orders to those with a certain status or not. Set whether to update the status of selected orders to a new status. Once you have those things set you click send and it creates 1 pdf with all the orders you wanted ready for printing. The templates are a combination of php and pdf creation code. The page size, orientation etc are all contained within the template. Once a template is created it is only a matter of uploading it and it appears in the list of possible template choices making sharing of templates alot easier. For those who have tried to modify pdf creation code on any of the other pdf creation contributions I have made life a bit easier. I have created a grid overlay to turn on during template testing with x and y values listed for easier layout control. Working out where x and y is can be painfull otherwise. I modified the pdf class to add rounded rectangles to give invoices a more professional look. The templates allow you to add watermarks and logos in the form of jpg images and there is example templates with images included showing these ideas in practice. Hope the community gets behind it and creates templates we can all share. cheers shaun Quote Link to comment Share on other sites More sharing options...
♥radders Posted December 13, 2004 Share Posted December 13, 2004 Great job, Shaun! I see you managed to include multiple order comments in this. Any thoughts on a more elegant way than the one I jammed in there to start a new page if the order is longer than one page in length? With the order comments it is now more likely that this would happen. I wondered if the print function could be modified to do that automatically. I'll upload a template for the Dymo Labelwriter and another for Packing Slips / Invoices with Integrated Shipping and Returns Labels in a few days. David Quote Link to comment Share on other sites More sharing options...
blurb Posted December 13, 2004 Author Share Posted December 13, 2004 Thanks david, All i thought is that if you have that many comments that they wrap onto another page either set some of the fonts smaller to make it fit on 1 page or only include a certain number or certain type of comment. The other option is to make it always print all the comments on another page. So some logic that if the order contains comments do a line feed and print a nice header with order number then print the comments in much the same was as the dual print invoice/packing template works now. Ideally the comments should be all placed into a nice table with ticks for whether the customer has been notified etc just like the default oscommerce way. Hopefully someone will beat me to it but if not i will get a pdf array worked out to do it. cheers shaun Quote Link to comment Share on other sites More sharing options...
paolo Posted January 5, 2005 Share Posted January 5, 2005 Superb contribution(!), many thanks indeed. Already spent hours tinkering with templates. One question though which is beyond my coding knowledge. Would it be possible to display the manufacturers name on the invoice template (which is slowly becoming my admin form for invoicing and packing note for warehouse) ? For example, we have two light bulbs on sale, both the same part code (model), both the same description but one is a cheap brand, the other a well known brand, only the price is different (but for Jonny Packabox in the warehouse he's not to know better, so which does he pack..?) The manufacturers name on display would differentiate between the two, ensuring Jonny Packabox gets his weekly bonus :o) Shop is at www.astra247.com and I've installed and played around with many mods, if anyone likes any particular aspect of the site and would like to implement similar please do get in touch, I'd be more than happy to help. Cheers, Paolo :D Quote Link to comment Share on other sites More sharing options...
runweb Posted January 5, 2005 Share Posted January 5, 2005 What about the invoice number ? Our tax offices want a range of following count of invoice-numbers -like 1,2,3,4....ans so on. But when I make at first an invoice of order 2 and later the order4, than the invoice of order 2 has an earlier date than order 4. Is there an option with creating "automatic" invoice number/date which is not based on the order-number ? you know, what I mean ? Quote OSC Webmakers Edition modiefied with many other contribs and enhancements. + STS 4.5.7 for 2.2MS2 and RC1 Link to comment Share on other sites More sharing options...
data2700 Posted January 31, 2005 Share Posted January 31, 2005 I like this contribution ALOT... my installation seems to be working just fine, but Im trying to configure it to print out a series of sticky labels that include the product number, product name and price or quantity for each item in the customers order. This would allow me to print out a set of labels specific for each customers order and then use those labels to put the order contents in their bag and then label each item, which would save us quite a bit of time! I can't figure out how to do it though.. can anyone help? I know the fields exist in the database, but how to tell Btach Print Center which fields to put on the label is out of my league. Thanks in advance! Quote Link to comment Share on other sites More sharing options...
Chuckler Posted February 1, 2005 Share Posted February 1, 2005 This is an awesome contrib - would love to see more templates available though :) Quote Link to comment Share on other sites More sharing options...
blurb Posted February 1, 2005 Author Share Posted February 1, 2005 Im trying to configure it to print out a series of sticky labels that include the product number, product name and price or quantity for each item in the customers order. I can't figure out how to do it though.. can anyone help? I know the fields exist in the database, but how to tell Btach Print Center which fields to put on the label is out of my league. <{POST_SNAPBACK}> I currently don't have much time to look into creating more templates though if you could do up a sample in say word of what your looking for I maybe able to give you some quick layout to get you started. Like I mentioned in the contrib though the label printing still has a issue. I never did find out why it loses a label when printing but you will see there is a dirty work around which I soemtimes use when printing labels. I do know other were printing invoices to speical paper which had labels on the top part and invoice paper on the bottom is that the type of thing your after ? cheers shaun Quote Link to comment Share on other sites More sharing options...
blurb Posted February 1, 2005 Author Share Posted February 1, 2005 This is an awesome contrib - would love to see more templates available though :) <{POST_SNAPBACK}> Thanks .. I love it too but Im biased. I had hoped the community had gotten behind it to create more templates but alas there has been very little interest and only a couple of extra templates. If you are interested in more templates maybe you should post suggestions here and maybe if i get time or maybe others will be able to help. I always had hoped that others would create templates that i never dreamed of. I suppose I should be happy that although I have had very few comments about this contrib I have also had very little in the way of errors reported. cheers shaun Quote Link to comment Share on other sites More sharing options...
data2700 Posted February 1, 2005 Share Posted February 1, 2005 I currently don't have much time to look into creating more templates though if you could do up a sample in say word of what your looking for I maybe able to give you some quick layout to get you started. <{POST_SNAPBACK}> Here is a link with a word file which represents what I'd like to do and I think it would be very useful for others as well. Basically the batch print center being used to make the labels for the products that we ship to our customers. In our case, we have to put beads and findings in a bag and then make a label that has our logo, the product number, the model and the website... all information that is available with batch print center and printed out in the invoice. http://www.beadplace.se/bk/catalog/labelsheet.doc I have posted the.doc link for you or anyone to take a look at. Hopefully Im explaining this well enough! Quote Link to comment Share on other sites More sharing options...
blurb Posted February 1, 2005 Author Share Posted February 1, 2005 Here is a link with a word file which represents what I'd like to do and I think it would be very useful for others as well. Basically the batch print center being used to make the labels for the products that we ship to our customers. In our case, we have to put beads and findings in a bag and then make a label that has our logo, the product number, the model and the website... all information that is available with batch print center and printed out in the invoice. So if a order has 5 items on that one order you want to be able to get the label maker to grab that order and print 5 labels just for that one order ? Quote Link to comment Share on other sites More sharing options...
data2700 Posted February 1, 2005 Share Posted February 1, 2005 So if a order has 5 items on that one order you want to be able to get the label maker to grab that order and print 5 labels just for that one order ? <{POST_SNAPBACK}> Yes, exactly! ... one unique label for each item a customer has ordered using the database information that is readily available. As it is now, I have to print out what I can from OScommerce and then make these labels using some other program (usually word). I haven't seen a contribution out there that addresses actual sticky labels on products, they all are focused on making invoices, packing slips and other nifty stuff. Using the batch print center I could hand the labels, invoice, packing slip and mailing label to someone else and they could then go and Pick the order, Fill the order and stick it in a box and ship it, leaving me to continue loading up the database and working on the website! Quote Link to comment Share on other sites More sharing options...
Guest Posted February 3, 2005 Share Posted February 3, 2005 Great Contribution! I have created a modfified invoice template that I would be willing to share but I am not sure if it would be of value to another store as it includes information such as Job Number (invoice number), Job Name (From another contribution that allows the customer to name their order). I have also added the TIME to the order and comments date. Here is my Question. Now that I have this great looking template, I was wondering if any one knew of a way that we could put a button on the admin orders page that would allow the admin to print just the order they are viewing. In other words, I love the fact that I can print 20 orders out through the print center, but for that last minute order (or if my shipping guy needs just one order printed out) you would be able to simply click a button on the order page and print that order into a pef with the same look as my invoice template (I only use 1 template and have removed the others). Let me know if anyone has any thoughts on this. Quote Link to comment Share on other sites More sharing options...
blurb Posted February 3, 2005 Author Share Posted February 3, 2005 Yes, exactly! ... one unique label for each item a customer has ordered using the database information that is readily available. As it is now, I have to print out what I can from OScommerce and then make these labels using some other program (usually word). I haven't seen a contribution out there that addresses actual sticky labels on products, they all are focused on making invoices, packing slips and other nifty stuff. <{POST_SNAPBACK}> Ok its certainly possible.. I did while creating batch print center think about the ability to pull products from the database instead of just orders but my sql skills aren't crash hot so I left it alone. It may require some code to be placed into the batch_print.php aswell as a new template. The logic I see is to use the current label template to pull each order you want then loop through those orders grabbing the product/model etc info and placing each one onto a label. The current code for the labels I don't know how it works. As mentioned in the readme it came from the batch label contrib and so ideally if we could chat to the person behind batch label you would be closer to getting the template you want created. Quote Link to comment Share on other sites More sharing options...
blurb Posted February 4, 2005 Author Share Posted February 4, 2005 Here is my Question. Now that I have this great looking template, I was wondering if any one knew of a way that we could put a button on the admin orders page that would allow the admin to print just the order they are viewing. In other words, I love the fact that I can print 20 orders out through the print center, but for that last minute order (or if my shipping guy needs just one order printed out) you would be able to simply click a button on the order page and print that order into a pef with the same look as my invoice template (I only use 1 template and have removed the others). Let me know if anyone has any thoughts on this. <{POST_SNAPBACK}> Ok here is a quick dirty little hack that will change the order number on your order.php into a button which takes you past the batch print form straight to the batch print download pdf page. This hack will mean when your on the orders page showing you the list of orders the left column becomes buttons to batch print. Now this is providing your using the same orders.php as me but basically find <?php echo '#' . $orders['orders_id']; ?> and replace with <FORM action="batch_print.php?act=1" method="post"> <INPUT type=hidden name=file_type value=Invoice.php> <INPUT type=hidden value="<?php echo $orders['orders_id']; ?>" name=invoicenumbers> <INPUT title=" Batch Print " type=submit value="<?php echo $orders['orders_id']; ?>"> </FORM> Taking care to change the above so where it says Invoice.php change to the name of your php template you wish to use. Let me know how you go. Im sure there is a easier way to do this by passing the values via the url but the above works and I hope its what your after. cheers shaun Quote Link to comment Share on other sites More sharing options...
Branden Posted February 4, 2005 Share Posted February 4, 2005 For some reason everything I do comes out alligned wromg vertically...like for invoices, it prints outside the box for some reason. Quote Link to comment Share on other sites More sharing options...
data2700 Posted February 4, 2005 Share Posted February 4, 2005 Ok its certainly possible..I did while creating batch print center think about the ability to pull products from the database instead of just orders but my sql skills aren't crash hot so I left it alone. ...... it came from the batch label contrib and so ideally if we could chat to the person behind batch label you would be closer to getting the template you want created. <{POST_SNAPBACK}> I will try and locate the creator(s) of that mod and see if they can contribute a bit more to help out a PHP challenged end-user (me!) Thanks for your help so far! Quote Link to comment Share on other sites More sharing options...
blurb Posted February 4, 2005 Author Share Posted February 4, 2005 For some reason everything I do comes out alligned wromg vertically...like for invoices, it prints outside the box for some reason. <{POST_SNAPBACK}> I posted a reply to this yesterday but some how it seems to have gone missing. What type of paper are you using ? a4 ? letter ? Maybe you address format is different to the default one I use. I know radders had to change his templates because in the UK (i think he said he was in the UK) the address format is a different layout which falls outside the boxs. Anyway you may have to tweak you template to get things right. If you look the help files in the package it talks about using the grid template to help work out where things are supposed to be. cheers shaun Quote Link to comment Share on other sites More sharing options...
data2700 Posted February 5, 2005 Share Posted February 5, 2005 Ok its certainly possible..I did while creating batch print center think about the ability to pull products from the database instead of just orders but my sql skills aren't crash hot so I left it alone. It may require some code to be placed into the batch_print.php aswell as a new template. The logic I see is to use the current label template to pull each order you want then loop through those orders grabbing the product/model etc info and placing each one onto a label. The current code for the labels I don't know how it works. As mentioned in the readme it came from the batch label contrib and so ideally if we could chat to the person behind batch label you would be closer to getting the template you want created. <{POST_SNAPBACK}> Looks like someone else is trying to get product labeling made as well... this post comes from the Batch Order Center thread.... hopefully I can get a response there. I have no way of contacting the Batch Order Contrib author, as he does not give his contact information with the post. hmmmmm Here is the other link http://www.oscommerce.com/forums/index.php?sho...ndpost&p=514540 Quote Link to comment Share on other sites More sharing options...
♥radders Posted February 5, 2005 Share Posted February 5, 2005 Actually what I did was to use the standard osc address formats rather than the one defined in the contribution. That way it works for all countries. afaik it had nothing to do with the positioning on the paper. People who use 'Letter' may need to adjust the templates as I think this format is slightly shorter than A4. Vertical alignment adjustments are pretty easy to make once you know which parameter, in the list which defines the box, to change. I suspect though it is to do with the global font size and global line spacing. In the version I downloaded these were set way too big! Quote Link to comment Share on other sites More sharing options...
blurb Posted February 5, 2005 Author Share Posted February 5, 2005 Actually what I did was to use the standard osc address formats rather than the one defined in the contribution. That way it works for all countries. <{POST_SNAPBACK}> I wondered about that .. cause the layout i used was either the way batch print did it in the original contrib or its the original way the address's are done in my version os oscommerce which is the Linda McGrath version from WebMakers.com. As with most things though it works for me so i left it alone for another day when i got nothing else to fix :) Quote Link to comment Share on other sites More sharing options...
Guest Posted February 10, 2005 Share Posted February 10, 2005 I already had batch order installed, but this looks even better! I am getting an error, though. The page where I enter the date range looks, and works, beautifully. However, when I push the button that should take me to the page that tells me how many orders I have to print out, this is what I get: Warning: fopen(includes/modules/batch_print/temp_pdf/batch_orders.pdf): failed to open stream: Permission denied in /home/httpd/vhosts/the-buying-group.com/httpdocs/admin/batch_print.php on line 130 Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/the-buying-group.com/httpdocs/admin/batch_print.php:130) in /home/httpd/vhosts/the-buying-group.com/httpdocs/admin/batch_print.php on line 162 Here are line 129 through 136 on that page: $fname = BATCH_PDF_DIR . BATCH_PDF_FILE; if ($fp = fopen($fname,'w')) { fwrite($fp,$pdf_code); fclose($fp); } else { message_handler('FAILED_TO_OPEN'); } // changed below to cause pdf to open in a new window $message = 'A PDF of ' . $num . ' record(s) was successful! <a href="'.$fname.'" target="_blank"><b>Click here</b></a> to download the order file.'; Here are lines 158 through 167: // FUNCTION AREA function message_handler($message=''){ if ($message) { header("Location: " . tep_href_link(BATCH_PRINT_FILE, 'mkey=' . $message)); } else { header("Location: " . tep_href_link(BATCH_PRINT_FILE)); } exit(0); } I didn't change anything on this page, just saved it exactly as it was in the zip file. If anyone can help, I'd appreciate it. --Rachel Quote Link to comment Share on other sites More sharing options...
blurb Posted February 10, 2005 Author Share Posted February 10, 2005 Warning: fopen(includes/modules/batch_print/temp_pdf/batch_orders.pdf): failed to open stream: Permission denied in /home/httpd/vhosts/the-buying-group.com/httpdocs/admin/batch_print.php on line 130 Well firstly I would make sure that the directory includes/modules/batch_print/temp_pdf/ exisits and is chmod 777 and also create a file (empty is ok) called batch_orders.pdf and make sure its chmod to 777 The above error just seems like it can't open the file for writing so it should only be a permission error .. see how you go with that and then take it from there. cheers shaun Quote Link to comment Share on other sites More sharing options...
Guest Posted February 11, 2005 Share Posted February 11, 2005 Yea, that works! Thank you, Shaun! For some reason, batch-orders in the temp folder was set to 644 all of a sudden. Thanks again for the fast help. --Rachel Quote Link to comment Share on other sites More sharing options...
Guest Posted April 6, 2005 Share Posted April 6, 2005 Hi, Ihave just installed this contribution and can not get it to print out the labels, all I get is a blank pdf document with 50 pages, wigh are the amount of records I selected. Can anyone please advise what I am doing wrong or is there a code error???? Thanks Julian 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.