Jump to content
Sign in to follow this  
99darkgreenGT

Orderlist contrib

Recommended Posts

Hi again,

I seem to have another problem with this module. I can't get the manufacturer to print out on the order list. I've installed it in two different carts and it doesn't work in either of them.

 

My hunch is there's something wrong with the array in "admin/orderlist.php".

 

Any thoughts? :huh:

 

Corinne

Share this post


Link to post
Share on other sites

Hi,

 

I have just installed orderlist 4.0 and I have the same problem as cg-tbear. I can't see the manufacturer. Has anybody solved the problem yet?

 

Alex

Share this post


Link to post
Share on other sites

anyone know if it's possible to alphabetize ALL products (not by order)

Share this post


Link to post
Share on other sites

Hi,

I have just installed orderlist 4 and it is just what i needed. :thumbsup: thanks!! it includes attributes which is great.

 

I noticed earlier versions have the option to print to file which i also really need but 4 only prints to paper.

 

Can anybody help with the code to do this.

 

It would be much appreciated.

thanks

Share this post


Link to post
Share on other sites

Still really love this Contrib. It has made my life much easier.

I need it to be printed for what I do. Is there something I'm missing in the printout to make it paginate the table? I get orders broken up across pages regularly. I'm using 3.3. Is pagination fixed in later versions? It doesn't look like it's in 4.0.


-Dan

Always, always back up your files before you make any changes!

Share this post


Link to post
Share on other sites

Hi all,

 

I was just wondering if there was any plans to develop this, i was thinking if there could be an option to 'update order status' from the order list page, then you could select to check all (or maybe 1 or 2), then select a status from a drop down list and click an update button which could automatically update the status of the orders in admin and send the automated emails to the customers?

 

Just a little thought, i don't know whether something like this already exists. I've just started using this contribution and its great. Thanks.

 

Regards

 

Donna

Share this post


Link to post
Share on other sites

Donna,

Now that would be nice! I've made some alterations to mine and plan for more. Status change en masse would be nice. My alt has display of their answer to the Contrib called Ask Extra Questions. My folks select a shipping date when they order. I use the results to view which orders to drop into a status based on that and their location (distance determines shipper and day of week). Right now I keep several windows open and manually change status of orders one by one. There's another Contrib that allows you to do this from the orders page list. You might want to look at it to use and/or adapt to Orderlist. I forget the name.

Batch Order Center also has an update and email feature built in. If all of your orders will be updated from Pending to processing as you print the packing slip, this would work well, too. I use it for packing slips, but not the update feature.


-Dan

Always, always back up your files before you make any changes!

Share this post


Link to post
Share on other sites
Within the install file, it says MS1, anyone know if this works on MS2.2? Thanks

 

I'm using 2.2 and it works fine. I don't remember needing to change the code to make it work.


-Dan

Always, always back up your files before you make any changes!

Share this post


Link to post
Share on other sites

anyone have any idea how I can

 

print orders list by manufacture?

 

and

 

include the items image in the orderlist printed?

 

thanks

erick

Share this post


Link to post
Share on other sites

<?php
/*
$Id: orderlist.php, v 3.3 2005/2/10 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
*/
// Buffering
ob_start();

require('includes/application_top.php');


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">
<html>
<head>
<title><?php echo TITLE . ' - ' . OL_TITLE ?></title>
<link rel="stylesheet" type="text/css" href="orderlist-styles.css" media="all" >
</head>
<body>

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

<h2>
<?php

$query_status = "SELECT * FROM " . TABLE_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 THAT LETS YOU SELECT WHICH ORDER STATUS TO DISPLAY
?>
</h2>
<form name="orderstatus" method="post" action="<?php echo $PHP_SELF?>">

<?php echo OL_ENTRY_DAYS ?><input name="orderlist_days" type="text" id="orderlist_days" size="5">

<?php

 $query_status = "SELECT * FROM " . TABLE_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()" />

</form>




<TABLE width="100%" align=center cellSpacing=1 cellPadding=4 border=1>
<TBODY>
 <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>
</TR>

