Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.



Recommended Posts



I have orderlist3.3.zip installed and it is a greet contribution and we are using it to put are orders to the whole sales manufactor.


But there is only one problem when you see the orderlist it is not possible to see the actualy stock of that product. So we have to check this in the catalog.


I was searching and trying for some days now but I cannot find how I have to addapt the code so he will display the stock quantity at the moment.


The problem is this contribution is getting data from order_products and we need data from products tabel.


Is there someone who can help us with this ?


Here is the code of the orderlist:




$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



Copyright © 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


// Buffering






require(DIR_WS_CLASSES . 'currencies.php');

$currencies = new currencies();

include(DIR_WS_CLASSES . 'order.php');



$order_status = $select_order_status;

$display_order_status = $order_status;

if ($order_status == "")


$order_status = 1;



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">



<title><?php echo TITLE . ' - ' . OL_TITLE ?></title>

<link rel="stylesheet" type="text/css" href="orderlist-styles.css" media="all" >




<h1><?php echo OL_HEAD; ?></h1><br>




$query_status = "SELECT * FROM `orders_status` where `orders_status_id` = $order_status AND language_id = $languages_id";

$status_result = tep_db_query($query_status);

while ($row4 = tep_db_fetch_array($status_result))


echo "(";

$orders_status_name = $row4['orders_status_name'];

echo $orders_status_name;

echo ")";







<form name="orderstatus" method="post" action="<?php echo $PHP_SELF?>">



$query_status = "SELECT * FROM `orders_status` WHERE language_id = $languages_id";

$status_result = tep_db_query($query_status);

echo OL_SELECT_STATUS . " ";

echo "<select name=\"select_order_status\">";

echo "<option value=></option>";

while ($row3 = tep_db_fetch_array($status_result))


echo "<option value=";

echo $row3['orders_status_id'];

echo ">";

echo $row3['orders_status_name'];

echo "</option><br>";


echo "</select>";


<input type="submit" name="Submit" value="<?php echo OL_SUBMIT; ?>"> <input type="button" value="<?php echo OL_PRINT; ?>" onClick="window.print()" />







<TABLE width="100%" align=center cellSpacing=1 cellPadding=4 border=1>


<TR class="headers">

<TD class="orderNr" align="center"><?php echo OL_ORDERNR; ?></TD>

<TD class="date" align="center"><?php echo OL_DATE; ?></TD>

<TD class="name"><?php echo OL_NAME; ?></TD>

<TD class="details"><?php echo OL_DETAILS; ?></TD>





$query1 = "SELECT * FROM `orders` WHERE orders_status = $order_status ORDER BY orders_id DESC";

$result = tep_db_query($query1);


while ($row = tep_db_fetch_array($result)) {

$ordernummer = $row['orders_id'];




<TD align="center">

<b><?php echo $ordernummer; ?></b></TD>



<TD align="center">

<?php echo tep_datetime_short($row['date_purchased']); ?></TD>



<?php echo OL_CUSTOMERNAME .' '. $row{'delivery_name'}; ?><br>

<?php echo OL_ADDRESS .' '. $row{'delivery_street_address'}; ?><br>

<?php echo OL_CITY .' '. $row{'delivery_city'}; ?><br>

<?php echo OL_ZIP .' '. $row{'delivery_postcode'}; ?><br>

<?php echo OL_TEL .' '. $row{'customers_telephone'}; ?><br>

<?php echo OL_EMAIL .' '. $row{'customers_email_address'}; ?>







$order = new order($ordernummer);

for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {


<b><?php echo $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name']; ?></b><br>

<b><?php echo $products['quantity'] . ' x ' . $order->products[$i]['name']; ?></b><br>

<?php echo OL_MODEL . ' ' . $order->products[$i]['model']; ?><br>




<?php echo '--------------------------------------'; ?><br>

<?php echo $row{'payment_method'}; ?><br>


for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {


<?php echo '<br>' . $order->totals[$i]['title'] . ' ' . $order->totals[$i]['text']; ?>















<p> </p>








Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...