HSMagic Posted February 18, 2007 Share Posted February 18, 2007 I have Contrib "Sales between two dates" and is nice for a report, but I want the output to be able to cut/paste to Excel. A great contrib with the output I'm looking for is Stock View. The entire code (a few mods by me) is below. How can I use similar code to pull a report that contains order information. All I really want is Order ID, Customer Name, and Order Total. Any Help is appreciated! <?php /* $Id: stockview.php,v 1.00 2005/03/07 osCommerce Simple StockViewer Contribution based on: osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 - 2005 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <head> <body> <table width="700" class="infoBoxContents"> <tr> <td colspan="2" class="infoBoxHeading" align="center">osCommerce StockView Version 1.0. </td> </tr> <? echo "<tr><td><b>". 'Products ID' . "</b></td><td><b>" . 'Products Name' . "</b></td> <td><b>" . 'Products Model' . "</b></td> <td><b>" . 'Products Status' . "</b></td><td><b>". 'Stock Quantity ' . "</b></td><td><b>". 'Wholesale Cost ' ."</b></td> </tr><tr>"; $result = mysql_query("SELECT * FROM products, products_description WHERE products.products_id = products_description.products_id and products_description.language_id = '" . $languages_id . "' ORDER BY products_description.products_name"); if ($row = mysql_fetch_array($result)) { do { echo "<td class='infoBoxContents'> ".$row["products_id"]."</td>\n"; echo "<td class='infoBoxContents'>".$row["products_name"]."</td>\n"; echo "<td class='infoBoxContents'>".$row["products_model"]."</td>\n"; echo "<td class='infoBoxContents'>".$row["products_status"]."</td>\n"; echo "<td class='infoBoxContents'>".$row["products_quantity"]."</td>\n"; echo "<td class='infoBoxContents'>".$row["products_cost"]."</td>\n"; echo "</tr>\n"; } while($row = mysql_fetch_array($result)); } echo "</table>\n"; ?> <p class="smallText" align="right"><?php echo '<a href="java script:window.close()">' . TEXT_CLOSE_WINDOW . '</a>'; ?> </p> <br> </body> </html> <?php require('includes/application_bottom.php'); ?> Quote Link to comment Share on other sites More sharing options...
HSMagic Posted February 19, 2007 Author Share Posted February 19, 2007 I managed to do what I wanted by editing orders.php. I've posted the full explanation on this thread: http://www.oscommerce.com/forums/index.php?showtopic=251368 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.
Note: Your post will require moderator approval before it will be visible.