<?php
if (!isset($orderlist_days))
{ $orderlist_days=ORDERLIST_DAYS; }
$query1 = "SELECT * FROM " . TABLE_ORDERS . " WHERE orders_status = $order_status and TO_DAYS(NOW()) - TO_DAYS(date_purchased) < '" . $orderlist_days . "' ORDER BY orders_id DESC";
$result = tep_db_query($query1);

while ($row = tep_db_fetch_array($result))	{
	$ordernummer = $row['orders_id'];
?>

	   <TR>
		 <TD align="center" valign="top">
		<b>
		<?php echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $ordernummer . '&action=edit') . '" target="_NEW">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $ordernummer; ?>
		 </b></TD>


		 <TD align="center" valign="top">
		   <?php echo tep_datetime_short($row['date_purchased']);?></TD>

		 <TD valign="top">
		   <?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'}; ?>
		 </TD>


<TD valign="top">

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

  // Manufacturer Listing
//Use the products ID# to find the proper Manufacturer of this specific product
$v_query = tep_db_query("SELECT manufacturers_id FROM ".TABLE_PRODUCTS." WHERE products_id = '".$order->products[$i]['products_id']."'");
$v = tep_db_fetch_array($v_query);
//Select the proper Manufacturers Name via the Manufacturers ID# then display that name for a human readable output
$mfg_query = tep_db_query("SELECT manufacturers_name FROM ".TABLE_MANUFACTURERS." WHERE manufacturers_id = '".$v['manufacturers_id']."'");
$mfg = tep_db_fetch_array($mfg_query);
// End Manufacturer Listing	
?>
		   <b><a href="<?php echo tep_href_link(FILENAME_CATEGORIES, 'action=new_product_preview&read=only&pID=' . $order->products[$i]['products_id'] . '&oID=' . $oID . '&origin=' . FILENAME_ORDERS . '?oID=' . $oID  . '&retOID=' . $oID . '&retAction=edit');?>"><?php echo $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name']; ?></a></b> <?php echo OL_MODEL . $order->products[$i]['model']; ?><br><?php echo OL_MANU . $mfg['manufacturers_name']; ?><br>
<?php

// Modified to use the products_id for the product image instead of products_model since model is non-unique
$products_query_raw = "select products_image from products where products_id =" .  $order->products[$i]['id'];
$products_query = tep_db_query($products_query_raw);
$products = tep_db_fetch_array($products_query);
// Added 12/2005 Get Image from Data Base CED  
?>  

<?php
echo ' <tr class="dataTableRow">' . "\n" .
' <td class="dataTableContent" align="left">' . tep_image(DIR_WS_CATALOG . DIR_WS_IMAGES . $products['products_image'], $listing_values['products_image'], SMALL_IMAGE_HEIGHT, SMALL_IMAGE_WIDTH) . '</a> </td>' .
' <td class="dataTableContent" valign="top" align="left">' . $order->products[$i]['qty'] . ' </td>' . "\n" .
' <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];
?>		  
		<?php 

			//*******************************************
			//!!START MOD!!: Display Attribs
			//*******************************************
			//echo OL_MANU . ' ' . $mfg['manufacturers_name']."<br>";		//Doesn't work
			//echo OL_MODEL . ' ' . $order->products[$i]['model']."<br>";	//Doesn't work
			$j = 0;
			while ($products_options = $order->products[$i]['attributes'][$j]['option'])	{
				//$products_options = $order->products[$i]['attributes'][$j]['option'];
				$products_options_values = $order->products[$i]['attributes'][$j]['value'];
				echo "<b>$products_options</b> = $products_options_values<br>";
				$j++;
			}
			//*******************************************				
			//!!END MOD!!
			//*******************************************
		?>


<?php
}
?>
		   <?php echo '--------------------------------------'; ?><br>
		   <?php echo $row{'payment_method'}; ?><br>
<?php
  for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
?>
		   <?php echo '<br>' . $order->totals[$i]['title'] . ' ' . $order->totals[$i]['text']; ?>
<?php
}
?>


 </TD>
</TR>

<?php
  }

?>

</table>
</body>
</html>
<?php

ob_end_flush();
?>

 

 

 

