kingkahn22 Posted August 16, 2005 Posted August 16, 2005 Hi, Is there a contribution to search orders by more then just the order ID ? I looked through the contribs, but couldn't find anything. Thanks.
elv1s Posted August 16, 2005 Posted August 16, 2005 Hi there, i was looking for the same thing. Is there something like this- i placed some code from "customers.php" to "orders.php" ************************** <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr><?php echo tep_draw_form('search', FILENAME_ORDERS, '', 'get'); ?> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td> <td class="smallText" align="right"><?php echo HEADING_TITLE_SEARCH . ' ' . tep_draw_input_field('search'); ?></td> </form></tr> </table></td> </tr> ************************* ************************* <?php $search = ''; if (isset($HTTP_GET_VARS['search']) && tep_not_null($HTTP_GET_VARS['search'])) { $keywords = tep_db_input(tep_db_prepare_input($HTTP_GET_VARS['search'])); $search = "where o.customers_name like '%" . $keywords . "%' or c.customers_firstname like '%" . $keywords . "%' or c.customers_email_address like '%" . $keywords . "%'"; echo 'Search is ' . $search; echo 'Keywords is ' . $keywords; $orders_query_raw = "select o.orders_id, o.abc, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by $order"; } ************************* But it doesn?t work and i can not figure out what i?ve forgotten. please help me/us. thanks Gr. kasper My Contribs: - ORDERS AT-A-GLANCE -CUSTOMERS AT-A-GLANCE
Recommended Posts
Archived
This topic is now archived and is closed to further replies.