Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Order list


segal

Recommended Posts

Hello,

I have found an old add-ons Complete order tracking.

That shows all the products ordered and to prepare on one page. i think it is usefull when you have a lot of products.

I made a change, to have only the processing orders.

 

Replace the right line by :

$orders_query = tep_db_query("SELECT * from " . TABLE_ORDERS . " WHERE orders_status =2 ORDER by orders_status, orders_id desc");

 

I would like to get the picture of the products ordered and it doesn't work ! It gives only the name of the file and ducplicate lines...

If someone can help me ?

Thank you in advance !

 

Code :

<?php
$orders = "";
$orders_query = tep_db_query("SELECT * from " . TABLE_ORDERS . " WHERE orders_status =2 ORDER by orders_status, orders_id desc");
while($orders_rows = tep_db_fetch_array($orders_query))
{
$products = "";
$products_query = tep_db_query("SELECT * FROM " . TABLE_ORDERS_PRODUCTS . " WHERE orders_id = '" . $orders_rows['orders_id'] . "' ");
while($products_rows = tep_db_fetch_array($products_query))
{
$ordImage="";
$ordImage_query = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS . " p, " . TABLE_ORDERS_PRODUCTS . " pd  WHERE p.products_id = pd.products_id and orders_id = '" . $orders_rows['orders_id'] . "' ");
while($ordImage_rows = tep_db_fetch_array($ordImage_query))
{
$ordStatus="";
$ordStatus_query = tep_db_query("SELECT * from " . TABLE_ORDERS_STATUS . " WHERE orders_status_id = '" . $orders_rows['orders_status'] . "' ");
$ordStatus_rows = tep_db_fetch_array($ordStatus_query);
echo "<tr>";
echo "<td class=dataTableContent>" . $ordStatus_rows["orders_status_name"] . "</td>";
echo "<td class=dataTableContent>" . $orders_rows["orders_id"] . "</td>";
echo "<td class=dataTableContent>" . $products_rows["products_quantity"] . "</td>";
echo "<td class=dataTableContent>" . $products_rows["products_name"] . "</td>";
echo "<td class=dataTableContent>" . $products_rows["products_price"] . "</td>";
echo "<td class=dataTableContent>" . $ordImage_rows["products_image"] . "</td>";
echo "</tr>";
}
}
}
?>


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...