Displays things much nicer now and includes a picture!!!

Share this post


Link to post
Share on other sites

Thanks for the great contribution...

 

Everything works fine before I tried to add the comment text in the orderlist. I got the comment text shows, however, it won't fit the page. Please help...

 

Here is the code I added to make the comment text shows:

 

After

 

<?php

$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'];

 

I added:

 

// Comments query
$statuses_query = mysql_query("select comments from orders_status_history WHERE orders_id = $ordernummer and orders_status_id = '2'");
while ($statuses = mysql_fetch_array($statuses_query)) {

 

and then I created a new row for the comment text,

 

after

 

<?php
  for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
?>
		   <?php echo '<br>' . $order->totals[$i]['title'] . ' ' . $order->totals[$i]['text']; ?>
<?php
}
?>
 </TD>
</TR>

 

I added:

 

<tr><td colspan="4">
<?php echo '<b>Comments:</b> ' . $statuses{'comments'} . "\n"; ?>
<?php
}
?>

 

Is there any way I can force the comment area fit the normal margin of the page?

 

Thank you in advance.

Share this post


Link to post
Share on other sites

My sample orderlist page can be viewed at: http://b2cshops.com/sample/admin/orderlist.php

 

I guess it might be some setting with the css file, however, I tried many ways without success. Here is the css file:

 

/* stylesheet for orderlist */
body, html {
margin: 0;
padding: 1em 0;
text-align: center;
font-family: arial, sans-serif;
font-size: 88%;
}
table {
margin: 1em auto;
border: 1px solid #e00;
width: 95%;
font-size: 1em;
}
td {
padding: 0.2em 0.3em;
font-size: 1em;
}
td {
border: 1px solid #aaa;
white-space: nowrap;
color: black;
background: #f6f6f6;
}
tr.headers td {
color: black;
background: #fe6;
white-space: nowrap;
border: 1px #aaa solid;
font-weight: bold;
text-align: center;
}
tr.headers td.orderStatus{
background: #eee;
text-align: right;
}
h1 {
color: #09c;
font-size: 1.5em;
background: #eee;
border: solid #e00 1px;
border-width: 2px  0;
width: 24em;
margin: 0 auto;
}
td.orderNr, td.price, td.qty {
text-align: center;
}
span.orderStat {
color: #d00;
}
span.date {
float: left;
}
/* column width's (should add up to 100%) */
td.orderNr {
width: 5%;
}
td.price {
width: 8%;
}
td.model {
width: 15%;
}
td.name {
width: 30%;
}
td.qty {
width: 8%;
}
td.chk {
width: 5%
}
td.notes {
width: 20%
}
@media print {
 body, html, table {
 font-size: 7pt;
 }
}

 

I appreciate any help.

 

Thanks!

Edited by iecwillow

Share this post


Link to post
Share on other sites

Has anyone made any progress on Orderlist so that you can show all orders irrespective of the order status?

 

This would be a really useful addition so that instead of selecting the order status that you want, you can select "All Orders"? Any suggestions would be appreciated.

 

Many thanks.

 

Paul.


You will never learn if you don't try. And boy am I trying....!

Share this post


Link to post
Share on other sites

I have found another slight issue in that my "Manufacturer" does not display anything. I have seen a couple of people with a similar problem but I have not seen a solution posted. I suspect that it is the query in some way so mine is posted below in case someone can point me in the right direction???

 

// Manufacturer Listing
//Use the products ID# to find the proper Manufacturer of this specific product
$v_query = tep_db_query("SELECT manufacturers_id FROM ".TABLE_PRODUCTS." WHERE products_id = '".$order->products[$i]['products_id']."'");
$v = tep_db_fetch_array($v_query);
//Select the proper Manufacturers Name via the Manufacturers ID# then display that name for a human readable output
$mfg_query = tep_db_query("SELECT manufacturers_name FROM ".TABLE_MANUFACTURERS." WHERE manufacturers_id = '".$v['manufacturers_id']."'");
$mfg = tep_db_fetch_array($mfg_query);
// End Manufacturer Listing	
?>
		   <b><a href="<?php echo tep_href_link(FILENAME_CATEGORIES, 'action=new_product_preview&read=only&pID=' . $order->products[$i]['products_id'] . '&oID=' . $oID . '&origin=' . FILENAME_ORDERS . '?oID=' . $oID  . '&retOID=' . $oID . '&retAction=edit');?>"><?php echo $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name']; ?></a></b> <?php echo OL_MODEL . $order->products[$i]['model']; ?><br><?php echo OL_MANU . $mfg['manufacturers_name']; ?><br>

 

