srober Posted February 6, 2007 Share Posted February 6, 2007 Maybe im not searching right. Is there a contribution that allows you to delete multiple orders? Link to comment Share on other sites More sharing options...
insomniac2 Posted February 6, 2007 Share Posted February 6, 2007 Search for something like Orders Removal by Filter I think it's in the contribution section. I can't find my file .. but here is the install text: Copyleft by Crom, 2004 This might be totally useless and I haven't even intended this as a contribution. But maybe if it will help someone ... Long time I was manually removing delivered orders. So I've spent 30 minutes and made these changes to orders.php With this you can delete all orders at once filtered by status (all delivered for example) Diff was made from slightly modified orders.php so something may not be exact. Installation -------------------------------------- nearly line 30 **** Add after if (tep_not_null($action)) { switch ($action) { **** this case 'clear_all': $status = tep_db_prepare_input($HTTP_POST_VARS['status']); if (tep_not_null($status)){ $_where = " where orders_status = '" . $status . "'";} else {$_where = '';} $orders_clear_query ="delete from " . TABLE_ORDERS . $_where; tep_db_query($orders_clear_query); break; -------------------------------------- nearly line 382 **** Find <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 align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0"> **** Replace <td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0"> **** with this <td class="smallText" align="right" valign="bottom"><table border="0" cellspacing="0" cellpadding="0"><tr><td><?php echo tep_draw_form('clearall', FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=clear_all','post','onsubmit="java script:var st = this.status.options[this.status.selectedIndex].text.toLowerCase(); if (st.indexOf(\'all\')>=0){stat = \'all\'}else{stat = this.status.options[this.status.selectedIndex].text.toLowerCase();}if (confirm(\'Are you sure you want to clear \'+stat+\' orders?\')) {return true;} else {return false;}"'); ?></td><td class="smallText" align="right" valign="middle"><u>Clear:</u> </td><td> <? echo tep_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), $orders_statuses), ''); ?></td><td valign="middle"><? echo ' '.tep_image_submit('button_delete.gif', IMAGE_DELETE,'align="middle"')?></form></td></tr></table></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td> <td align="right" width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> -------------------------------------- nearly line 442 **** Add after <td class="smallText" valign="top"><?php echo $orders_split->display_count($orders_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_ORDERS); ?></td> <td class="smallText" align="right"><?php echo $orders_split->display_links($orders_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], tep_get_all_get_params(array('page', 'oID', 'action'))); ?></td> </tr> </table></td> **** this </tr> <tr> <td colspan="5" align="right"><table border="0" cellspacing="0" cellpadding="0"><tr><td><?php echo tep_draw_form('clearall', FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=clear_all','post','onsubmit="java script:var st = this.status.options[this.status.selectedIndex].text.toLowerCase(); if (st.indexOf(\'all\')>=0){stat = \'all\'}else{stat = this.status.options[this.status.selectedIndex].text.toLowerCase();}if (confirm(\'Are you sure you want to clear \'+stat+\' orders?\')) {return true;} else {return false;}"'); ?></td><td class="smallText" align="right" valign="middle"><u>Clear:</u> </td><td> <? echo tep_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), $orders_statuses), ''); ?></td><td valign="middle"><? echo ' '.tep_image_submit('button_delete.gif', IMAGE_DELETE,'align="middle"')?></form></td></tr></table></td> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.