Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Orderlist contrib


99darkgreenGT

Recommended Posts

  • Replies 92
  • Created
  • Last Reply

Top Posters In This Topic

Hi

Did anyone work out a solution to show the attributes and the corrected price with attributes selected. The orderlist is not showing the attributes and would not show the final product price correctly. You might order the wrong product if it needs attribute.

 

Anyone got a solution... :o

Link to comment
Share on other sites

I added the contribution and it works when displaying on the screen.

 

When I try to download, I get the following error:

 

Orderlist

 

1054 - Unknown column 'subm_download' in 'where clause'

 

SELECT * FROM `orders_status` where `orders_status_id` = 1&subm_download=Download AND language_id = 1

 

[TEP STOP]

 

I played around with the code and could not find the problem.

 

Any ideas?

Edited by Lavarock
Link to comment
Share on other sites

You probably didn't run an SQL script either in this contribution or another. Make sure the column 'subm_download' exists in the corresponding table.

 

Also, you could have done a search for "1054 - Unknown column" using the search button and you would have found the answer.

Link to comment
Share on other sites

subm_download appears to be a variable/function return value and is not being filled in properly.

 

I believe that this download function was just recently added to the contribution. I don't really need that part of it, so I won't spend much more time trying to debug it.

Link to comment
Share on other sites

  • 2 weeks later...

HI.. Great Contribution...

 

I have installed and all is well. the only problem i am facing is when i download the orderlist...

 

I can select an order from the dropdown list and it displays the correct information, but when i download it seems to only download the pending order... If i want download the Delivered or processing orders i still get the pending oders CVS file...

 

Please can someone assist me with this,

many thanks

Link to comment
Share on other sites

  • 5 months later...

Hello,

 

Installed Orderlist 3.1 into a WebMakers.Com version of OSC and get the following message when I click "Generate orderlist" in Admin>Reports...

 

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

Access Denied

 

No Right Permission Access

Please contact your Web Administrator to request

more access or if you found any problem.

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

 

Any suggestions or comments?

 

Thank You.

Link to comment
Share on other sites

  • 3 weeks later...

Hi everybody

 

First of all a big thanks to zlack for starting this "small" contribution.

 

Well i took the first version of the contrib. (because i liked the design more then the new one) and modified it a bit with Heiko Oesterling's Version 3.0 so i could sort the orders by status. (copy and paste stuff, nothing big)

 

The only problem is now if a customer orders 2 or 3 diffrent stuff in one order, the order shows up 2 or 3 times btu if he orders only 1 product then it shows up only one time!? I can't figure out why. So if anybody could take a look a this code and tell me why this is happening that would be really great since i worked so long on this.

 

Here is the Code (watch out its long!):

<?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
*/
// 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>
</head>
<body>

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

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

<?php
?$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; ?>">
</form>



<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 align="center"><FONT face=verdana size=2><b>Order#</b></TD>
? ?<TD><FONT face=verdana size=2><b>Customer</b></TD>
? ?<TD><FONT face=verdana size=2><b>Order Details</b></TD>
</TR>

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


// Query de order
? ? ? $query = "SELECT * FROM `orders_products` WHERE orders_id = $ordernummer ";
? ? ? $resultaat2 = tep_db_query($query);
? ? ? while ($row2 = tep_db_fetch_array($resultaat2)) {
?>

? ? ? ? ? <TR>
? ? ? ? ? ? <TD align="center" 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 "<b>Name:</b> ".$row{'delivery_name'} . "\n";
? ? ? ? ? ? ?echo "<br><b>Address:</b> ".$row{'delivery_street_address'} . "\n";
? ? ? ? ? ? ?echo "<br><b>City:</b> ".$row{'delivery_city'} . ", " . $row{'delivery_state'} . "\n";
? ? ? ? ? ? ?echo "<br><b>Postcode:</b> ".$row{'delivery_postcode'} . "\n";
? ? ? ? ? ? ?echo "<br><b>Tel:</b> ".$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";
? ? echo '<font face=verdana size=1><br><b>Model#</b> ' . $order->products[$i]['model'] . ' <b>Price:</b> ' . $order->products[$i]['final_price'] . '<br><br>' . "\n";
? }
? ? echo "--------------------<br><b>Payment:</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
? ? ?}
? ? }
?>

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

ob_end_flush();
?>