Any suggestions would be gratefully received..........

 

Many thanks.

 

Paul.


You will never learn if you don't try. And boy am I trying....!

Share this post


Link to post
Share on other sites
I have found another slight issue in that my "Manufacturer" does not display anything. I have seen a couple of people with a similar problem but I have not seen a solution posted. I suspect that it is the query in some way so mine is posted below in case someone can point me in the right direction???

 

// Manufacturer Listing
//Use the products ID# to find the proper Manufacturer of this specific product
$v_query = tep_db_query("SELECT manufacturers_id FROM ".TABLE_PRODUCTS." WHERE products_id = '".$order->products[$i]['products_id']."'");
$v = tep_db_fetch_array($v_query);
//Select the proper Manufacturers Name via the Manufacturers ID# then display that name for a human readable output
$mfg_query = tep_db_query("SELECT manufacturers_name FROM ".TABLE_MANUFACTURERS." WHERE manufacturers_id = '".$v['manufacturers_id']."'");
$mfg = tep_db_fetch_array($mfg_query);
// End Manufacturer Listing	
?>
		   <b><a href="<?php echo tep_href_link(FILENAME_CATEGORIES, 'action=new_product_preview&read=only&pID=' . $order->products[$i]['products_id'] . '&oID=' . $oID . '&origin=' . FILENAME_ORDERS . '?oID=' . $oID  . '&retOID=' . $oID . '&retAction=edit');?>"><?php echo $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name']; ?></a></b> <?php echo OL_MODEL . $order->products[$i]['model']; ?><br><?php echo OL_MANU . $mfg['manufacturers_name']; ?><br>

 

Any suggestions would be gratefully received..........

 

Many thanks.

 

Paul.

Sorry to bump but just wondered if anyone can help??


You will never learn if you don't try. And boy am I trying....!

Share this post


Link to post
Share on other sites
Has anyone made any progress on Orderlist so that you can show all orders irrespective of the order status?

 

This would be a really useful addition so that instead of selecting the order status that you want, you can select "All Orders"? Any suggestions would be appreciated.

 

Many thanks.

 

Paul.

I'm sure someone out there can suggest how I can change Orderlist to show / select all statuses instead of having to select each one independantly. All I would like to be able to do is show every order (irrespective of status).

 

Please anyone..........???


You will never learn if you don't try. And boy am I trying....!

Share this post


Link to post
Share on other sites
I'm sure someone out there can suggest how I can change Orderlist to show / select all statuses instead of having to select each one independantly. All I would like to be able to do is show every order (irrespective of status).

 

Please anyone..........???

Just another "bump" in the hope that someone can help me to include an "All Statuses" option in the Orderlist. Here is my current orderlist.php code and I am trying to work out how to display All orders (irrespective of the status), using an "All Statuses" option in the query and form. Any help would be sincerely appreciated and may prove useful to everyone else that uses this excellent contrib. Thank you!!

ob_start();

require('includes/application_top.php');


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 =;
	}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><?php echo TITLE . ' - ' . OL_TITLE ?></title>
<link rel="stylesheet" type="text/css" href="orderlist-styles.css" media="all" >
</head>
<body>

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

<h2>
<?php

$query_status = "SELECT * FROM " . TABLE_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 THAT LETS YOU SELECT WHICH ORDER STATUS TO DISPLAY
?>
</h2>
<form name="orderstatus" method="post" action="<?php echo $PHP_SELF?>">

<?php echo OL_ENTRY_DAYS ?><input name="orderlist_days" type="text" id="orderlist_days" size="5">

