Ever tried to Delete bulk orders from UberCart?
This should do it. Quick and dirty, but it works...
File to modify is ~ uc_views_bulk_operations.module. Modified file is attached.
In function uc_views_bulk_operations_order_operations() add this to the array around line 52
'delete_orders' => array(
'label' => 'Delete Orders',
'callback' => 'uc_views_bulk_operations_orders_delete_orders',
'disabled' => TRUE,
),
Then add this at line 110
function uc_views_bulk_operations_orders_delete_orders($orders) {
$args = implode(',', $orders);
foreach($orders as $order_id) {
$order = uc_order_load($order_id);
uc_order_delete($order_id);
}
}
| Comment | File | Size | Author |
|---|---|---|---|
| uc_views_bulk_operations.module.zip | 1.56 KB | psy |
Comments
Comment #1
madsph commentedSorry for not responding before now - I have been in the hospital (broke my leg :-( ).
I have tried out your patch, and it works like a charm.
I have committed it to the dev branch. Thank you once again for a great contribution,
Comment #2
madsph commentedComment #3
jasonabc commentedthanks for this - very useful!!
Comment #4
hockey2112 commentedHi, how do I access the functions of this module after I have installed it? Is there a particular URL or menu link I can click?