Edited by Tsimi
Link to comment
Share on other sites

  • 2 weeks later...

Tsimi- Thank you very much for your great work on this! I've added it and I've tweaked my output for a very minimal look to be used as a "pull sheet" for my weekly shipping runs. I was wondering if you could look into sorting by shipping method instead of (or in addition to) status. This would make the perfect pull list for me; which is something I have spent hours each week generating in years past (from spreadsheets).

Link to comment
Share on other sites

  • 3 weeks later...

Tsimi,

 

This works great for me - except the status sorting feature doesn't work...

 

No matter what I select when I press submit I always get (Pending).

 

Had a look at the code but can't see anything...

 

Any ideas? Running MS2.2

 

Thanks,

Christian

Link to comment
Share on other sites

Hi guys

 

@brushwood

 

Sorry can't help in this matter i tried to change the code but it doesen't work.

 

@csaunders

 

Did you just copy&paste the code above or did you download the contrib from the .com site?

 

Here is the Link to the complete contribution (Orderlist v3.3):

 

http://www.oscommerce.com/community/contri...earch,orderlist

 

Regards

 

Tsimi

Link to comment
Share on other sites

Tsimi,

 

Nah - I downloaded the full contrib.

 

Just noticed - it's weird:

 

If I sort by 'processing' for example, then it excludes all the orders that are 'processing' - esentially doing the opposite of what it should do!

 

I'm sure it's simple but just don't have time to look at the code right now... :blush:

 

-Christian

Link to comment
Share on other sites

Tsimi, Hey, thanks for trying! I did manage to learn a little about phpMyAdmin that will allow me to quickly pull a report. It gives me a list of order numbers and the shipping method (delivery date in my hacked up shop) sorted alphabetically. It would be good for me to look at each order anyway. I'll print the shipping label and update the status at the same time. Then I'll use Orderlist to generate my Pull Sheet.

Link to comment
Share on other sites

Hey guys, top job on this contribution. Thanks to all who have worked on it.

 

Is anybody able to make the listing show attributes for products also?

 

I want to use it on my store but work with attributes in most of my products so unfortunately this great report is pretty much useless to me if I cant see the attributes the customer has selected.

 

Any assistance would be greatly appreciated.

 

Regards, Mike

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months later...
Anyone know how I can sort the orders by products_id instead of orders_id?

 

Thanks!

I've been looking for many ways to report from the database and found a free product called OpenReports that promises good things and an easy interface. This would bypass the need to hack OSC to make it do things. The product claims great stuff that would help any e-commerce site. In my case, my host won't give me the final config details to connect to my mysql databases. They put all their mysql databases behind firewalls. If you have full access to your database, you should look into it. I'd love to see a Report generating tool as a Contrib here at OSC but this might be much better. Why reinvent the wheel?

 

By the way, I LOVE orderlist! I use it every week to pull orders from my greenhouse!

Edited by brushwood
Link to comment
Share on other sites

  • 2 months later...

hi iecwillow

 

i just checked my orderlist and realised that the shipping charges are inside and they are added to the product amount. post your orderlist code so can take a look and compare it with mine.

 

regards

tsimi

Link to comment
Share on other sites

Thank you, Tsimi. Here is the code of my orderlist.php:

 

<?php
/*
 $Id: orderlist.php, v 1.1 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

 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
 
 2004/02/16
 Some modifications by Paul Mathot (panda.nl)
============================================

 2004/04/13 => orderlist2
 Modifications by Heiko Oesterling

 I tried to integrate this nice script into the administration.


============================================
 2004/04/14
 New modifications by zlack (www.partshop.nl)
 -Now you can select which order status to display even if you have a dozen statusses (like i have :P)
 -Cleaned up the code a bit
 -Changed the stylesheet (damn i hate pink)
 -Some other minor things
 
============================================
2004/04/15
New modifications by Heiko Oesterling
- Select status displayed in the selected language
- Now you can download the orderlist
*/
define("OL__DEBUG",0);

// Buffering
ob_start();




$order_status = $select_order_status;
$display_order_status = $order_status;


if ($order_status == "")
       {
       $order_status = 1;
       }

require('includes/application_top.php');
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ORDERLIST);

