segal Posted May 14, 2010 Share Posted May 14, 2010 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>"; } } } ?> 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.