<?php

 $query_status = "SELECT * FROM " . TABLE_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()" />

</form>




<TABLE width="100%" align=center cellSpacing=1 cellPadding=4 border=1>
<TBODY>
 <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>
</TR>

<?php
if (!isset($orderlist_days))
{ $orderlist_days=ORDERLIST_DAYS; }
$query1 = "SELECT * FROM " . TABLE_ORDERS . " WHERE orders_status = $order_status and TO_DAYS(NOW()) - TO_DAYS(date_purchased) < '" . $orderlist_days . "' ORDER BY orders_id DESC";
$result = tep_db_query($query1);

while ($row = tep_db_fetch_array($result))	{
	$ordernummer = $row['orders_id'];
?>

	   <TR>
		 <TD align="center" valign="top">
		<b>
		<?php echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $ordernummer . '&action=edit') . '" target="_NEW">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $ordernummer; ?>
		 </b></TD>


		 <TD align="center" valign="top">
		   <?php echo tep_datetime_short($row['date_purchased']);?></TD>

		 <TD valign="top">
		   <?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'}; ?>
		 </TD>


<TD valign="top">

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

  // Manufacturer Listing
//Use the products ID# to find the proper Manufacturer of this specific product
$v_query = tep_db_query("SELECT manufacturers_id FROM ".TABLE_PRODUCTS." WHERE products_id = '".$order->products[$i]['products_id']."'");
$v = tep_db_fetch_array($v_query);
//Select the proper Manufacturers Name via the Manufacturers ID# then display that name for a human readable output
$mfg_query = tep_db_query("SELECT manufacturers_name FROM ".TABLE_MANUFACTURERS." WHERE manufacturers_id = '".$v['manufacturers_id']."'");
$mfg = tep_db_fetch_array($mfg_query);
// End Manufacturer Listing	
?>
		   <b><a href="<?php echo tep_href_link(FILENAME_CATEGORIES, 'action=new_product_preview&read=only&pID=' . $order->products[$i]['products_id'] . '&oID=' . $oID . '&origin=' . FILENAME_ORDERS . '?oID=' . $oID  . '&retOID=' . $oID . '&retAction=edit');?>"><?php echo $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name']; ?></a></b> <?php echo OL_MODEL . $order->products[$i]['model']; ?><br><?php echo OL_MANU . $mfg['manufacturers_name']; ?><br>

		<?php 

			//*******************************************
			//!!START MOD!!: Display Attribs
			//*******************************************
			//echo OL_MANU . ' ' . $mfg['manufacturers_name']."<br>";		//Doesn't work
			//echo OL_MODEL . ' ' . $order->products[$i]['model']."<br>";	//Doesn't work
			$j = 0;
			while ($products_options = $order->products[$i]['attributes'][$j]['option'])	{
				//$products_options = $order->products[$i]['attributes'][$j]['option'];
				$products_options_values = $order->products[$i]['attributes'][$j]['value'];
				echo "<b>$products_options</b> = $products_options_values<br>";
				$j++;
			}
			//*******************************************				
			//!!END MOD!!
			//*******************************************
		?>

<?php
}
?>
		   <?php echo '--------------------------------------'; ?><br>
		   <?php echo $row{'payment_method'}; ?><br>
<?php
  for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
?>
		   <?php echo '<br>' . $order->totals[$i]['title'] . ' ' . $order->totals[$i]['text']; ?>
<?php
}
?>


 </TD>
</TR>

<?php
  }

?>

</table>
</body>
</html>
<?php

ob_end_flush();
?>


You will never learn if you don't try. And boy am I trying....!

Share this post


Link to post
Share on other sites

Hi All!

 

I just installed the New_Improved_Orderlist_v5.1b posted today by insomniac2. It's NICE!! Thanks so much, it's just what I needed.

 

Three things:

 

1) Today's Date (at top) is showing up Sunday, December 07, 2008. The start and end dates are defaulting just fine.

 

2) When i use the search function (like to search for customer name davis) I get this:

 

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'o.payment_method like '%davis%' or o.cc_number like '%davis%' order by o.orders' at line 1

 

