99darkgreenGT Posted February 2, 2004 Share Posted February 2, 2004 http://www.oscommerce.com/community/contributions,1836 anyone now what directory to install this in? Quote Link to comment Share on other sites More sharing options...
safoo Posted February 4, 2004 Share Posted February 4, 2004 You can always just upload and try it out. Thats what I did. I put it in my admin directory. then you can access it as admin/orderlist.php Quote Link to comment Share on other sites More sharing options...
99darkgreenGT Posted February 4, 2004 Author Share Posted February 4, 2004 yes, i have done that, but now i get this error: Warning: mysql_connect(): Access denied for user: '******@localhost' (Using password: YES) in /home/username/public_html/catalog/admin/orderlist.php on line 64 Unable to connect to MySQL are there any other files that need to be edited? thanks. i really want to get this to work! :D Quote Link to comment Share on other sites More sharing options...
Guest Posted February 4, 2004 Share Posted February 4, 2004 yes, i have done that, but now i get this error: Warning: mysql_connect(): Access denied for user: '******@localhost' (Using password: YES) in /home/username/public_html/catalog/admin/orderlist.php on line 64 Unable to connect to MySQL are there any other files that need to be edited? thanks. i really want to get this to work! :D just copy it to the root of the admin folder. you will need to edit the file to provide the login information into the database. another thing i discovered messing with it is that if you have changed your order statuses from the default, you will need to tweak the file, it is hardcoded to only look for orders with a status of "1". B) Quote Link to comment Share on other sites More sharing options...
99darkgreenGT Posted February 5, 2004 Author Share Posted February 5, 2004 anyone know how or what i need to enter for my database? $database = "******"; i have no idea what to put here, or where i could find what i am suppose to. as of now, i get the following error: Could not select first_test thanks for the help. Quote Link to comment Share on other sites More sharing options...
Guest Posted February 5, 2004 Share Posted February 5, 2004 you put the name of your db..... :blink: same thing you put in your configure.php Quote Link to comment Share on other sites More sharing options...
99darkgreenGT Posted February 5, 2004 Author Share Posted February 5, 2004 thanks.....that worked. btw, i did not set up my oscommerce site, my web host did. i am still learning php :P :D now is there any way it can list the product attributes, as well as customer shipping information and shipping method? if i knew php i would take a stab at it, but like i said i am a newbie :o :lol: Quote Link to comment Share on other sites More sharing options...
Guest Posted February 5, 2004 Share Posted February 5, 2004 thanks.....that worked. btw, i did not set up my oscommerce site, my web host did. i am still learning php :P :D now is there any way it can list the product attributes, as well as customer shipping information and shipping method? if i knew php i would take a stab at it, but like i said i am a newbie :o :lol: good question....no idea...I didnt write it....just got it working couple days ago....but now that i think of it, it would be kinda cool to list all the information.... might have to copy some code from the invoice.php or orders.php to get this data Quote Link to comment Share on other sites More sharing options...
Guest Posted February 5, 2004 Share Posted February 5, 2004 you can always use excel or access and odbc to get that info Quote Link to comment Share on other sites More sharing options...
99darkgreenGT Posted February 5, 2004 Author Share Posted February 5, 2004 you can always use excel or access and odbc to get that info is there already some sort contrib that does this? if not could you possibly elaborate how to do this? thanks Quote Link to comment Share on other sites More sharing options...
zlack Posted February 7, 2004 Share Posted February 7, 2004 Hello all, i wrote it, but why would you want to see what kind of shipping method it is ? if you tell me what you want i can try to make it :) Quote It's easier to remember, then to forget Link to comment Share on other sites More sharing options...
99darkgreenGT Posted February 8, 2004 Author Share Posted February 8, 2004 basically, i want something that will make it easier to send my orders to my wholesaler. our site does not stock inventory and whenever we have a sale, we just manually copy the order information into an email and send it to our wholesaler. they then ship the order for us. it can be really time consuming to manually do each order. i would like something that can be run and copied/exported to email capturing multiple orders at one time (possibly the whole days worth of orders). this would save us a ton of time. this contrib seems like it might be able to pull it off for us. i probably spend about an hour a day copying and pasting the order information into emails for our wholesaler. if there is a contrib that already does something like this, please let me know. i have looked through the contribs a number of times, but don't recall seeing something that does this. if there isn't one, i'd like to see one developed if possible. thanks in advance. B) Quote Link to comment Share on other sites More sharing options...
♥stubbsy Posted February 23, 2004 Share Posted February 23, 2004 Hey zlack this is a really handy contribution. I've been trying to add shipping address and telephone number to it but so far have failed. Would this be possible for you to add? Or could someone post the code needed? Cheers stubbsy Quote Link to comment Share on other sites More sharing options...
mutter Posted February 25, 2004 Share Posted February 25, 2004 Just play with the code, if you want that the orderlist contribution show the customer delivery address, etc, you can add this: <?php echo "".$row{'delivery_name'}; echo "<br>".$row{'delivery_street_address'}; echo "<br>".$row{'delivery_suburb'}; echo "<br>".$row{'delivery_postcode'}; echo "<br>".$row{'delivery_city'} . ", " . $row{'delivery_state'}; ?> </FONT></TD> Send me a PM if you want my file... Quote Link to comment Share on other sites More sharing options...
mutter Posted February 25, 2004 Share Posted February 25, 2004 I edited orderlist.php so now shows delivery address, payments method, subtotal, shipping, total and attributes. And now the orders are not repited if there are more than one product in the order. this is the code: <?php /* $Id: orderlist.php, v 1.0 2004/2/1 21:08:47 dgw_ Exp $ Made by zlack, www.partshop.nl osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2004 osCommerce Released under the GNU General Public License This is not a real "contribution" but more an addon. Since i order each day (i keep no stock) i found it very much work to open each order to see what someone ordered. This little script does that for me, and shows everything nice in tables, so i can e-mail the output to my distributor :) Questions, comments, thank you's and so on: zlack AT partshop.nl */ require('includes/application_top.php'); require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); include(DIR_WS_CLASSES . 'order.php'); ?> <html> <head> <title>Ordenes en Proceso</title> </head> <body> <TABLE style="BORDER-COLLAPSE: collapse" borderColor=#666666 cellSpacing=1 borderColorDark=#aaaaaa cellPadding=4 width="100%" align=center borderColorLight=#aaaaaa border=1> <TBODY> <font face=verdana> <TR bgcolor=cccccc> <TD><FONT face=verdana size=2> <b>Orden</TD> <TD><FONT face=verdana size=2> <b>Enviar a:</TD> <TD><FONT face=verdana size=2> <b>Productos:</TD> </TR> <?php $username = "yourdbusername"; $password = ""; $hostname = "localhost"; $database = "yourdbname"; $dbh = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL"); $selected = mysql_select_db($database,$dbh) or die("Could not select a database"); $result = mysql_query("SELECT * FROM `orders` WHERE orders_status = '1'"); while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) { if (tep_not_null($row['delivery_company'])) { $compan = $row['delivery_company']; $linea = "<br>"; } else { $compan = ""; $linea = ""; } $ordernummer = $row{'orders_id'}; // Query de order $resultaat2 = mysql_query("SELECT * FROM `orders_products` WHERE orders_id = $ordernummer GROUP BY orders_id"); while ($row2 = mysql_fetch_array($resultaat2,MYSQL_ASSOC)) { ?> <TR> <TD borderColorLight=#aaaaaa bgColor=#efefef borderColorDark=#aaaaaa><FONT face=arial size=2><b> <?php echo "#" .$ordernummer; ?> </b></FONT></TD> <TD borderColorLight=#aaaaaa bgColor=#efefef borderColorDark=#aaaaaa><FONT face=verdana size=2> <?php echo $row{'delivery_name'} . "\n"; echo $linea . ' ' . $compan . "\n"; echo "<br>".$row{'delivery_street_address'} . "\n"; echo "<br>Col. ".$row{'delivery_suburb'} . "\n"; echo "<br>C.P. ".$row{'delivery_postcode'} . "\n"; echo "<br>".$row{'delivery_city'} . ", " . $row{'delivery_state'} . "\n"; echo "<br>Tel. ".$row{'customers_telephone'} . "\n"; ?> </FONT></TD> <TD borderColorLight=#aaaaaa bgColor=#efefef borderColorDark=#aaaaaa> <?php $order = new order($ordernummer); for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) { echo '<font face=arial size=2>' . $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . '</font>' . "\n"; if (isset($order->products[$i]['attributes']) && (($k = sizeof($order->products[$i]['attributes'])) > 0)) { for ($j = 0; $j < $k; $j++) { echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . "\n"; if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')'; echo '</i></small></nobr>'; } } echo ' <font face=verdana size=1><br><b>Modelo:</b> ' . $order->products[$i]['model'] . ' <b>Precio:</b> ' . $order->products[$i]['final_price'] . '<br><br>' . "\n"; } echo "--------------------<br><b>Metodo de Pago:</b> ". $row{'payment_method'} . "<br>"; for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) { echo '<br>' . $order->totals[$i]['title'] . "\n" . $order->totals[$i]['text'] . "\n"; } ?> </font></TD> </TR> <?php } } mysql_close($dbh); ?> </table> </body> </html> Quote Link to comment Share on other sites More sharing options...
♥stubbsy Posted February 25, 2004 Share Posted February 25, 2004 Thanks mutter, just what I was after - nice work :) btw hope you don't mind, I translated the text back to english :) <?php echo "<b>Name:</b> ".$row{'delivery_name'} . "\n"; echo "<br><b>Company:</b> " . ' ' . $compan . "\n"; echo "<br><b>Address 1:</b> ".$row{'delivery_street_address'} . "\n"; echo "<br><b>Address 2:</b> ".$row{'delivery_suburb'} . "\n"; echo "<br><b>Town / County:</b> ".$row{'delivery_city'} . ", " . $row{'delivery_state'} . "\n"; echo "<br><b>Postcode :</b> ".$row{'delivery_postcode'} . "\n"; echo "<br><b>Telephone:</b> ".$row{'customers_telephone'} . "\n"; ?> Quote Link to comment Share on other sites More sharing options...
mattwho Posted February 26, 2004 Share Posted February 26, 2004 I get this error: Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /hsphere/local/home/oneathen/mysite.com/admin/orderlist.php on line 64 Unable to connect to MySQL Quote Link to comment Share on other sites More sharing options...
safoo Posted March 1, 2004 Share Posted March 1, 2004 I like the new updated version that also shows multiple statuses of orders. I was wondering if there is a way to order by products_id instead of orders_id? Quote Link to comment Share on other sites More sharing options...
svepe Posted April 18, 2004 Share Posted April 18, 2004 Hi all, Like this script. Would like to add a feature though that displays the comments added to orders in the "notes" field. I would like it to list the following but I'm no coder so I doesn't know how to write it |orders_status_history -> comments| when |orders_status_history -> orders_status_id=2 [or where the orders_status_id= status you have selected..] If anyone would like to help I really appreciate it! Thanx! Quote Link to comment Share on other sites More sharing options...
♥stubbsy Posted April 28, 2004 Share Posted April 28, 2004 That is exaclty what I'm trying to do, I have made the table for it to appear in but don't know the code to printthe comments in the table? This is what I have which doesn't work, because i guess it is looking for the info in the orders table <?php echo "<b>Comments:</b> ".$row{'comments'} . "\n"; ?> Any ideas anyone? cheers stubbsy Quote Link to comment Share on other sites More sharing options...
mutter Posted April 29, 2004 Share Posted April 29, 2004 Hi, to add the comments of the orders try this (in the code that i post in this same topic). Add // Comments query $statuses_query = mysql_query("select comments from orders_status_history WHERE orders_id = $ordernummer and orders_status_id = '1'"); while ($statuses = mysql_fetch_array($statuses_query)) { just after $ordernummer = $row{'orders_id'}; -------- Then, add echo '<br><br>Comentarios: ' . $statuses{'comments'} . "\n"; After echo '<br><a href="mailto:' . $row{'customers_email_address'} . '"><font size=1>' . $row{'customers_email_address'} . '</font></a>' . "\n"; ---------- and before mysql_close($dbh); add } Let me know if work for you.. Quote Link to comment Share on other sites More sharing options...
mutter Posted April 29, 2004 Share Posted April 29, 2004 Remember to change orders_status_id = '1'" to the status number that you have in the result query: $result = mysql_query("SELECT * FROM `orders` WHERE orders_status = '1'"); Quote Link to comment Share on other sites More sharing options...
♥stubbsy Posted April 29, 2004 Share Posted April 29, 2004 Thanks very much for that, works a treat :) cheers stubbsy Quote Link to comment Share on other sites More sharing options...
1nsane Posted May 19, 2004 Share Posted May 19, 2004 Has anybody had any problems outputting the CSV file when using a secure SSL admin tool? If so, what was your solution? Quote Link to comment Share on other sites More sharing options...
1nsane Posted May 21, 2004 Share Posted May 21, 2004 anybody? 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.