daniel_t Posted April 21, 2004 Posted April 21, 2004 Like the title says i'm looking for something that will let me print out address labels to stick on the outsides of the packages for all the pending orders. I've got paper with 6 peel off labels per sheet. Is there a contrib that does this or something similar? (i've had a quick look, but the search isn't great...) Basically I just want a link somewhere in the orders section that when I click, it opens a new window, does a db query something like this: SELECT customers_name, customers_street_address, customers_city, customers_state, customers_postcode, customers_country FROM orders WHERE orders_status="1"; and then chucks em onto the page(s) like so: ___________________ | | | addr 1 addr 2 | | | | | | addr 3 addr 4 | | | | | | addr 5 addr 6 | |__________________| so we can print them out all at once rather than having to copy and paste each address into a word document or something. I'm happy to make this as a contrib, but unfortunately I know zero php. I know a couple of other languages so I can generally read php code & stuff. anyway before I do any more, is there already something out there that does this? (im surprised I havent come across anyone else needing this, how does everyone else that gets bulk orders cope with labelling packages??)
glusniffer1 Posted April 21, 2004 Posted April 21, 2004 Ive been looking for a while and nothing seems to be there...I did how evr find this ....See if you can make sense of it....let me know how it goes Invoice The Hobby Undergound..."For The Pure Hobbyist"
daniel_t Posted April 22, 2004 Author Posted April 22, 2004 hmmm looks like theres nothing out there that does it :/
mutter Posted April 28, 2004 Posted April 28, 2004 I have a file that call my "in process" orders and order the addresess in two colums like you want. But the file code is adapted to my store needs (spanish store, and other address format), so you'll have to change some things. And other "little" problems is to have the right size of the cells to fix you labels. Let me know, if you want the file. I can upload as a contribution, but right now i'am installing some importants contribs.
Guest Posted May 12, 2004 Posted May 12, 2004 I am also trying to find a way to print labels with Avery paper (8160) - 3 columns of 10. I have created a new page to grab "Active" customers and display them on a page in a single column, but I don't know how to get 3 columns of 10. So if a php guru could at least help with 3 columns of 10 that would keep repeating that would be great! Newbie to php :D so if anyone can help that would be great, my code isn't Osc standard but it may help others... who knows. Here it is: <?php $colname_rsLabels = "1"; if (isset($_GET['status'])) { $colname_rsLabels = (get_magic_quotes_gpc()) ? $_GET['status'] : addslashes($_GET['status']); } mysql_select_db($database_connES, $connES); $query_rsLabels = sprintf("SELECT c.customers_id, c.customers_active, c.customers_lastname, c.customers_firstname, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_company, zones.zone_name FROM (customers AS c LEFT JOIN address_book AS a ON (c.customers_default_address_id = a.address_book_id) AND (c.customers_id = a.customers_id)) LEFT JOIN zones ON a.entry_zone_id = zones.zone_id WHERE (((c.customers_active)=%s)) ORDER BY c.customers_lastname, c.customers_firstname", $colname_rsLabels); $rsLabels = mysql_query($query_rsLabels, $connES) or die(mysql_error()); $row_rsLabels = mysql_fetch_assoc($rsLabels); $totalRows_rsLabels = mysql_num_rows($rsLabels); ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Shipping Labels</title> <link href="../stylesheet.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- .style1 { font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; } body { background-color: #FFFFFF; } --> </style> </head> <body> <br> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0"> <?php do { ?> <tr> <td><span class="style1"><?php if ($row_rsLabels['entry_company'] != "") echo $row_rsLabels['entry_company'] . "<br>"; ?> <?php echo $row_rsLabels['customers_firstname'] . " " . $row_rsLabels['customers_lastname']; ?> <br> <?php echo $row_rsLabels['entry_street_address']; ?><br> <?php if ($row_rsLabels['entry_suburb'] != "") echo $row_rsLabels['entry_suburb'] . "<br>"; ?> <?php echo $row_rsLabels['entry_city']; ?>, <?php echo $row_rsLabels['zone_name']; ?> <?php echo $row_rsLabels['entry_state']; ?> <?php echo $row_rsLabels['entry_postcode']; ?></span> <br> <br> </td> </tr> <?php } while ($row_rsLabels = mysql_fetch_assoc($rsLabels)); ?> </table> </body> </html> <?php mysql_free_result($rsLabels); ?> Hope this helps someone!!! Thanks to anyone that can help, I think a label system would be a great help to everyone!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.