select distinct * from orders o where o.orders_id like '%davis%' or o.orders_id like '%davis%' or o.customers_name like '%davis%' or o.customers_id like '%davis%' or o.customers_id like '%davis%' or o.customers_company like '%davis%' or o.customers_street_address like '%davis%' or o.customers_suburb like '%davis%' or o.customers_city like '%davis%' or o.customers_postcode like '%davis%' or o.customers_state like '%davis%' or o.customers_country like '%davis%' or o.customers_telephone like '%davis%' or o.customers_email_address like '%davis%' or o.delivery_name like '%davis%' or o.delivery_company like '%davis%' or o.delivery_street_address like '%davis%' or o.delivery_suburb like '%davis%' or o.delivery_city like '%davis%' or o.delivery_postcode like '%davis%' or o.delivery_state like '%davis%' or o.delivery_country like '%davis%' or o.billing_name like '%davis%' or o.billing_company like '%davis%' or o.billing_street_address like '%davis%' or o.billing_suburb like '%davis%' or o.billing_city like '%davis%' or o.billing_postcode like '%davis%' or o.billing_state like '%davis%' or o.billing_country like '%davis%' o.payment_method like '%davis%' or o.cc_number like '%davis%' order by o.orders_id DESC

 

3) I would REALLY like to know how I can make a drop down function to sort by the product ID so I can have a list of the customers who bought just one particular product.

 

Any ideas? :huh:

 

Regardless of any little bugs, I love it! Thanks again to everyone who has worked so hard!

 

Patty

Share this post


Link to post
Share on other sites

To correct time:

 

FIND line 21:

$today = date("d/m/Y");

 

CHANGE TO:

$today = now();

 

-------------------------------------------------------

 

TO CORRECT SEARCH QUERY:

 

REPLACE:

 

$keywords = " o.orders_id like '%" . $keywords . "%' or o.orders_id like '%" . $keywords . "%' or o.customers_name like '%" . $keywords . "%' or o.customers_id like '%" . $keywords . "%' or o.customers_id like '%" . $keywords . "%' or o.customers_company like '%" . $keywords . "%' or o.customers_street_address like '%" . $keywords . "%' or o.customers_suburb like '%" . $keywords . "%' or o.customers_city like '%" . $keywords . "%' or o.customers_postcode like '%" . $keywords . "%' or o.customers_state like '%" . $keywords . "%' or o.customers_country like '%" . $keywords . "%' or o.customers_telephone like '%" . $keywords . "%' or o.customers_email_address like '%" . $keywords . "%' or o.delivery_name like '%" . $keywords . "%' or o.delivery_company like '%" . $keywords . "%' or o.delivery_street_address like '%" . $keywords . "%' or o.delivery_suburb like '%" . $keywords . "%' or o.delivery_city like '%" . $keywords . "%' or o.delivery_postcode like '%" . $keywords . "%' or o.delivery_state like '%" . $keywords . "%' or o.delivery_country like '%" . $keywords . "%' or o.billing_name like '%" . $keywords . "%' or o.billing_company like '%" . $keywords . "%' or o.billing_street_address like '%" . $keywords . "%' or o.billing_suburb like '%" . $keywords . "%' or o.billing_city like '%" . $keywords . "%' or o.billing_postcode like '%" . $keywords . "%' or o.billing_state like '%" . $keywords . "%' or o.billing_country like '%" . $keywords . "%' o.payment_method like '%" . $keywords . "%' or o.cc_number like '%" . $keywords . "%' ";

 

 

WITH:

 

