mutter Posted February 11, 2004 Share Posted February 11, 2004 Hi, somebody know how to display only de Pending Orders in account.php? See, i installed a contribution that let the Customer to send me the Bank Deposit Number, Date, Bank Name, etc. this contribution appears like a form block in account.php But i want to make that the customer can choose the Order that he pays in the bank, and i can't make that only appears Pending Orders instead all orders. I take a part of code, that shows the Order History in account.php. <?php $orders_query = tep_db_query("select o.orders_id, o.date_purchased, o.delivery_name, o.delivery_country, o.billing_name, o.billing_country, ot.text as order_total, s.orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$customer_id . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' order by orders_id desc limit 3"); while ($orders = tep_db_fetch_array($orders_query)) { if (tep_not_null($orders['orders_status_name'])) { $order_name = $orders['delivery_name']; $order_country = $orders['delivery_country']; } else { $order_name = $orders['billing_name']; $order_country = $orders['billing_country']; } ?> <tr <?php echo tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $orders['orders_id'], 'SSL'); ?>"> <td class="main" width="80"><?php echo tep_date_short($orders['date_purchased']); ?></td> <td class="main"><?php echo '#' . $orders['orders_id']; ?></td> <td class="main"><?php echo tep_output_string_protected($order_name) . ', ' . $order_name; ?></td> <td class="main"><?php echo $orders['orders_status_name']; ?></td> <td class="main" align="right"><?php echo $orders['order_total']; ?></td> <td class="main" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $orders['orders_id'], 'SSL') . '">' . tep_image_button('small_view.gif', SMALL_IMAGE_BUTTON_VIEW) . '</a>'; ?></td> </tr> <?php } ?> I was playing with this code for hours, but can't make that only show the Pending Orders of the customer. Someone knows how to do this? Thanks... 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.
Note: Your post will require moderator approval before it will be visible.