?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>.::Elegantpicks.com Web Based Control Panle::..::Order List::.</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 `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
 $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="submit" name="subm_download" value="<?php echo OL_DOWNLOAD; ?>"></span></td>
</form>

<?php
if (isset($_REQUEST['subm_download'])) {
// BEGIN DOWNLOAD

ob_clean();
 // Output as CSV-file
$filename = OL_HEAD . "-"  . $orders_status_name . "-" . date("Ymd-His");	
header("Content-Transfer-Encoding: ascii");
header("Content-Disposition: attachment; filename=$filename.csv");
header("Content-Type: text/comma-separated-values");

   // output header
echo "\"" . OL_ORDERNR . "\",\"" . OL_MODEL . "\",\"" .  OL_NAME . "\",\"" . OL_PRICE . "\",\"" . OL_QTY . "\",\"" . OL_NOTES . "\",\"" . OL_CHK . "\"\n";

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

// output data
while ($row = tep_db_fetch_array($result))
   {
       $ordernummer = $row['orders_id'];
   // Query de order
       $query2 = "SELECT * FROM `orders_products` WHERE orders_id = $ordernummer ";
       $resultaat2 = tep_db_query($query2);
 
 
       while ($row2 = tep_db_fetch_array($resultaat2))
       {
  	 echo "\"";
                echo $ordernummer;
  	 echo "\",\"";
                if(!($row2['products_model'])=='') echo $row2['products_model']; else echo ' ';
  	 echo "\",\"";
                echo $row2['products_name'];
  	 echo "\",\"";
                echo $row2['products_price']; 
  	 echo "\",\"";
                echo $row2['products_quantity']; 
  	 echo "\",\"";
                echo ' '; // notes
  	 echo "\",\"";
                echo ' ';  // chk
  	 echo "\"\n";  
    }
   }  

 // END DOWNLOAD 
}
else {
// Output as HTML
?>


<table summary="orderlist" cellspacing="1">
 <tr class="headers">
   <td class="orderStatus" colspan="7"><span class="date"><?php echo OL_DATE; echo date("Y/m/d"); ?></span></td>
 </tr>
 <tr class="headers">
   <td class="orderNr"><b><?php echo OL_ORDERNR; ?></b></td>
   <td class="model"><b><?php echo OL_MODEL; ?></b></td>
   <td class="name"><b><?php echo OL_NAME; ?></b></td>
   <td class="price"><b><?php echo OL_PRICE; ?></b></td>
   <td class="qty"><b><?php echo OL_QTY; ?></b></td>
   <td class="notes"><b><?php echo OL_NOTES; ?></b></td>
   <td class="chk"><b><?php echo OL_CHK; ?></b></td>
 </tr>

<?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'];
 // Query de order
       $query2 = "SELECT * FROM `orders_products` WHERE orders_id = $ordernummer ";
       $resultaat2 = tep_db_query($query2);
 
 
       while ($row2 = tep_db_fetch_array($resultaat2))
               {
               ?>
               <tr class="data">
                       <td class="orderNr"><?php echo $ordernummer; ?></td>
                       <td class="model"><?php if(!($row2['products_model'])=='') echo $row2['products_model']; else echo ' '; ?></td>
                       <td class="name"><?php echo $row2['products_name']; ?></td>
                       <td class="price"><?php echo $row2['products_price']; ?></td>
                       <td class="qty"><?php echo $row2['products_quantity']; ?></td>
                       <td class="notes"> </td>
                       <td class="chk"> </td>
               </tr>
               <?php
               }
       }
?>
</table>
</body>
</html>
<?php
}
ob_end_flush();
?>

Link to comment
Share on other sites

  • 2 weeks later...

Hi Everyone!

I have figured out the attributes problem! YEA!!!!! :lol:

(Forgive my enthusiasm, but this is the first time I've actually been able to post a fix.)

 

This fix will print out the attributes below the product name on the order list, just like it appears in the order history and shopping cart.

 

In admin/orderlist.php:

 

FIND this line (near the bottom):

 

<b><a href="<?php echo tep_href_link(FILENAME_CATEGORIES, 'action=new_product_preview&read=only&pID=' . $order->products[$i]['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><br>

 

 

ADD this code underneath:

 

<?php

if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) {

for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {

echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>';

}

}

?><br><br>

 

If you want the attributes larger, get rid of the <small></small> tags.

If you don't want italics, get rid of the <i></i> tags.

 

This was a cut and paste from the "catalog/account_history_info.php" file, so if you have problems with this post, go there.

 

Corinne

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...