$keywords = "o.orders_id like '%" . $keywords . "%' or o.customers_name like '%" . $keywords . "%' or o.customers_id like '%" . $keywords . "%' or o.customers_company like '%" . $keywords . "%' or o.customers_street_address like '%" . $keywords . "%' or o.customers_suburb like '%" . $keywords . "%' or o.customers_city like '%" . $keywords . "%' or o.customers_postcode like '%" . $keywords . "%' or o.customers_state like '%" . $keywords . "%' or o.customers_country like '%" . $keywords . "%' or o.customers_telephone like '%" . $keywords . "%' or o.customers_email_address like '%" . $keywords . "%' or o.delivery_name like '%" . $keywords . "%' or o.delivery_company like '%" . $keywords . "%' or o.delivery_street_address like '%" . $keywords . "%' or o.delivery_suburb like '%" . $keywords . "%' or o.delivery_city like '%" . $keywords . "%' or o.delivery_postcode like '%" . $keywords . "%' or o.delivery_state like '%" . $keywords . "%' or o.delivery_country like '%" . $keywords . "%' or o.billing_name like '%" . $keywords . "%' or o.billing_company like '%" . $keywords . "%' or o.billing_street_address like '%" . $keywords . "%' or o.billing_suburb like '%" . $keywords . "%' or o.billing_city like '%" . $keywords . "%' or o.billing_postcode like '%" . $keywords . "%' or o.billing_state like '%" . $keywords . "%' or o.billing_country like '%" . $keywords . "%' or o.payment_method like '%" . $keywords . "%' or o.cc_number like '%" . $keywords . "%' ";

 

----------------------------------

 

As for a customers who bought a product filter .. I will see what I can do.

 

 

Thanks for alerting me of the glitches.

Edited by insomniac2

Share this post


Link to post
Share on other sites

Thanks for getting back so quick!

 

The keyword changes worked great, and the search function seems to be working well.

 

The change for the time caused the page not to load.

To correct time:

 

FIND line 21:

$today = date("d/m/Y");

 

CHANGE TO:

$today = now();

 

Regarding the filter for sorting by product:

 

Might I be able to include product name and/or product ID into the keywords for the search function?

 

My ultimate goal is to be able to sort first by STATUS and then by PRODUCT NAME, but that may be too industrious for now!

 

Thanks again!

Share this post


Link to post
Share on other sites

I also get an error when using the $today = now();

 

Fatal error: Call to undefined function: now() in /home/..........

 

with $today = date("d/m/Y"); a date will show up but about 3 days late

 

so I fixed it like so:

Find line 21:

$today = date("d/m/Y");

 

and change it to this:

//$today = date("d/m/Y");

 

Then find this:

<td class="pageHeading" width="50%"><?php

		/// BEGIN CRAZY!!! LOGIC FOR 3 TITLES
		if ($orderlist_days > 0 && $orderlist_days != NULL && !isset($_GET['month']) ) {

 

and change it to this:

<td class="pageHeading" width="50%"><?php echo strftime(DATE_FORMAT_LONG); ?><br><?php

		/// BEGIN CRAZY!!! LOGIC FOR 3 TITLES
		if ($orderlist_days > 0 && $orderlist_days != NULL && !isset($_GET['month']) ) {

 

If I make any other pertinent observations I will post back here--thanks Insomniac

Edited by rabbitseffort

"I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings."

---Margaret Mead---

 

"The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer.

--Ken Kesey"

Share this post


Link to post
Share on other sites
Then find this:

<td class="pageHeading" width="50%"><?php

		/// BEGIN CRAZY!!! LOGIC FOR 3 TITLES
		if ($orderlist_days > 0 && $orderlist_days != NULL && !isset($_GET['month']) ) {

 

and change it to this:

<td class="pageHeading" width="50%"><?php echo strftime(DATE_FORMAT_LONG); ?><br><?php

		/// BEGIN CRAZY!!! LOGIC FOR 3 TITLES
		if ($orderlist_days > 0 && $orderlist_days != NULL && !isset($_GET['month']) ) {

 

Also, what worked for me is I changed Line 242 to read:

 

<td class="main" align="right" width="25%"><?php echo date('l, F dS, Y h:i:s A'); ?></td>

 

Now it outputs the day of week, month, day, year and the time. I'm running PHP5 so maybe that's the deal.

 

Anyway, hope it is useful! Thanks guys!

Share this post


Link to post
Share on other sites

seems like something not right on the searching!

 

for eg, you can only select the date range and list out all the status order but you cannot select a date range based on particular order status.

 

If you select a status, it will list out all status correctly.

 

It cant work concurrently with the date, any one got a fix!!?

 

Excellent contribution and new version!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×