Version Notes
Simple tool for deleting Magento orders. Easy to delete order(s) through backend.
Download this release
Release Info
| Developer | Cartin24 |
| Extension | Cartin24_DeleteOrders |
| Version | 1.0.0 |
| Comparing to | |
| See all releases | |
Version 1.0.0
- app/code/community/Cartin24/Deleteorders/Block/Adminhtml/Sales/Order/Grid.php +185 -0
- app/code/community/Cartin24/Deleteorders/Block/Adminhtml/Sales/Order/Grid.php~ +185 -0
- app/code/community/Cartin24/Deleteorders/Block/Adminhtml/Sales/Order/Render/Delete.php +25 -0
- app/code/community/Cartin24/Deleteorders/Block/Adminhtml/Sales/Order/Render/Delete.php~ +25 -0
- app/code/community/Cartin24/Deleteorders/Block/Adminhtml/Sales/Order/View.php +27 -0
- app/code/community/Cartin24/Deleteorders/Block/Adminhtml/Sales/Order/View.php~ +26 -0
- app/code/community/Cartin24/Deleteorders/Helper/Data.php +12 -0
- app/code/community/Cartin24/Deleteorders/Helper/Data.php~ +13 -0
- app/code/community/Cartin24/Deleteorders/controllers/Adminhtml/DeleteorderController.php~ +86 -0
- app/code/community/Cartin24/Deleteorders/controllers/Adminhtml/DeleteordersController.php +262 -0
- app/code/community/Cartin24/Deleteorders/controllers/Adminhtml/DeleteordersController.php~ +262 -0
- app/code/community/Cartin24/Deleteorders/etc/config.xml +56 -0
- app/etc/modules/Cartin24_Deleteorders.xml +9 -0
- package.xml +21 -0
app/code/community/Cartin24/Deleteorders/Block/Adminhtml/Sales/Order/Grid.php
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Cartin24
|
| 4 |
+
* @category Magento Extensions
|
| 5 |
+
* @package Cartin24_Deleteorders
|
| 6 |
+
* @copyright Copyright (c) 2015-2016 Cartin24. (http://www.Cartin24.com)
|
| 7 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
class Cartin24_Deleteorders_Block_Adminhtml_Sales_Order_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
| 11 |
+
{
|
| 12 |
+
public function __construct(){
|
| 13 |
+
parent::__construct();
|
| 14 |
+
$this->setId('sales_order_grid');
|
| 15 |
+
$this->setUseAjax(true);
|
| 16 |
+
$this->setDefaultSort('created_at');
|
| 17 |
+
$this->setDefaultDir('DESC');
|
| 18 |
+
$this->setSaveParametersInSession(true);
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
protected function _getCollectionClass(){
|
| 22 |
+
return 'sales/order_grid_collection';
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
protected function _prepareCollection(){
|
| 26 |
+
$collection = Mage::getResourceModel($this->_getCollectionClass());
|
| 27 |
+
$this->setCollection($collection);
|
| 28 |
+
return parent::_prepareCollection();
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
protected function _prepareColumns(){
|
| 32 |
+
|
| 33 |
+
$this->addColumn('real_order_id', array(
|
| 34 |
+
'header'=> Mage::helper('sales')->__('Order #'),
|
| 35 |
+
'width' => '80px',
|
| 36 |
+
'type' => 'text',
|
| 37 |
+
'index' => 'increment_id',
|
| 38 |
+
));
|
| 39 |
+
|
| 40 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
| 41 |
+
$this->addColumn('store_id', array(
|
| 42 |
+
'header' => Mage::helper('sales')->__('Purchased From (Store)'),
|
| 43 |
+
'index' => 'store_id',
|
| 44 |
+
'type' => 'store',
|
| 45 |
+
'store_view'=> true,
|
| 46 |
+
'display_deleted' => true,
|
| 47 |
+
));
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
$this->addColumn('created_at', array(
|
| 51 |
+
'header' => Mage::helper('sales')->__('Purchased On'),
|
| 52 |
+
'index' => 'created_at',
|
| 53 |
+
'type' => 'datetime',
|
| 54 |
+
'width' => '100px',
|
| 55 |
+
));
|
| 56 |
+
|
| 57 |
+
$this->addColumn('billing_name', array(
|
| 58 |
+
'header' => Mage::helper('sales')->__('Bill to Name'),
|
| 59 |
+
'index' => 'billing_name',
|
| 60 |
+
));
|
| 61 |
+
|
| 62 |
+
$this->addColumn('shipping_name', array(
|
| 63 |
+
'header' => Mage::helper('sales')->__('Ship to Name'),
|
| 64 |
+
'index' => 'shipping_name',
|
| 65 |
+
));
|
| 66 |
+
|
| 67 |
+
$this->addColumn('base_grand_total', array(
|
| 68 |
+
'header' => Mage::helper('sales')->__('G.T. (Base)'),
|
| 69 |
+
'index' => 'base_grand_total',
|
| 70 |
+
'type' => 'currency',
|
| 71 |
+
'currency' => 'base_currency_code',
|
| 72 |
+
));
|
| 73 |
+
|
| 74 |
+
$this->addColumn('grand_total', array(
|
| 75 |
+
'header' => Mage::helper('sales')->__('G.T. (Purchased)'),
|
| 76 |
+
'index' => 'grand_total',
|
| 77 |
+
'type' => 'currency',
|
| 78 |
+
'currency' => 'order_currency_code',
|
| 79 |
+
));
|
| 80 |
+
|
| 81 |
+
$this->addColumn('status', array(
|
| 82 |
+
'header' => Mage::helper('sales')->__('Status'),
|
| 83 |
+
'index' => 'status',
|
| 84 |
+
'type' => 'options',
|
| 85 |
+
'width' => '70px',
|
| 86 |
+
'options' => Mage::getSingleton('sales/order_config')->getStatuses(),
|
| 87 |
+
));
|
| 88 |
+
|
| 89 |
+
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
|
| 90 |
+
$this->addColumn('action',
|
| 91 |
+
array(
|
| 92 |
+
'header' => Mage::helper('sales')->__('Actions'),
|
| 93 |
+
'width' => '100px',
|
| 94 |
+
'type' => 'action',
|
| 95 |
+
'getter' => 'getId',
|
| 96 |
+
'renderer' => 'deleteorders/adminhtml_sales_order_render_delete',
|
| 97 |
+
'filter' => false,
|
| 98 |
+
'sortable' => false,
|
| 99 |
+
'index' => 'stores',
|
| 100 |
+
'is_system' => true,
|
| 101 |
+
));
|
| 102 |
+
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
$this->addRssList('rss/order/new', Mage::helper('sales')->__('New Order RSS'));
|
| 106 |
+
|
| 107 |
+
$this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
|
| 108 |
+
$this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel XML'));
|
| 109 |
+
|
| 110 |
+
return parent::_prepareColumns();
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
protected function _prepareMassaction() {
|
| 114 |
+
$this->setMassactionIdField('entity_id');
|
| 115 |
+
$this->getMassactionBlock()->setFormFieldName('order_ids');
|
| 116 |
+
$this->getMassactionBlock()->setUseSelectAll(false);
|
| 117 |
+
|
| 118 |
+
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/cancel')) {
|
| 119 |
+
$this->getMassactionBlock()->addItem('cancel_order', array(
|
| 120 |
+
'label'=> Mage::helper('sales')->__('Cancel'),
|
| 121 |
+
'url' => $this->getUrl('*/sales_order/massCancel'),
|
| 122 |
+
));
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/hold')) {
|
| 126 |
+
$this->getMassactionBlock()->addItem('hold_order', array(
|
| 127 |
+
'label'=> Mage::helper('sales')->__('Hold'),
|
| 128 |
+
'url' => $this->getUrl('*/sales_order/massHold'),
|
| 129 |
+
));
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/unhold')) {
|
| 133 |
+
$this->getMassactionBlock()->addItem('unhold_order', array(
|
| 134 |
+
'label'=> Mage::helper('sales')->__('Unhold'),
|
| 135 |
+
'url' => $this->getUrl('*/sales_order/massUnhold'),
|
| 136 |
+
));
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
$this->getMassactionBlock()->addItem('pdfinvoices_order', array(
|
| 140 |
+
'label'=> Mage::helper('sales')->__('Print Invoices'),
|
| 141 |
+
'url' => $this->getUrl('*/sales_order/pdfinvoices'),
|
| 142 |
+
));
|
| 143 |
+
|
| 144 |
+
$this->getMassactionBlock()->addItem('pdfshipments_order', array(
|
| 145 |
+
'label'=> Mage::helper('sales')->__('Print Packingslips'),
|
| 146 |
+
'url' => $this->getUrl('*/sales_order/pdfshipments'),
|
| 147 |
+
));
|
| 148 |
+
|
| 149 |
+
$this->getMassactionBlock()->addItem('pdfcreditmemos_order', array(
|
| 150 |
+
'label'=> Mage::helper('sales')->__('Print Credit Memos'),
|
| 151 |
+
'url' => $this->getUrl('*/sales_order/pdfcreditmemos'),
|
| 152 |
+
));
|
| 153 |
+
|
| 154 |
+
$this->getMassactionBlock()->addItem('pdfdocs_order', array(
|
| 155 |
+
'label'=> Mage::helper('sales')->__('Print All'),
|
| 156 |
+
'url' => $this->getUrl('*/sales_order/pdfdocs'),
|
| 157 |
+
));
|
| 158 |
+
|
| 159 |
+
$this->getMassactionBlock()->addItem('print_shipping_label', array(
|
| 160 |
+
'label'=> Mage::helper('sales')->__('Print Shipping Labels'),
|
| 161 |
+
'url' => $this->getUrl('*/sales_order_shipment/massPrintShippingLabel'),
|
| 162 |
+
));
|
| 163 |
+
|
| 164 |
+
$this->getMassactionBlock()->addItem('delete_order', array(
|
| 165 |
+
'label'=> Mage::helper('sales')->__('Delete Orders'),
|
| 166 |
+
'url' => $this->getUrl('deleteorders/adminhtml_deleteorders/massDelete'),
|
| 167 |
+
'confirm' => Mage::helper('sales')->__('Are you sure you want to delete the orders?')
|
| 168 |
+
));
|
| 169 |
+
|
| 170 |
+
return $this;
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
public function getRowUrl($row){
|
| 174 |
+
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
|
| 175 |
+
return $this->getUrl('*/sales_order/view', array('order_id' => $row->getId()));
|
| 176 |
+
}
|
| 177 |
+
return false;
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
public function getGridUrl(){
|
| 181 |
+
return $this->getUrl('*/*/grid', array('_current'=>true));
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
}
|
| 185 |
+
?>
|
app/code/community/Cartin24/Deleteorders/Block/Adminhtml/Sales/Order/Grid.php~
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Cartin24
|
| 4 |
+
* @category Magento Extensions
|
| 5 |
+
* @package Cartin24_Deleteorders
|
| 6 |
+
* @copyright Copyright (c) 2015-2016 Cartin24. (http://www.Cartin24.com)
|
| 7 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
class Cartin24_Deleteorders_Block_Adminhtml_Sales_Order_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
| 11 |
+
{
|
| 12 |
+
public function __construct(){
|
| 13 |
+
parent::__construct();
|
| 14 |
+
$this->setId('sales_order_grid');
|
| 15 |
+
$this->setUseAjax(true);
|
| 16 |
+
$this->setDefaultSort('created_at');
|
| 17 |
+
$this->setDefaultDir('DESC');
|
| 18 |
+
$this->setSaveParametersInSession(true);
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
protected function _getCollectionClass(){
|
| 22 |
+
return 'sales/order_grid_collection';
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
protected function _prepareCollection(){
|
| 26 |
+
$collection = Mage::getResourceModel($this->_getCollectionClass());
|
| 27 |
+
$this->setCollection($collection);
|
| 28 |
+
return parent::_prepareCollection();
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
protected function _prepareColumns(){
|
| 32 |
+
|
| 33 |
+
$this->addColumn('real_order_id', array(
|
| 34 |
+
'header'=> Mage::helper('sales')->__('Order #'),
|
| 35 |
+
'width' => '80px',
|
| 36 |
+
'type' => 'text',
|
| 37 |
+
'index' => 'increment_id',
|
| 38 |
+
));
|
| 39 |
+
|
| 40 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
| 41 |
+
$this->addColumn('store_id', array(
|
| 42 |
+
'header' => Mage::helper('sales')->__('Purchased From (Store)'),
|
| 43 |
+
'index' => 'store_id',
|
| 44 |
+
'type' => 'store',
|
| 45 |
+
'store_view'=> true,
|
| 46 |
+
'display_deleted' => true,
|
| 47 |
+
));
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
$this->addColumn('created_at', array(
|
| 51 |
+
'header' => Mage::helper('sales')->__('Purchased On'),
|
| 52 |
+
'index' => 'created_at',
|
| 53 |
+
'type' => 'datetime',
|
| 54 |
+
'width' => '100px',
|
| 55 |
+
));
|
| 56 |
+
|
| 57 |
+
$this->addColumn('billing_name', array(
|
| 58 |
+
'header' => Mage::helper('sales')->__('Bill to Name'),
|
| 59 |
+
'index' => 'billing_name',
|
| 60 |
+
));
|
| 61 |
+
|
| 62 |
+
$this->addColumn('shipping_name', array(
|
| 63 |
+
'header' => Mage::helper('sales')->__('Ship to Name'),
|
| 64 |
+
'index' => 'shipping_name',
|
| 65 |
+
));
|
| 66 |
+
|
| 67 |
+
$this->addColumn('base_grand_total', array(
|
| 68 |
+
'header' => Mage::helper('sales')->__('G.T. (Base)'),
|
| 69 |
+
'index' => 'base_grand_total',
|
| 70 |
+
'type' => 'currency',
|
| 71 |
+
'currency' => 'base_currency_code',
|
| 72 |
+
));
|
| 73 |
+
|
| 74 |
+
$this->addColumn('grand_total', array(
|
| 75 |
+
'header' => Mage::helper('sales')->__('G.T. (Purchased)'),
|
| 76 |
+
'index' => 'grand_total',
|
| 77 |
+
'type' => 'currency',
|
| 78 |
+
'currency' => 'order_currency_code',
|
| 79 |
+
));
|
| 80 |
+
|
| 81 |
+
$this->addColumn('status', array(
|
| 82 |
+
'header' => Mage::helper('sales')->__('Status'),
|
| 83 |
+
'index' => 'status',
|
| 84 |
+
'type' => 'options',
|
| 85 |
+
'width' => '70px',
|
| 86 |
+
'options' => Mage::getSingleton('sales/order_config')->getStatuses(),
|
| 87 |
+
));
|
| 88 |
+
|
| 89 |
+
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
|
| 90 |
+
$this->addColumn('action',
|
| 91 |
+
array(
|
| 92 |
+
'header' => Mage::helper('sales')->__('Actions'),
|
| 93 |
+
'width' => '100px',
|
| 94 |
+
'type' => 'action',
|
| 95 |
+
'getter' => 'getId',
|
| 96 |
+
'renderer' => 'deleteorders/adminhtml_sales_order_render_delete',
|
| 97 |
+
'filter' => false,
|
| 98 |
+
'sortable' => false,
|
| 99 |
+
'index' => 'stores',
|
| 100 |
+
'is_system' => true,
|
| 101 |
+
));
|
| 102 |
+
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
$this->addRssList('rss/order/new', Mage::helper('sales')->__('New Order RSS'));
|
| 106 |
+
|
| 107 |
+
$this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
|
| 108 |
+
$this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel XML'));
|
| 109 |
+
|
| 110 |
+
return parent::_prepareColumns();
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
protected function _prepareMassaction() {
|
| 114 |
+
$this->setMassactionIdField('entity_id');
|
| 115 |
+
$this->getMassactionBlock()->setFormFieldName('order_ids');
|
| 116 |
+
$this->getMassactionBlock()->setUseSelectAll(false);
|
| 117 |
+
|
| 118 |
+
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/cancel')) {
|
| 119 |
+
$this->getMassactionBlock()->addItem('cancel_order', array(
|
| 120 |
+
'label'=> Mage::helper('sales')->__('Cancel'),
|
| 121 |
+
'url' => $this->getUrl('*/sales_order/massCancel'),
|
| 122 |
+
));
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/hold')) {
|
| 126 |
+
$this->getMassactionBlock()->addItem('hold_order', array(
|
| 127 |
+
'label'=> Mage::helper('sales')->__('Hold'),
|
| 128 |
+
'url' => $this->getUrl('*/sales_order/massHold'),
|
| 129 |
+
));
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/unhold')) {
|
| 133 |
+
$this->getMassactionBlock()->addItem('unhold_order', array(
|
| 134 |
+
'label'=> Mage::helper('sales')->__('Unhold'),
|
| 135 |
+
'url' => $this->getUrl('*/sales_order/massUnhold'),
|
| 136 |
+
));
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
$this->getMassactionBlock()->addItem('pdfinvoices_order', array(
|
| 140 |
+
'label'=> Mage::helper('sales')->__('Print Invoices'),
|
| 141 |
+
'url' => $this->getUrl('*/sales_order/pdfinvoices'),
|
| 142 |
+
));
|
| 143 |
+
|
| 144 |
+
$this->getMassactionBlock()->addItem('pdfshipments_order', array(
|
| 145 |
+
'label'=> Mage::helper('sales')->__('Print Packingslips'),
|
| 146 |
+
'url' => $this->getUrl('*/sales_order/pdfshipments'),
|
| 147 |
+
));
|
| 148 |
+
|
| 149 |
+
$this->getMassactionBlock()->addItem('pdfcreditmemos_order', array(
|
| 150 |
+
'label'=> Mage::helper('sales')->__('Print Credit Memos'),
|
| 151 |
+
'url' => $this->getUrl('*/sales_order/pdfcreditmemos'),
|
| 152 |
+
));
|
| 153 |
+
|
| 154 |
+
$this->getMassactionBlock()->addItem('pdfdocs_order', array(
|
| 155 |
+
'label'=> Mage::helper('sales')->__('Print All'),
|
| 156 |
+
'url' => $this->getUrl('*/sales_order/pdfdocs'),
|
| 157 |
+
));
|
| 158 |
+
|
| 159 |
+
$this->getMassactionBlock()->addItem('print_shipping_label', array(
|
| 160 |
+
'label'=> Mage::helper('sales')->__('Print Shipping Labels'),
|
| 161 |
+
'url' => $this->getUrl('*/sales_order_shipment/massPrintShippingLabel'),
|
| 162 |
+
));
|
| 163 |
+
|
| 164 |
+
$this->getMassactionBlock()->addItem('delete_order', array(
|
| 165 |
+
'label'=> Mage::helper('sales')->__('Delete Orders'),
|
| 166 |
+
'url' => $this->getUrl('deleteorders/adminhtml_deleteorders/massDelete'),
|
| 167 |
+
'confirm' => Mage::helper('sales')->__('Are you sure you want to delete the orders?')
|
| 168 |
+
));
|
| 169 |
+
|
| 170 |
+
return $this;
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
public function getRowUrl($row){
|
| 174 |
+
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
|
| 175 |
+
return $this->getUrl('*/sales_order/view', array('order_id' => $row->getId()));
|
| 176 |
+
}
|
| 177 |
+
return false;
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
public function getGridUrl(){
|
| 181 |
+
return $this->getUrl('*/*/grid', array('_current'=>true));
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
}
|
| 185 |
+
?>
|
app/code/community/Cartin24/Deleteorders/Block/Adminhtml/Sales/Order/Render/Delete.php
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Cartin24
|
| 4 |
+
* @category Magento Extensions
|
| 5 |
+
* @package Cartin24_Deleteorders
|
| 6 |
+
* @copyright Copyright (c) 2015-2016 Cartin24. (http://www.Cartin24.com)
|
| 7 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
class Cartin24_Deleteorders_Block_Adminhtml_Sales_Order_Render_Delete extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
|
| 11 |
+
{
|
| 12 |
+
public function render(Varien_Object $row){
|
| 13 |
+
$getData = $row->getData();
|
| 14 |
+
$message = Mage::helper('sales')->__('Do you want to delete this order?');
|
| 15 |
+
$orderID = $getData['entity_id'];
|
| 16 |
+
$view = $this->getUrl('*/sales_order/view',array('order_id' => $orderID));
|
| 17 |
+
$delete = $this->getUrl('deleteorders/adminhtml_deleteorders/delete',array('order_id' => $orderID));
|
| 18 |
+
|
| 19 |
+
$link = '<a href="'.$view.'">View</a> || <a href="javascript:;" onclick="deleteConfirm(\''.$message.'\', \'' . $delete . '\')">Delete</a>';
|
| 20 |
+
return $link;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
?>
|
app/code/community/Cartin24/Deleteorders/Block/Adminhtml/Sales/Order/Render/Delete.php~
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Cartin24
|
| 4 |
+
* @category Magento Extensions
|
| 5 |
+
* @package Cartin24_Deleteorders
|
| 6 |
+
* @copyright Copyright (c) 2015-2016 Cartin24. (http://www.Cartin24.com)
|
| 7 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
class Cartin24_Deleteorders_Block_Adminhtml_Sales_Order_Render_Delete extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
|
| 11 |
+
{
|
| 12 |
+
public function render(Varien_Object $row){
|
| 13 |
+
$getData = $row->getData();
|
| 14 |
+
$message = Mage::helper('sales')->__('Do you want to delete this order?');
|
| 15 |
+
$orderID = $getData['entity_id'];
|
| 16 |
+
$view = $this->getUrl('*/sales_order/view',array('order_id' => $orderID));
|
| 17 |
+
$delete = $this->getUrl('deleteorders/adminhtml_deleteorders/delete',array('order_id' => $orderID));
|
| 18 |
+
|
| 19 |
+
$link = '<a href="'.$view.'">View</a> || <a href="javascript:;" onclick="deleteConfirm(\''.$message.'\', \'' . $delete . '\')">Delete</a>';
|
| 20 |
+
return $link;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
?>
|
app/code/community/Cartin24/Deleteorders/Block/Adminhtml/Sales/Order/View.php
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Cartin24
|
| 4 |
+
* @category Magento Extensions
|
| 5 |
+
* @package Cartin24_Deleteorders
|
| 6 |
+
* @copyright Copyright (c) 2015-2016 Cartin24. (http://www.Cartin24.com)
|
| 7 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
class Cartin24_Deleteorders_Block_Adminhtml_Sales_Order_View extends Mage_Adminhtml_Block_Sales_Order_View {
|
| 11 |
+
public function __construct() {
|
| 12 |
+
|
| 13 |
+
parent::__construct();
|
| 14 |
+
$message = Mage::helper('sales')->__('Do you want to delete this order?');
|
| 15 |
+
$this->_addButton('button_id', array(
|
| 16 |
+
'label' => Mage::helper('Sales')->__('Delete Order'),
|
| 17 |
+
'onclick' => 'deleteConfirm(\''.$message.'\', \'' . $this->getDeleteUrl() . '\')',
|
| 18 |
+
'class' => 'go'
|
| 19 |
+
), 0, 100, 'header', 'header');
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
public function getDeleteUrl(){
|
| 23 |
+
return $this->getUrl('deleteorders/adminhtml_deleteorders/delete', array('_current'=>true));
|
| 24 |
+
}
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
?>
|
app/code/community/Cartin24/Deleteorders/Block/Adminhtml/Sales/Order/View.php~
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Cartin24
|
| 4 |
+
* @category Magento Extensions
|
| 5 |
+
* @package Cartin24_Deleteorders
|
| 6 |
+
* @copyright Copyright (c) 2015-2016 Cartin24. (http://www.Cartin24.com)
|
| 7 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
class Cartin24_Deleteorders_Block_Adminhtml_Sales_Order_View extends Mage_Adminhtml_Block_Sales_Order_View {
|
| 11 |
+
public function __construct() {
|
| 12 |
+
|
| 13 |
+
parent::__construct();
|
| 14 |
+
$message = Mage::helper('sales')->__('Do you want to delete this order?');
|
| 15 |
+
$this->_addButton('button_id', array(
|
| 16 |
+
'label' => Mage::helper('Sales')->__('Delete Order'),
|
| 17 |
+
'onclick' => 'deleteConfirm(\''.$message.'\', \'' . $this->getDeleteUrl() . '\')',
|
| 18 |
+
'class' => 'go'
|
| 19 |
+
), 0, 100, 'header', 'header');
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
public function getDeleteUrl(){
|
| 23 |
+
return $this->getUrl('deleteorders/adminhtml_deleteorders/delete', array('_current'=>true));
|
| 24 |
+
}
|
| 25 |
+
}
|
| 26 |
+
?>
|
app/code/community/Cartin24/Deleteorders/Helper/Data.php
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Cartin24
|
| 4 |
+
* @category Magento Extensions
|
| 5 |
+
* @package Cartin24_Deleteorders
|
| 6 |
+
* @copyright Copyright (c) 2015-2016 Cartin24. (http://www.Cartin24.com)
|
| 7 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
class Cartin24_Deleteorders_Helper_Data extends Mage_Core_Helper_Abstract {
|
| 11 |
+
|
| 12 |
+
}
|
app/code/community/Cartin24/Deleteorders/Helper/Data.php~
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Cartin24
|
| 4 |
+
* @category Magento Extensions
|
| 5 |
+
* @package Cartin24_Deleteorders
|
| 6 |
+
* @copyright Copyright (c) 2015-2016 Cartin24. (http://www.Cartin24.com)
|
| 7 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
class Cartin24_Deleteorders_Helper_Data extends Mage_Core_Helper_Abstract
|
| 11 |
+
{
|
| 12 |
+
|
| 13 |
+
}
|
app/code/community/Cartin24/Deleteorders/controllers/Adminhtml/DeleteorderController.php~
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* SiteClue
|
| 4 |
+
* @category SiteClue
|
| 5 |
+
* @package SiteClue_Deleteorder
|
| 6 |
+
* @copyright Copyright (c) 2015-2016 SiteClue. (http://www.siteclue.com)
|
| 7 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 8 |
+
*/
|
| 9 |
+
class SiteClue_Deleteorder_Adminhtml_DeleteorderController extends Mage_Adminhtml_Controller_Action
|
| 10 |
+
{
|
| 11 |
+
|
| 12 |
+
protected function _initOrder()
|
| 13 |
+
{
|
| 14 |
+
$id = $this->getRequest()->getParam('order_id');
|
| 15 |
+
$order = Mage::getModel('sales/order')->load($id);
|
| 16 |
+
|
| 17 |
+
if (!$order->getId()) {
|
| 18 |
+
$this->_getSession()->addError($this->__('This order no longer exists.'));
|
| 19 |
+
$this->_redirect('*/*/');
|
| 20 |
+
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
|
| 21 |
+
return false;
|
| 22 |
+
}
|
| 23 |
+
Mage::register('sales_order', $order);
|
| 24 |
+
Mage::register('current_order', $order);
|
| 25 |
+
return $order;
|
| 26 |
+
}
|
| 27 |
+
public function deleteAction() {
|
| 28 |
+
if($order = $this->_initOrder()) {
|
| 29 |
+
try {
|
| 30 |
+
$order->delete();
|
| 31 |
+
if($this->_deleteOrder($this->getRequest()->getParam('order_id'))){
|
| 32 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Order was successfully deleted'));
|
| 33 |
+
$this->_redirectUrl(Mage::helper('adminhtml')->getUrl('adminhtml/sales_order/index'));
|
| 34 |
+
}
|
| 35 |
+
} catch (Exception $e) {
|
| 36 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
| 37 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('order_ids')));
|
| 38 |
+
}
|
| 39 |
+
}
|
| 40 |
+
$this->_redirectUrl(Mage::helper('adminhtml')->getUrl('adminhtml/sales_order/index'));
|
| 41 |
+
}
|
| 42 |
+
public function massDeleteAction() {
|
| 43 |
+
$orderIds = $this->getRequest()->getParam('order_ids');
|
| 44 |
+
if(!is_array($orderIds)) {
|
| 45 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
|
| 46 |
+
} else {
|
| 47 |
+
try {
|
| 48 |
+
foreach ($orderIds as $orderId) {
|
| 49 |
+
Mage::getModel('sales/order')->load($orderId)->delete()->unsetAll();
|
| 50 |
+
$this->_deleteOrder($orderId);
|
| 51 |
+
}
|
| 52 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
| 53 |
+
Mage::helper('adminhtml')->__(
|
| 54 |
+
'Total of %d record(s) were successfully deleted', count($orderIds)
|
| 55 |
+
)
|
| 56 |
+
);
|
| 57 |
+
} catch (Exception $e) {
|
| 58 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
$this->_redirectUrl(Mage::helper('adminhtml')->getUrl('adminhtml/sales_order/index'));
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
public function _deleteOrder($order_id){
|
| 65 |
+
|
| 66 |
+
$resource = Mage::getSingleton('core/resource');
|
| 67 |
+
$read = $resource->getConnection('core_read');
|
| 68 |
+
|
| 69 |
+
$order_tb = $resource->getTableName('sales_flat_order_grid');
|
| 70 |
+
$invoice_tb = $resource->getTableName('sales_flat_invoice_grid');
|
| 71 |
+
$shipment_tb = $resource->getTableName('sales_flat_shipment_grid');
|
| 72 |
+
$creditmemo_tb = $resource->getTableName('sales_flat_creditmemo_grid');
|
| 73 |
+
|
| 74 |
+
$sql = "DELETE FROM " . $order_tb . " WHERE entity_id = " . $order_id . ";";
|
| 75 |
+
$read->query($sql);
|
| 76 |
+
$sql = "DELETE FROM " . $invoice_tb . " WHERE order_id = " . $order_id . ";";
|
| 77 |
+
$read->query($sql);
|
| 78 |
+
$sql = "DELETE FROM " . $shipment_tb . " WHERE order_id = " . $order_id . ";";
|
| 79 |
+
$read->query($sql);
|
| 80 |
+
$sql = "DELETE FROM " . $creditmemo_tb . " WHERE order_id = " . $order_id . ";";
|
| 81 |
+
$read->query($sql);
|
| 82 |
+
|
| 83 |
+
return true;
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
}
|
app/code/community/Cartin24/Deleteorders/controllers/Adminhtml/DeleteordersController.php
ADDED
|
@@ -0,0 +1,262 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Cartin24
|
| 4 |
+
* @category Magento Extensions
|
| 5 |
+
* @package Cartin24_Deleteorders
|
| 6 |
+
* @copyright Copyright (c) 2015-2016 Cartin24. (http://www.Cartin24.com)
|
| 7 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 8 |
+
*/
|
| 9 |
+
class Cartin24_Deleteorders_Adminhtml_DeleteordersController extends Mage_Adminhtml_Controller_Action {
|
| 10 |
+
|
| 11 |
+
protected function _initOrder(){
|
| 12 |
+
$id = $this->getRequest()->getParam('order_id');
|
| 13 |
+
$order = Mage::getModel('sales/order')->load($id);
|
| 14 |
+
|
| 15 |
+
if (!$order->getId()) {
|
| 16 |
+
$this->_getSession()->addError($this->__('This order is no longer exists.'));
|
| 17 |
+
$this->_redirect('*/*/');
|
| 18 |
+
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
|
| 19 |
+
return false;
|
| 20 |
+
}
|
| 21 |
+
Mage::register('sales_order', $order);
|
| 22 |
+
Mage::register('current_order', $order);
|
| 23 |
+
return $order;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
public function deleteAction() {
|
| 27 |
+
if($order = $this->_initOrder()) {
|
| 28 |
+
try {
|
| 29 |
+
$order->delete();
|
| 30 |
+
if($this->_deleteOrder($this->getRequest()->getParam('order_id'))){
|
| 31 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Order has been successfully deleted'));
|
| 32 |
+
$this->_redirectUrl(Mage::helper('adminhtml')->getUrl('adminhtml/sales_order/index'));
|
| 33 |
+
}
|
| 34 |
+
} catch (Exception $e) {
|
| 35 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
| 36 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('order_ids')));
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
$this->_redirectUrl(Mage::helper('adminhtml')->getUrl('adminhtml/sales_order/index'));
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
public function massDeleteAction() {
|
| 43 |
+
$order_ids = $this->getRequest()->getParam('order_ids');
|
| 44 |
+
if(!is_array($order_ids)) {
|
| 45 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select order(s)'));
|
| 46 |
+
} else {
|
| 47 |
+
try {
|
| 48 |
+
foreach ($order_ids as $order_id) {
|
| 49 |
+
Mage::getModel('sales/order')->load($order_id)->delete()->unsetAll();
|
| 50 |
+
$this->_deleteOrder($order_id);
|
| 51 |
+
}
|
| 52 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
| 53 |
+
Mage::helper('adminhtml')->__(
|
| 54 |
+
'Total of %d order(s) are successfully deleted', count($order_ids)
|
| 55 |
+
)
|
| 56 |
+
);
|
| 57 |
+
} catch (Exception $e) {
|
| 58 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
$this->_redirectUrl(Mage::helper('adminhtml')->getUrl('adminhtml/sales_order/index'));
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
public function _deleteOrder($order_id){
|
| 66 |
+
/*
|
| 67 |
+
$resource = Mage::getSingleton('core/resource');
|
| 68 |
+
$read = $resource->getConnection('core_read');
|
| 69 |
+
|
| 70 |
+
$order_tbl = $resource->getTableName('sales_flat_order_grid');
|
| 71 |
+
$invoice_tbl = $resource->getTableName('sales_flat_invoice_grid');
|
| 72 |
+
$shipment_tbl = $resource->getTableName('sales_flat_shipment_grid');
|
| 73 |
+
$creditmemo_tbl = $resource->getTableName('sales_flat_creditmemo_grid');
|
| 74 |
+
|
| 75 |
+
$sql = "DELETE FROM " . $order_tbl . " WHERE entity_id = " . $order_id . ";";
|
| 76 |
+
$read->query($sql);
|
| 77 |
+
|
| 78 |
+
$sql = "DELETE FROM " . $invoice_tbl . " WHERE order_id = " . $order_id . ";";
|
| 79 |
+
$read->query($sql);
|
| 80 |
+
|
| 81 |
+
$sql = "DELETE FROM " . $shipment_tbl . " WHERE order_id = " . $order_id . ";";
|
| 82 |
+
$read->query($sql);
|
| 83 |
+
|
| 84 |
+
$sql = "DELETE FROM " . $creditmemo_tbl . " WHERE order_id = " . $order_id . ";";
|
| 85 |
+
$read->query($sql);
|
| 86 |
+
*/
|
| 87 |
+
|
| 88 |
+
$write = Mage::getSingleton('core/resource')->getConnection('core_write');
|
| 89 |
+
$resource_tables = $write->fetchCol("SHOW TABLES");
|
| 90 |
+
|
| 91 |
+
$table_sales_flat_creditmemo_grid = Mage::getSingleton('core/resource')->getTableName('sales_flat_creditmemo_grid');
|
| 92 |
+
$table_sales_flat_shipment_grid = Mage::getSingleton('core/resource')->getTableName('sales_flat_shipment_grid');
|
| 93 |
+
$table_sales_flat_invoice_grid = Mage::getSingleton('core/resource')->getTableName('sales_flat_invoice_grid');
|
| 94 |
+
$table_sales_flat_order_grid = Mage::getSingleton('core/resource')->getTableName('sales_flat_order_grid');
|
| 95 |
+
|
| 96 |
+
$table_sales_flat_order = Mage::getSingleton('core/resource')->getTableName('sales_flat_order');
|
| 97 |
+
$table_sales_flat_creditmemo_comment = Mage::getSingleton('core/resource')->getTableName('sales_flat_creditmemo_comment');
|
| 98 |
+
$table_sales_flat_creditmemo_item = Mage::getSingleton('core/resource')->getTableName('sales_flat_creditmemo_item');
|
| 99 |
+
$table_sales_flat_creditmemo = Mage::getSingleton('core/resource')->getTableName('sales_flat_creditmemo');
|
| 100 |
+
$table_sales_flat_invoice_comment = Mage::getSingleton('core/resource')->getTableName('sales_flat_invoice_comment');
|
| 101 |
+
$table_sales_flat_invoice_item = Mage::getSingleton('core/resource')->getTableName('sales_flat_invoice_item');
|
| 102 |
+
$table_sales_flat_invoice = Mage::getSingleton('core/resource')->getTableName('sales_flat_invoice');
|
| 103 |
+
$table_sales_flat_quote_address_item = Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_address_item');
|
| 104 |
+
$table_sales_flat_quote_item_option = Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_item_option');
|
| 105 |
+
$table_sales_flat_quote = Mage::getSingleton('core/resource')->getTableName('sales_flat_quote');
|
| 106 |
+
$table_sales_flat_quote_address = Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_address');
|
| 107 |
+
$table_sales_flat_quote_item = Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_item');
|
| 108 |
+
$table_sales_flat_quote_payment = Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_payment');
|
| 109 |
+
$table_sales_flat_shipment_comment = Mage::getSingleton('core/resource')->getTableName('sales_flat_shipment_comment');
|
| 110 |
+
$table_sales_flat_shipment_item = Mage::getSingleton('core/resource')->getTableName('sales_flat_shipment_item');
|
| 111 |
+
$table_sales_flat_shipment_track = Mage::getSingleton('core/resource')->getTableName('sales_flat_shipment_track');
|
| 112 |
+
$table_sales_flat_shipment = Mage::getSingleton('core/resource')->getTableName('sales_flat_shipment');
|
| 113 |
+
$table_sales_flat_order_address = Mage::getSingleton('core/resource')->getTableName('sales_flat_order_address');
|
| 114 |
+
$table_sales_flat_order_item = Mage::getSingleton('core/resource')->getTableName('sales_flat_order_item');
|
| 115 |
+
$table_sales_flat_order_payment = Mage::getSingleton('core/resource')->getTableName('sales_flat_order_payment');
|
| 116 |
+
$table_sales_flat_order_status_history= Mage::getSingleton('core/resource')->getTableName('sales_flat_order_status_history');
|
| 117 |
+
$table_log_quote = Mage::getSingleton('core/resource')->getTableName('log_quote');
|
| 118 |
+
$table_sales_flat_quote_shipping_rate= Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_shipping_rate');
|
| 119 |
+
|
| 120 |
+
$query = null;
|
| 121 |
+
$order = Mage::getModel('sales/order')->load($order_id);
|
| 122 |
+
|
| 123 |
+
if($order->increment_id){
|
| 124 |
+
|
| 125 |
+
$incrementId = $order->increment_id;
|
| 126 |
+
|
| 127 |
+
if(in_array($table_sales_flat_order,$resource_tables)){
|
| 128 |
+
/*
|
| 129 |
+
$query = 'SELECT entity_id FROM '.$table_sales_flat_order.' WHERE increment_id="'.mysql_escape_string($incrementId).'"';
|
| 130 |
+
$res1 = $write->fetchAll($query);
|
| 131 |
+
*/
|
| 132 |
+
|
| 133 |
+
$query = 'SELECT quote_id FROM '.$table_sales_flat_order.' WHERE entity_id="'.mysql_escape_string($order_id).'"';
|
| 134 |
+
$res = $write->fetchAll($query);
|
| 135 |
+
$quoteId= $res[0]['quote_id'];
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
$write->query("SET FOREIGN_KEY_CHECKS=1");
|
| 139 |
+
|
| 140 |
+
if(in_array($table_sales_flat_creditmemo_comment,$resource_tables)){
|
| 141 |
+
$write->query("DELETE FROM ".$table_sales_flat_creditmemo_comment." WHERE parent_id IN (SELECT entity_id FROM ".$table_sales_flat_creditmemo." WHERE order_id='".mysql_escape_string($order_id)."')");
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
if(in_array('sales_flat_creditmemo_item',$resource_tables)){
|
| 145 |
+
$write->query("DELETE FROM ".$table_sales_flat_creditmemo_item." WHERE parent_id IN (SELECT entity_id FROM ".$table_sales_flat_creditmemo." WHERE order_id='".mysql_escape_string($order_id)."')");
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
if(in_array($table_sales_flat_creditmemo,$resource_tables)){
|
| 149 |
+
$write->query("DELETE FROM ".$table_sales_flat_creditmemo." WHERE order_id='".mysql_escape_string($order_id)."'");
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
if(in_array($table_sales_flat_creditmemo_grid,$resource_tables)){
|
| 153 |
+
$write->query("DELETE FROM ".$table_sales_flat_creditmemo_grid." WHERE order_id='".mysql_escape_string($order_id)."'");
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
if(in_array($table_sales_flat_invoice_comment,$resource_tables)){
|
| 157 |
+
$write->query("DELETE FROM ".$table_sales_flat_invoice_comment." WHERE parent_id IN (SELECT entity_id FROM ".$table_sales_flat_invoice." WHERE order_id='".mysql_escape_string($order_id)."')");
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
if(in_array($table_sales_flat_invoice_item,$resource_tables)){
|
| 161 |
+
$write->query("DELETE FROM ".$table_sales_flat_invoice_item." WHERE parent_id IN (SELECT entity_id FROM ".$table_sales_flat_invoice." WHERE order_id='".mysql_escape_string($order_id)."')");
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
if(in_array($table_sales_flat_invoice,$resource_tables)){
|
| 165 |
+
$write->query("DELETE FROM ".$table_sales_flat_invoice." WHERE order_id='".mysql_escape_string($order_id)."'");
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
if(in_array($table_sales_flat_invoice_grid,$resource_tables)){
|
| 169 |
+
$write->query("DELETE FROM ".$table_sales_flat_invoice_grid." WHERE order_id='".mysql_escape_string($order_id)."'");
|
| 170 |
+
}
|
| 171 |
+
|
| 172 |
+
if($quoteId){
|
| 173 |
+
|
| 174 |
+
if(in_array($table_sales_flat_quote_address_item,$resource_tables)){
|
| 175 |
+
$write->query("DELETE FROM ".$table_sales_flat_quote_address_item." WHERE parent_item_id IN (SELECT address_id FROM ".$table_sales_flat_quote_address." WHERE quote_id=".$quoteId.")");
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
if(in_array($table_sales_flat_quote_shipping_rate,$resource_tables)){
|
| 179 |
+
$write->query("DELETE FROM ".$table_sales_flat_quote_shipping_rate." WHERE address_id IN (SELECT address_id FROM ".$table_sales_flat_quote_address." WHERE quote_id=".$quoteId.")");
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
if(in_array($table_sales_flat_quote_item_option,$resource_tables)){
|
| 183 |
+
$write->query("DELETE FROM ".$table_sales_flat_quote_item_option." WHERE item_id IN (SELECT item_id FROM ".$table_sales_flat_quote_item." WHERE quote_id=".$quoteId.")");
|
| 184 |
+
}
|
| 185 |
+
|
| 186 |
+
if(in_array($table_sales_flat_quote,$resource_tables)){
|
| 187 |
+
$write->query("DELETE FROM ".$table_sales_flat_quote." WHERE entity_id=".$quoteId);
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
if(in_array($table_sales_flat_quote_address,$resource_tables)){
|
| 191 |
+
$write->query("DELETE FROM ".$table_sales_flat_quote_address." WHERE quote_id=".$quoteId);
|
| 192 |
+
}
|
| 193 |
+
|
| 194 |
+
if(in_array($table_sales_flat_quote_item,$resource_tables)){
|
| 195 |
+
$write->query("DELETE FROM ".$table_sales_flat_quote_item." WHERE quote_id=".$quoteId);
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
if(in_array('sales_flat_quote_payment',$resource_tables)){
|
| 199 |
+
$write->query("DELETE FROM ".$table_sales_flat_quote_payment." WHERE quote_id=".$quoteId);
|
| 200 |
+
}
|
| 201 |
+
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
if(in_array($table_sales_flat_shipment_comment,$resource_tables)){
|
| 205 |
+
$write->query("DELETE FROM ".$table_sales_flat_shipment_comment." WHERE parent_id IN (SELECT entity_id FROM ".$table_sales_flat_shipment." WHERE order_id='".mysql_escape_string($order_id)."')");
|
| 206 |
+
}
|
| 207 |
+
|
| 208 |
+
if(in_array($table_sales_flat_shipment_item,$resource_tables)){
|
| 209 |
+
$write->query("DELETE FROM ".$table_sales_flat_shipment_item." WHERE parent_id IN (SELECT entity_id FROM ".$table_sales_flat_shipment." WHERE order_id='".mysql_escape_string($order_id)."')");
|
| 210 |
+
}
|
| 211 |
+
|
| 212 |
+
if(in_array($table_sales_flat_shipment_track,$resource_tables)){
|
| 213 |
+
$write->query("DELETE FROM ".$table_sales_flat_shipment_track." WHERE order_id IN (SELECT entity_id FROM ".$table_sales_flat_shipment." WHERE order_id='".mysql_escape_string($order_id)."')");
|
| 214 |
+
}
|
| 215 |
+
|
| 216 |
+
if(in_array($table_sales_flat_shipment,$resource_tables)){
|
| 217 |
+
$write->query("DELETE FROM ".$table_sales_flat_shipment." WHERE order_id='".mysql_escape_string($order_id)."'");
|
| 218 |
+
}
|
| 219 |
+
|
| 220 |
+
if(in_array($table_sales_flat_shipment_grid,$resource_tables)){
|
| 221 |
+
$write->query("DELETE FROM ".$table_sales_flat_shipment_grid." WHERE order_id='".mysql_escape_string($order_id)."'");
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
if(in_array($table_sales_flat_order,$resource_tables)){
|
| 225 |
+
$write->query("DELETE FROM ".$table_sales_flat_order." WHERE entity_id='".mysql_escape_string($order_id)."'");
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
if(in_array($table_sales_flat_order_address,$resource_tables)){
|
| 229 |
+
$write->query("DELETE FROM ".$table_sales_flat_order_address." WHERE parent_id='".mysql_escape_string($order_id)."'");
|
| 230 |
+
}
|
| 231 |
+
|
| 232 |
+
if(in_array($table_sales_flat_order_item,$resource_tables)){
|
| 233 |
+
$write->query("DELETE FROM ".$table_sales_flat_order_item." WHERE order_id='".mysql_escape_string($order_id)."'");
|
| 234 |
+
}
|
| 235 |
+
|
| 236 |
+
if(in_array($table_sales_flat_order_payment,$resource_tables)){
|
| 237 |
+
$write->query("DELETE FROM ".$table_sales_flat_order_payment." WHERE parent_id='".mysql_escape_string($order_id)."'");
|
| 238 |
+
}
|
| 239 |
+
|
| 240 |
+
if(in_array($table_sales_flat_order_status_history,$resource_tables)){
|
| 241 |
+
$write->query("DELETE FROM ".$table_sales_flat_order_status_history." WHERE parent_id='".mysql_escape_string($order_id)."'");
|
| 242 |
+
}
|
| 243 |
+
|
| 244 |
+
if($incrementId&&in_array($table_sales_flat_order_grid,$resource_tables)){
|
| 245 |
+
$write->query("DELETE FROM ".$table_sales_flat_order_grid." WHERE increment_id='".mysql_escape_string($incrementId)."'");
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
+
$query = "show tables like '%".$table_log_quote."'";
|
| 249 |
+
$resource_tables_log = $write->fetchCol($query);
|
| 250 |
+
if($quoteId && $resource_tables_log){
|
| 251 |
+
$write->query("DELETE FROM ".$table_log_quote." WHERE quote_id=".$quoteId);
|
| 252 |
+
}
|
| 253 |
+
|
| 254 |
+
$write->query("SET FOREIGN_KEY_CHECKS=1");
|
| 255 |
+
|
| 256 |
+
}
|
| 257 |
+
|
| 258 |
+
|
| 259 |
+
return true;
|
| 260 |
+
}
|
| 261 |
+
|
| 262 |
+
}
|
app/code/community/Cartin24/Deleteorders/controllers/Adminhtml/DeleteordersController.php~
ADDED
|
@@ -0,0 +1,262 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Cartin24
|
| 4 |
+
* @category Magento Extensions
|
| 5 |
+
* @package Cartin24_Deleteorders
|
| 6 |
+
* @copyright Copyright (c) 2015-2016 Cartin24. (http://www.Cartin24.com)
|
| 7 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 8 |
+
*/
|
| 9 |
+
class Cartin24_Deleteorders_Adminhtml_DeleteordersController extends Mage_Adminhtml_Controller_Action {
|
| 10 |
+
|
| 11 |
+
protected function _initOrder(){
|
| 12 |
+
$id = $this->getRequest()->getParam('order_id');
|
| 13 |
+
$order = Mage::getModel('sales/order')->load($id);
|
| 14 |
+
|
| 15 |
+
if (!$order->getId()) {
|
| 16 |
+
$this->_getSession()->addError($this->__('This order is no longer exists.'));
|
| 17 |
+
$this->_redirect('*/*/');
|
| 18 |
+
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
|
| 19 |
+
return false;
|
| 20 |
+
}
|
| 21 |
+
Mage::register('sales_order', $order);
|
| 22 |
+
Mage::register('current_order', $order);
|
| 23 |
+
return $order;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
public function deleteAction() {
|
| 27 |
+
if($order = $this->_initOrder()) {
|
| 28 |
+
try {
|
| 29 |
+
$order->delete();
|
| 30 |
+
if($this->_deleteOrder($this->getRequest()->getParam('order_id'))){
|
| 31 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Order has been successfully deleted'));
|
| 32 |
+
$this->_redirectUrl(Mage::helper('adminhtml')->getUrl('adminhtml/sales_order/index'));
|
| 33 |
+
}
|
| 34 |
+
} catch (Exception $e) {
|
| 35 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
| 36 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('order_ids')));
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
$this->_redirectUrl(Mage::helper('adminhtml')->getUrl('adminhtml/sales_order/index'));
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
public function massDeleteAction() {
|
| 43 |
+
$order_ids = $this->getRequest()->getParam('order_ids');
|
| 44 |
+
if(!is_array($order_ids)) {
|
| 45 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select order(s)'));
|
| 46 |
+
} else {
|
| 47 |
+
try {
|
| 48 |
+
foreach ($order_ids as $order_id) {
|
| 49 |
+
Mage::getModel('sales/order')->load($order_id)->delete()->unsetAll();
|
| 50 |
+
$this->_deleteOrder($order_id);
|
| 51 |
+
}
|
| 52 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
| 53 |
+
Mage::helper('adminhtml')->__(
|
| 54 |
+
'Total of %d order(s) are successfully deleted', count($order_ids)
|
| 55 |
+
)
|
| 56 |
+
);
|
| 57 |
+
} catch (Exception $e) {
|
| 58 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
$this->_redirectUrl(Mage::helper('adminhtml')->getUrl('adminhtml/sales_order/index'));
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
public function _deleteOrder($order_id){
|
| 66 |
+
/*
|
| 67 |
+
$resource = Mage::getSingleton('core/resource');
|
| 68 |
+
$read = $resource->getConnection('core_read');
|
| 69 |
+
|
| 70 |
+
$order_tbl = $resource->getTableName('sales_flat_order_grid');
|
| 71 |
+
$invoice_tbl = $resource->getTableName('sales_flat_invoice_grid');
|
| 72 |
+
$shipment_tbl = $resource->getTableName('sales_flat_shipment_grid');
|
| 73 |
+
$creditmemo_tbl = $resource->getTableName('sales_flat_creditmemo_grid');
|
| 74 |
+
|
| 75 |
+
$sql = "DELETE FROM " . $order_tbl . " WHERE entity_id = " . $order_id . ";";
|
| 76 |
+
$read->query($sql);
|
| 77 |
+
|
| 78 |
+
$sql = "DELETE FROM " . $invoice_tbl . " WHERE order_id = " . $order_id . ";";
|
| 79 |
+
$read->query($sql);
|
| 80 |
+
|
| 81 |
+
$sql = "DELETE FROM " . $shipment_tbl . " WHERE order_id = " . $order_id . ";";
|
| 82 |
+
$read->query($sql);
|
| 83 |
+
|
| 84 |
+
$sql = "DELETE FROM " . $creditmemo_tbl . " WHERE order_id = " . $order_id . ";";
|
| 85 |
+
$read->query($sql);
|
| 86 |
+
*/
|
| 87 |
+
|
| 88 |
+
$write = Mage::getSingleton('core/resource')->getConnection('core_write');
|
| 89 |
+
$resource_tables = $write->fetchCol("SHOW TABLES");
|
| 90 |
+
|
| 91 |
+
$table_sales_flat_creditmemo_grid = Mage::getSingleton('core/resource')->getTableName('sales_flat_creditmemo_grid');
|
| 92 |
+
$table_sales_flat_shipment_grid = Mage::getSingleton('core/resource')->getTableName('sales_flat_shipment_grid');
|
| 93 |
+
$table_sales_flat_invoice_grid = Mage::getSingleton('core/resource')->getTableName('sales_flat_invoice_grid');
|
| 94 |
+
$table_sales_flat_order_grid = Mage::getSingleton('core/resource')->getTableName('sales_flat_order_grid');
|
| 95 |
+
|
| 96 |
+
$table_sales_flat_order = Mage::getSingleton('core/resource')->getTableName('sales_flat_order');
|
| 97 |
+
$table_sales_flat_creditmemo_comment = Mage::getSingleton('core/resource')->getTableName('sales_flat_creditmemo_comment');
|
| 98 |
+
$table_sales_flat_creditmemo_item = Mage::getSingleton('core/resource')->getTableName('sales_flat_creditmemo_item');
|
| 99 |
+
$table_sales_flat_creditmemo = Mage::getSingleton('core/resource')->getTableName('sales_flat_creditmemo');
|
| 100 |
+
$table_sales_flat_invoice_comment = Mage::getSingleton('core/resource')->getTableName('sales_flat_invoice_comment');
|
| 101 |
+
$table_sales_flat_invoice_item = Mage::getSingleton('core/resource')->getTableName('sales_flat_invoice_item');
|
| 102 |
+
$table_sales_flat_invoice = Mage::getSingleton('core/resource')->getTableName('sales_flat_invoice');
|
| 103 |
+
$table_sales_flat_quote_address_item = Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_address_item');
|
| 104 |
+
$table_sales_flat_quote_item_option = Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_item_option');
|
| 105 |
+
$table_sales_flat_quote = Mage::getSingleton('core/resource')->getTableName('sales_flat_quote');
|
| 106 |
+
$table_sales_flat_quote_address = Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_address');
|
| 107 |
+
$table_sales_flat_quote_item = Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_item');
|
| 108 |
+
$table_sales_flat_quote_payment = Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_payment');
|
| 109 |
+
$table_sales_flat_shipment_comment = Mage::getSingleton('core/resource')->getTableName('sales_flat_shipment_comment');
|
| 110 |
+
$table_sales_flat_shipment_item = Mage::getSingleton('core/resource')->getTableName('sales_flat_shipment_item');
|
| 111 |
+
$table_sales_flat_shipment_track = Mage::getSingleton('core/resource')->getTableName('sales_flat_shipment_track');
|
| 112 |
+
$table_sales_flat_shipment = Mage::getSingleton('core/resource')->getTableName('sales_flat_shipment');
|
| 113 |
+
$table_sales_flat_order_address = Mage::getSingleton('core/resource')->getTableName('sales_flat_order_address');
|
| 114 |
+
$table_sales_flat_order_item = Mage::getSingleton('core/resource')->getTableName('sales_flat_order_item');
|
| 115 |
+
$table_sales_flat_order_payment = Mage::getSingleton('core/resource')->getTableName('sales_flat_order_payment');
|
| 116 |
+
$table_sales_flat_order_status_history= Mage::getSingleton('core/resource')->getTableName('sales_flat_order_status_history');
|
| 117 |
+
$table_log_quote = Mage::getSingleton('core/resource')->getTableName('log_quote');
|
| 118 |
+
$table_sales_flat_quote_shipping_rate= Mage::getSingleton('core/resource')->getTableName('sales_flat_quote_shipping_rate');
|
| 119 |
+
|
| 120 |
+
$query = null;
|
| 121 |
+
$order = Mage::getModel('sales/order')->load($order_id);
|
| 122 |
+
|
| 123 |
+
if($order->increment_id){
|
| 124 |
+
|
| 125 |
+
$incrementId = $order->increment_id;
|
| 126 |
+
|
| 127 |
+
if(in_array($table_sales_flat_order,$resource_tables)){
|
| 128 |
+
/*
|
| 129 |
+
$query = 'SELECT entity_id FROM '.$table_sales_flat_order.' WHERE increment_id="'.mysql_escape_string($incrementId).'"';
|
| 130 |
+
$res1 = $write->fetchAll($query);
|
| 131 |
+
*/
|
| 132 |
+
|
| 133 |
+
$query = 'SELECT quote_id FROM '.$table_sales_flat_order.' WHERE entity_id="'.mysql_escape_string($order_id).'"';
|
| 134 |
+
$res = $write->fetchAll($query);
|
| 135 |
+
$quoteId= $res[0]['quote_id'];
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
$write->query("SET FOREIGN_KEY_CHECKS=1");
|
| 139 |
+
|
| 140 |
+
if(in_array($table_sales_flat_creditmemo_comment,$resource_tables)){
|
| 141 |
+
$write->query("DELETE FROM ".$table_sales_flat_creditmemo_comment." WHERE parent_id IN (SELECT entity_id FROM ".$table_sales_flat_creditmemo." WHERE order_id='".mysql_escape_string($order_id)."')");
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
if(in_array('sales_flat_creditmemo_item',$resource_tables)){
|
| 145 |
+
$write->query("DELETE FROM ".$table_sales_flat_creditmemo_item." WHERE parent_id IN (SELECT entity_id FROM ".$table_sales_flat_creditmemo." WHERE order_id='".mysql_escape_string($order_id)."')");
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
if(in_array($table_sales_flat_creditmemo,$resource_tables)){
|
| 149 |
+
$write->query("DELETE FROM ".$table_sales_flat_creditmemo." WHERE order_id='".mysql_escape_string($order_id)."'");
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
if(in_array($table_sales_flat_creditmemo_grid,$resource_tables)){
|
| 153 |
+
$write->query("DELETE FROM ".$table_sales_flat_creditmemo_grid." WHERE order_id='".mysql_escape_string($order_id)."'");
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
if(in_array($table_sales_flat_invoice_comment,$resource_tables)){
|
| 157 |
+
$write->query("DELETE FROM ".$table_sales_flat_invoice_comment." WHERE parent_id IN (SELECT entity_id FROM ".$table_sales_flat_invoice." WHERE order_id='".mysql_escape_string($order_id)."')");
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
if(in_array($table_sales_flat_invoice_item,$resource_tables)){
|
| 161 |
+
$write->query("DELETE FROM ".$table_sales_flat_invoice_item." WHERE parent_id IN (SELECT entity_id FROM ".$table_sales_flat_invoice." WHERE order_id='".mysql_escape_string($order_id)."')");
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
if(in_array($table_sales_flat_invoice,$resource_tables)){
|
| 165 |
+
$write->query("DELETE FROM ".$table_sales_flat_invoice." WHERE order_id='".mysql_escape_string($order_id)."'");
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
if(in_array($table_sales_flat_invoice_grid,$resource_tables)){
|
| 169 |
+
$write->query("DELETE FROM ".$table_sales_flat_invoice_grid." WHERE order_id='".mysql_escape_string($order_id)."'");
|
| 170 |
+
}
|
| 171 |
+
|
| 172 |
+
if($quoteId){
|
| 173 |
+
|
| 174 |
+
if(in_array($table_sales_flat_quote_address_item,$resource_tables)){
|
| 175 |
+
$write->query("DELETE FROM ".$table_sales_flat_quote_address_item." WHERE parent_item_id IN (SELECT address_id FROM ".$table_sales_flat_quote_address." WHERE quote_id=".$quoteId.")");
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
if(in_array($table_sales_flat_quote_shipping_rate,$resource_tables)){
|
| 179 |
+
$write->query("DELETE FROM ".$table_sales_flat_quote_shipping_rate." WHERE address_id IN (SELECT address_id FROM ".$table_sales_flat_quote_address." WHERE quote_id=".$quoteId.")");
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
if(in_array($table_sales_flat_quote_item_option,$resource_tables)){
|
| 183 |
+
$write->query("DELETE FROM ".$table_sales_flat_quote_item_option." WHERE item_id IN (SELECT item_id FROM ".$table_sales_flat_quote_item." WHERE quote_id=".$quoteId.")");
|
| 184 |
+
}
|
| 185 |
+
|
| 186 |
+
if(in_array($table_sales_flat_quote,$resource_tables)){
|
| 187 |
+
$write->query("DELETE FROM ".$table_sales_flat_quote." WHERE entity_id=".$quoteId);
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
if(in_array($table_sales_flat_quote_address,$resource_tables)){
|
| 191 |
+
$write->query("DELETE FROM ".$table_sales_flat_quote_address." WHERE quote_id=".$quoteId);
|
| 192 |
+
}
|
| 193 |
+
|
| 194 |
+
if(in_array($table_sales_flat_quote_item,$resource_tables)){
|
| 195 |
+
$write->query("DELETE FROM ".$table_sales_flat_quote_item." WHERE quote_id=".$quoteId);
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
if(in_array('sales_flat_quote_payment',$resource_tables)){
|
| 199 |
+
$write->query("DELETE FROM ".$table_sales_flat_quote_payment." WHERE quote_id=".$quoteId);
|
| 200 |
+
}
|
| 201 |
+
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
if(in_array($table_sales_flat_shipment_comment,$resource_tables)){
|
| 205 |
+
$write->query("DELETE FROM ".$table_sales_flat_shipment_comment." WHERE parent_id IN (SELECT entity_id FROM ".$table_sales_flat_shipment." WHERE order_id='".mysql_escape_string($order_id)."')");
|
| 206 |
+
}
|
| 207 |
+
|
| 208 |
+
if(in_array($table_sales_flat_shipment_item,$resource_tables)){
|
| 209 |
+
$write->query("DELETE FROM ".$table_sales_flat_shipment_item." WHERE parent_id IN (SELECT entity_id FROM ".$table_sales_flat_shipment." WHERE order_id='".mysql_escape_string($order_id)."')");
|
| 210 |
+
}
|
| 211 |
+
|
| 212 |
+
if(in_array($table_sales_flat_shipment_track,$resource_tables)){
|
| 213 |
+
$write->query("DELETE FROM ".$table_sales_flat_shipment_track." WHERE order_id IN (SELECT entity_id FROM ".$table_sales_flat_shipment." WHERE order_id='".mysql_escape_string($order_id)."')");
|
| 214 |
+
}
|
| 215 |
+
|
| 216 |
+
if(in_array($table_sales_flat_shipment,$resource_tables)){
|
| 217 |
+
$write->query("DELETE FROM ".$table_sales_flat_shipment." WHERE order_id='".mysql_escape_string($order_id)."'");
|
| 218 |
+
}
|
| 219 |
+
|
| 220 |
+
if(in_array($table_sales_flat_shipment_grid,$resource_tables)){
|
| 221 |
+
$write->query("DELETE FROM ".$table_sales_flat_shipment_grid." WHERE order_id='".mysql_escape_string($order_id)."'");
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
if(in_array($table_sales_flat_order,$resource_tables)){
|
| 225 |
+
$write->query("DELETE FROM ".$table_sales_flat_order." WHERE entity_id='".mysql_escape_string($order_id)."'");
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
if(in_array($table_sales_flat_order_address,$resource_tables)){
|
| 229 |
+
$write->query("DELETE FROM ".$table_sales_flat_order_address." WHERE parent_id='".mysql_escape_string($order_id)."'");
|
| 230 |
+
}
|
| 231 |
+
|
| 232 |
+
if(in_array($table_sales_flat_order_item,$resource_tables)){
|
| 233 |
+
$write->query("DELETE FROM ".$table_sales_flat_order_item." WHERE order_id='".mysql_escape_string($order_id)."'");
|
| 234 |
+
}
|
| 235 |
+
|
| 236 |
+
if(in_array($table_sales_flat_order_payment,$resource_tables)){
|
| 237 |
+
$write->query("DELETE FROM ".$table_sales_flat_order_payment." WHERE parent_id='".mysql_escape_string($order_id)."'");
|
| 238 |
+
}
|
| 239 |
+
|
| 240 |
+
if(in_array($table_sales_flat_order_status_history,$resource_tables)){
|
| 241 |
+
$write->query("DELETE FROM ".$table_sales_flat_order_status_history." WHERE parent_id='".mysql_escape_string($order_id)."'");
|
| 242 |
+
}
|
| 243 |
+
|
| 244 |
+
if($incrementId&&in_array($table_sales_flat_order_grid,$resource_tables)){
|
| 245 |
+
$write->query("DELETE FROM ".$table_sales_flat_order_grid." WHERE increment_id='".mysql_escape_string($incrementId)."'");
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
+
$query = "show tables like '%".$table_log_quote."'";
|
| 249 |
+
$resource_tables_log = $write->fetchCol($query);
|
| 250 |
+
if($quoteId && $resource_tables_log){
|
| 251 |
+
$write->query("DELETE FROM ".$table_log_quote." WHERE quote_id=".$quoteId);
|
| 252 |
+
}
|
| 253 |
+
|
| 254 |
+
$write->query("SET FOREIGN_KEY_CHECKS=1");
|
| 255 |
+
|
| 256 |
+
}
|
| 257 |
+
|
| 258 |
+
|
| 259 |
+
return true;
|
| 260 |
+
}
|
| 261 |
+
|
| 262 |
+
}
|
app/code/community/Cartin24/Deleteorders/etc/config.xml
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<modules>
|
| 4 |
+
<Cartin24_Deleteorders>
|
| 5 |
+
<version>1.0.0</version>
|
| 6 |
+
</Cartin24_Deleteorders>
|
| 7 |
+
</modules>
|
| 8 |
+
<admin>
|
| 9 |
+
<routers>
|
| 10 |
+
<deleteorders>
|
| 11 |
+
<use>admin</use>
|
| 12 |
+
<args>
|
| 13 |
+
<module>Cartin24_Deleteorders</module>
|
| 14 |
+
<frontName>deleteorders</frontName>
|
| 15 |
+
</args>
|
| 16 |
+
</deleteorders>
|
| 17 |
+
</routers>
|
| 18 |
+
</admin>
|
| 19 |
+
<adminhtml>
|
| 20 |
+
<acl>
|
| 21 |
+
<resources>
|
| 22 |
+
<all>
|
| 23 |
+
<title>Allow Everything</title>
|
| 24 |
+
</all>
|
| 25 |
+
<admin>
|
| 26 |
+
<children>
|
| 27 |
+
<Cartin24_Deleteorders>
|
| 28 |
+
<title>Delete Orders Module</title>
|
| 29 |
+
<sort_order>10</sort_order>
|
| 30 |
+
</Cartin24_Deleteorders>
|
| 31 |
+
</children>
|
| 32 |
+
</admin>
|
| 33 |
+
</resources>
|
| 34 |
+
</acl>
|
| 35 |
+
</adminhtml>
|
| 36 |
+
<global>
|
| 37 |
+
<blocks>
|
| 38 |
+
<adminhtml>
|
| 39 |
+
<rewrite>
|
| 40 |
+
<sales_order_grid>Cartin24_Deleteorders_Block_Adminhtml_Sales_Order_Grid</sales_order_grid>
|
| 41 |
+
</rewrite>
|
| 42 |
+
<rewrite>
|
| 43 |
+
<sales_order_view>Cartin24_Deleteorders_Block_Adminhtml_Sales_Order_View</sales_order_view>
|
| 44 |
+
</rewrite>
|
| 45 |
+
</adminhtml>
|
| 46 |
+
<deleteorders>
|
| 47 |
+
<class>Cartin24_Deleteorders_Block</class>
|
| 48 |
+
</deleteorders>
|
| 49 |
+
</blocks>
|
| 50 |
+
<helpers>
|
| 51 |
+
<deleteorders>
|
| 52 |
+
<class>Cartin24_Deleteorders_Helper</class>
|
| 53 |
+
</deleteorders>
|
| 54 |
+
</helpers>
|
| 55 |
+
</global>
|
| 56 |
+
</config>
|
app/etc/modules/Cartin24_Deleteorders.xml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<modules>
|
| 4 |
+
<Cartin24_Deleteorders>
|
| 5 |
+
<active>true</active>
|
| 6 |
+
<codePool>community</codePool>
|
| 7 |
+
</Cartin24_Deleteorders>
|
| 8 |
+
</modules>
|
| 9 |
+
</config>
|
package.xml
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<package>
|
| 3 |
+
<name>Cartin24_DeleteOrders</name>
|
| 4 |
+
<version>1.0.0</version>
|
| 5 |
+
<stability>stable</stability>
|
| 6 |
+
<license>Academic Free License (AFL)</license>
|
| 7 |
+
<channel>community</channel>
|
| 8 |
+
<extends/>
|
| 9 |
+
<summary>Simple tool for deleting Magento orders. Easy to delete order(s) through backend.
|
| 10 |
+
</summary>
|
| 11 |
+
<description>Simple tool for deleting Magento orders. Easy to delete order(s) through backend 
|
| 12 |
+
</description>
|
| 13 |
+
<notes>Simple tool for deleting Magento orders. Easy to delete order(s) through backend.
|
| 14 |
+
</notes>
|
| 15 |
+
<authors><author><name>Cartin24</name><user>Cartin24</user><email>developer@cartin24.com</email></author></authors>
|
| 16 |
+
<date>2015-03-12</date>
|
| 17 |
+
<time>16:31:56</time>
|
| 18 |
+
<contents><target name="magecommunity"><dir name="Cartin24"><dir name="Deleteorders"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="9d279d3e4b3e683c2c0831f611ed3ade"/><file name="Grid.php~" hash="9d279d3e4b3e683c2c0831f611ed3ade"/><dir name="Render"><file name="Delete.php" hash="9897b82e35c0bfd1a8021b8180562146"/><file name="Delete.php~" hash="9897b82e35c0bfd1a8021b8180562146"/></dir><file name="View.php" hash="41f11d4e4de9246dbc2eaa41c1f1e0bb"/><file name="View.php~" hash="17268c6f1045692d10f56dfb7255a591"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="1fbf793cd3d6e49e02a7ae564d0a9989"/><file name="Data.php~" hash="9ee8969bbaac11a200749ba59cc9f819"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="DeleteorderController.php~" hash="d122052f7bd65086ced94573b7565fba"/><file name="DeleteordersController.php" hash="6cf070dc73ca16acf3d58eab3b90afac"/><file name="DeleteordersController.php~" hash="6cf070dc73ca16acf3d58eab3b90afac"/></dir></dir><dir name="etc"><file name="config.xml" hash="9dc350c086e3a8a97f09be47ede1a1fc"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Cartin24_Deleteorders.xml" hash="708bf42ccb04cc6e447509b07346d359"/></dir></target></contents>
|
| 19 |
+
<compatible/>
|
| 20 |
+
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
| 21 |
+
</package>
|
