Version Notes
none
Download this release
Release Info
| Developer | Magento Core Team |
| Extension | Wyomind_OrdersEraser |
| Version | 2.0.1 |
| Comparing to | |
| See all releases | |
Code changes from version 1.1.0 to 2.0.1
- app/code/local/Wyomind/Deleteorders/Block/Grid.php +0 -1
- app/code/local/Wyomind/Deleteorders/Helper/Data.php +0 -6
- app/code/local/Wyomind/Deleteorders/controllers/Adminhtml/OrderController.php +0 -5
- app/code/local/Wyomind/Deleteorders/etc/config.xml +0 -113
- app/code/local/Wyomind/Orderseraser/Block/Enhancedgrid/Grid.php +1 -0
- app/code/local/Wyomind/Orderseraser/Block/Erasergrid/Grid.php +1 -0
- app/code/local/Wyomind/Orderseraser/Block/Orderseraser.php +19 -0
- app/code/local/Wyomind/Orderseraser/Helper/Data.php +6 -0
- app/code/local/Wyomind/{Deleteorders/Model/Erase.php → Orderseraser/Model/Orderseraser.php} +3 -5
- app/code/local/Wyomind/Orderseraser/controllers/Adminhtml/OrderseraserController.php +5 -0
- app/code/local/Wyomind/Orderseraser/etc/config.xml +127 -0
- app/design/adminhtml/default/default/layout/Orderseraser.xml +10 -0
- app/etc/modules/Wyomind_Deleteorders.xml +0 -17
- app/etc/modules/Wyomind_Orderseraser.xml +10 -0
- package.xml +7 -7
app/code/local/Wyomind/Deleteorders/Block/Grid.php
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
public function __construct()
|
| 3 |
{
|
| 4 |
parent::__construct();
|
| 5 |
$this->setId('sales_order_grid');
|
| 6 |
$this->setUseAjax(true);
|
| 7 |
$this->setDefaultSort('created_at');
|
| 8 |
$this->setDefaultDir('DESC');
|
| 9 |
$this->setSaveParametersInSession(true);
|
| 10 |
}
|
| 11 |
/**
|
| 12 |
* Retrieve collection class
|
| 13 |
*
|
| 14 |
* @return string
|
| 15 |
*/
|
| 16 |
public function getVersion(){
|
| 17 |
return substr(Mage::getVersion(),0,3);
|
| 18 |
}
|
| 19 |
|
| 20 |
{
|
| 21 |
|
| 22 |
}
|
| 23 |
{
|
| 24 |
return 'sales/order_grid_collection';
|
| 25 |
}
|
| 26 |
|
| 27 |
{
|
| 28 |
$this->addColumn('real_order_id', array(
|
| 29 |
'header'=> Mage::helper('sales')->__('Order #'),
|
| 30 |
'width' => '80px',
|
| 31 |
'type' => 'text',
|
| 32 |
'index' => 'increment_id',
|
| 33 |
));
|
| 34 |
if (!Mage::app()->isSingleStoreMode()) {
|
| 35 |
$this->addColumn('store_id', array(
|
| 36 |
'header' => Mage::helper('sales')->__('Purchased From (Store)'),
|
| 37 |
'index' => 'store_id',
|
| 38 |
'type' => 'store',
|
| 39 |
'store_view'=> true,
|
| 40 |
'display_deleted' => true,
|
| 41 |
));
|
| 42 |
}
|
| 43 |
$this->addColumn('created_at', array(
|
| 44 |
'header' => Mage::helper('sales')->__('Purchased On'),
|
| 45 |
'index' => 'created_at',
|
| 46 |
'type' => 'datetime',
|
| 47 |
'width' => '100px',
|
| 48 |
));
|
| 49 |
$this->addColumn('billing_name', array(
|
| 50 |
'header' => Mage::helper('sales')->__('Bill to Name'),
|
| 51 |
'index' => 'billing_name',
|
| 52 |
));
|
| 53 |
$this->addColumn('shipping_name', array(
|
| 54 |
'header' => Mage::helper('sales')->__('Ship to Name'),
|
| 55 |
'index' => 'shipping_name',
|
| 56 |
));
|
| 57 |
$this->addColumn('base_grand_total', array(
|
| 58 |
'header' => Mage::helper('sales')->__('G.T. (Base)'),
|
| 59 |
'index' => 'base_grand_total',
|
| 60 |
'type' => 'currency',
|
| 61 |
'currency' => 'base_currency_code',
|
| 62 |
));
|
| 63 |
$this->addColumn('grand_total', array(
|
| 64 |
'header' => Mage::helper('sales')->__('G.T. (Purchased)'),
|
| 65 |
'index' => 'grand_total',
|
| 66 |
'type' => 'currency',
|
| 67 |
'currency' => 'order_currency_code',
|
| 68 |
));
|
| 69 |
$this->addColumn('status', array(
|
| 70 |
'header' => Mage::helper('sales')->__('Status'),
|
| 71 |
'index' => 'status',
|
| 72 |
'type' => 'options',
|
| 73 |
'width' => '70px',
|
| 74 |
'options' => Mage::getSingleton('sales/order_config')->getStatuses(),
|
| 75 |
));
|
| 76 |
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
|
| 77 |
$this->addColumn('action',
|
| 78 |
array(
|
| 79 |
'header' => Mage::helper('sales')->__('Action'),
|
| 80 |
'width' => '50px',
|
| 81 |
'type' => 'action',
|
| 82 |
'getter' => 'getId',
|
| 83 |
'actions' => array(
|
| 84 |
array(
|
| 85 |
'caption' => Mage::helper('sales')->__('View'),
|
| 86 |
'url' => array('base'=>'*/sales_order/view'),
|
| 87 |
'field' => 'order_id'
|
| 88 |
),
|
| 89 |
'caption' => Mage::helper('sales')->__('Delete'),
|
| 90 |
'url' => array('base'=>'deleteorders/adminhtml_order/delete'),
|
| 91 |
'confirm' => Mage::helper('sales')->__('Are your sure your want to delete this order and to erase all linked data ? '),
|
| 92 |
'field' => 'order_id'
|
| 93 |
)
|
| 94 |
),
|
| 95 |
'filter' => false,
|
| 96 |
'sortable' => false,
|
| 97 |
'index' => 'stores',
|
| 98 |
'is_system' => true,
|
| 99 |
));
|
| 100 |
}
|
| 101 |
$this->addRssList('rss/order/new', Mage::helper('sales')->__('New Order RSS'));
|
| 102 |
if($this->getVersion()>1.3){
|
| 103 |
$this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
|
| 104 |
$this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));
|
| 105 |
}
|
| 106 |
return parent::_prepareColumns();
|
| 107 |
}
|
| 108 |
protected function _prepareMassaction()
|
| 109 |
{
|
| 110 |
$this->setMassactionIdField('entity_id');
|
| 111 |
$this->getMassactionBlock()->setFormFieldName('order_ids');
|
| 112 |
$this->getMassactionBlock()->setUseSelectAll(false);
|
| 113 |
'label'=> Mage::helper('sales')->__('Delete'),
|
| 114 |
'url' => $this->getUrl('deleteorders/adminhtml_order/massdelete'),
|
| 115 |
));
|
| 116 |
|
| 117 |
$this->getMassactionBlock()->addItem('cancel_order', array(
|
| 118 |
'label'=> Mage::helper('sales')->__('Cancel'),
|
| 119 |
'url' => $this->getUrl('*/sales_order/massCancel'),
|
| 120 |
));
|
| 121 |
}
|
| 122 |
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/hold')) {
|
| 123 |
$this->getMassactionBlock()->addItem('hold_order', array(
|
| 124 |
'label'=> Mage::helper('sales')->__('Hold'),
|
| 125 |
'url' => $this->getUrl('*/sales_order/massHold'),
|
| 126 |
));
|
| 127 |
}
|
| 128 |
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/unhold')) {
|
| 129 |
$this->getMassactionBlock()->addItem('unhold_order', array(
|
| 130 |
'label'=> Mage::helper('sales')->__('Unhold'),
|
| 131 |
'url' => $this->getUrl('*/sales_order/massUnhold'),
|
| 132 |
));
|
| 133 |
}
|
| 134 |
$this->getMassactionBlock()->addItem('pdfinvoices_order', array(
|
| 135 |
'label'=> Mage::helper('sales')->__('Print Invoices'),
|
| 136 |
'url' => $this->getUrl('*/sales_order/pdfinvoices'),
|
| 137 |
));
|
| 138 |
$this->getMassactionBlock()->addItem('pdfshipments_order', array(
|
| 139 |
'label'=> Mage::helper('sales')->__('Print Packingslips'),
|
| 140 |
'url' => $this->getUrl('*/sales_order/pdfshipments'),
|
| 141 |
));
|
| 142 |
$this->getMassactionBlock()->addItem('pdfcreditmemos_order', array(
|
| 143 |
'label'=> Mage::helper('sales')->__('Print Credit Memos'),
|
| 144 |
'url' => $this->getUrl('*/sales_order/pdfcreditmemos'),
|
| 145 |
));
|
| 146 |
$this->getMassactionBlock()->addItem('pdfdocs_order', array(
|
| 147 |
'label'=> Mage::helper('sales')->__('Print All'),
|
| 148 |
'url' => $this->getUrl('*/sales_order/pdfdocs'),
|
| 149 |
));
|
| 150 |
return $this;
|
| 151 |
}
|
| 152 |
public function getRowUrl($row)
|
| 153 |
{
|
| 154 |
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
|
| 155 |
return $this->getUrl('*/sales_order/view', array('order_id' => $row->getId()));
|
| 156 |
}
|
| 157 |
return false;
|
| 158 |
}
|
| 159 |
public function getGridUrl()
|
| 160 |
{
|
| 161 |
return $this->getUrl('*/*/grid', array('_current'=>true));
|
| 162 |
}
|
|
|
|
| 0 |
public function __construct()
|
| 1 |
{
|
| 2 |
parent::__construct();
|
| 3 |
$this->setId('sales_order_grid');
|
| 4 |
$this->setUseAjax(true);
|
| 5 |
$this->setDefaultSort('created_at');
|
| 6 |
$this->setDefaultDir('DESC');
|
| 7 |
$this->setSaveParametersInSession(true);
|
| 8 |
}
|
| 9 |
/**
|
| 10 |
* Retrieve collection class
|
| 11 |
*
|
| 12 |
* @return string
|
| 13 |
*/
|
| 14 |
public function getVersion(){
|
| 15 |
return substr(Mage::getVersion(),0,3);
|
| 16 |
}
|
| 17 |
|
| 18 |
{
|
| 19 |
|
| 20 |
}
|
| 21 |
{
|
| 22 |
return 'sales/order_grid_collection';
|
| 23 |
}
|
| 24 |
|
| 25 |
{
|
| 26 |
$this->addColumn('real_order_id', array(
|
| 27 |
'header'=> Mage::helper('sales')->__('Order #'),
|
| 28 |
'width' => '80px',
|
| 29 |
'type' => 'text',
|
| 30 |
'index' => 'increment_id',
|
| 31 |
));
|
| 32 |
if (!Mage::app()->isSingleStoreMode()) {
|
| 33 |
$this->addColumn('store_id', array(
|
| 34 |
'header' => Mage::helper('sales')->__('Purchased From (Store)'),
|
| 35 |
'index' => 'store_id',
|
| 36 |
'type' => 'store',
|
| 37 |
'store_view'=> true,
|
| 38 |
'display_deleted' => true,
|
| 39 |
));
|
| 40 |
}
|
| 41 |
$this->addColumn('created_at', array(
|
| 42 |
'header' => Mage::helper('sales')->__('Purchased On'),
|
| 43 |
'index' => 'created_at',
|
| 44 |
'type' => 'datetime',
|
| 45 |
'width' => '100px',
|
| 46 |
));
|
| 47 |
$this->addColumn('billing_name', array(
|
| 48 |
'header' => Mage::helper('sales')->__('Bill to Name'),
|
| 49 |
'index' => 'billing_name',
|
| 50 |
));
|
| 51 |
$this->addColumn('shipping_name', array(
|
| 52 |
'header' => Mage::helper('sales')->__('Ship to Name'),
|
| 53 |
'index' => 'shipping_name',
|
| 54 |
));
|
| 55 |
$this->addColumn('base_grand_total', array(
|
| 56 |
'header' => Mage::helper('sales')->__('G.T. (Base)'),
|
| 57 |
'index' => 'base_grand_total',
|
| 58 |
'type' => 'currency',
|
| 59 |
'currency' => 'base_currency_code',
|
| 60 |
));
|
| 61 |
$this->addColumn('grand_total', array(
|
| 62 |
'header' => Mage::helper('sales')->__('G.T. (Purchased)'),
|
| 63 |
'index' => 'grand_total',
|
| 64 |
'type' => 'currency',
|
| 65 |
'currency' => 'order_currency_code',
|
| 66 |
));
|
| 67 |
$this->addColumn('status', array(
|
| 68 |
'header' => Mage::helper('sales')->__('Status'),
|
| 69 |
'index' => 'status',
|
| 70 |
'type' => 'options',
|
| 71 |
'width' => '70px',
|
| 72 |
'options' => Mage::getSingleton('sales/order_config')->getStatuses(),
|
| 73 |
));
|
| 74 |
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
|
| 75 |
$this->addColumn('action',
|
| 76 |
array(
|
| 77 |
'header' => Mage::helper('sales')->__('Action'),
|
| 78 |
'width' => '50px',
|
| 79 |
'type' => 'action',
|
| 80 |
'getter' => 'getId',
|
| 81 |
'actions' => array(
|
| 82 |
array(
|
| 83 |
'caption' => Mage::helper('sales')->__('View'),
|
| 84 |
'url' => array('base'=>'*/sales_order/view'),
|
| 85 |
'field' => 'order_id'
|
| 86 |
),
|
| 87 |
'caption' => Mage::helper('sales')->__('Delete'),
|
| 88 |
'url' => array('base'=>'deleteorders/adminhtml_order/delete'),
|
| 89 |
'confirm' => Mage::helper('sales')->__('Are your sure your want to delete this order and to erase all linked data ? '),
|
| 90 |
'field' => 'order_id'
|
| 91 |
)
|
| 92 |
),
|
| 93 |
'filter' => false,
|
| 94 |
'sortable' => false,
|
| 95 |
'index' => 'stores',
|
| 96 |
'is_system' => true,
|
| 97 |
));
|
| 98 |
}
|
| 99 |
$this->addRssList('rss/order/new', Mage::helper('sales')->__('New Order RSS'));
|
| 100 |
if($this->getVersion()>1.3){
|
| 101 |
$this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
|
| 102 |
$this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));
|
| 103 |
}
|
| 104 |
return parent::_prepareColumns();
|
| 105 |
}
|
| 106 |
protected function _prepareMassaction()
|
| 107 |
{
|
| 108 |
$this->setMassactionIdField('entity_id');
|
| 109 |
$this->getMassactionBlock()->setFormFieldName('order_ids');
|
| 110 |
$this->getMassactionBlock()->setUseSelectAll(false);
|
| 111 |
'label'=> Mage::helper('sales')->__('Delete'),
|
| 112 |
'url' => $this->getUrl('deleteorders/adminhtml_order/massdelete'),
|
| 113 |
));
|
| 114 |
|
| 115 |
$this->getMassactionBlock()->addItem('cancel_order', array(
|
| 116 |
'label'=> Mage::helper('sales')->__('Cancel'),
|
| 117 |
'url' => $this->getUrl('*/sales_order/massCancel'),
|
| 118 |
));
|
| 119 |
}
|
| 120 |
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/hold')) {
|
| 121 |
$this->getMassactionBlock()->addItem('hold_order', array(
|
| 122 |
'label'=> Mage::helper('sales')->__('Hold'),
|
| 123 |
'url' => $this->getUrl('*/sales_order/massHold'),
|
| 124 |
));
|
| 125 |
}
|
| 126 |
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/unhold')) {
|
| 127 |
$this->getMassactionBlock()->addItem('unhold_order', array(
|
| 128 |
'label'=> Mage::helper('sales')->__('Unhold'),
|
| 129 |
'url' => $this->getUrl('*/sales_order/massUnhold'),
|
| 130 |
));
|
| 131 |
}
|
| 132 |
$this->getMassactionBlock()->addItem('pdfinvoices_order', array(
|
| 133 |
'label'=> Mage::helper('sales')->__('Print Invoices'),
|
| 134 |
'url' => $this->getUrl('*/sales_order/pdfinvoices'),
|
| 135 |
));
|
| 136 |
$this->getMassactionBlock()->addItem('pdfshipments_order', array(
|
| 137 |
'label'=> Mage::helper('sales')->__('Print Packingslips'),
|
| 138 |
'url' => $this->getUrl('*/sales_order/pdfshipments'),
|
| 139 |
));
|
| 140 |
$this->getMassactionBlock()->addItem('pdfcreditmemos_order', array(
|
| 141 |
'label'=> Mage::helper('sales')->__('Print Credit Memos'),
|
| 142 |
'url' => $this->getUrl('*/sales_order/pdfcreditmemos'),
|
| 143 |
));
|
| 144 |
$this->getMassactionBlock()->addItem('pdfdocs_order', array(
|
| 145 |
'label'=> Mage::helper('sales')->__('Print All'),
|
| 146 |
'url' => $this->getUrl('*/sales_order/pdfdocs'),
|
| 147 |
));
|
| 148 |
return $this;
|
| 149 |
}
|
| 150 |
public function getRowUrl($row)
|
| 151 |
{
|
| 152 |
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
|
| 153 |
return $this->getUrl('*/sales_order/view', array('order_id' => $row->getId()));
|
| 154 |
}
|
| 155 |
return false;
|
| 156 |
}
|
| 157 |
public function getGridUrl()
|
| 158 |
{
|
| 159 |
return $this->getUrl('*/*/grid', array('_current'=>true));
|
| 160 |
}
|
app/code/local/Wyomind/Deleteorders/Helper/Data.php
DELETED
|
@@ -1,6 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class Wyomind_Deleteorders_Helper_Data extends Mage_Core_Helper_Abstract
|
| 4 |
-
{
|
| 5 |
-
|
| 6 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Wyomind/Deleteorders/controllers/Adminhtml/OrderController.php
DELETED
|
@@ -1,5 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
{
|
| 3 |
return substr(Mage::getVersion(),0,3);
|
| 4 |
-
protected function _initOrder()
|
| 5 |
-
{
|
| 6 |
$id = $this->getRequest()->getParam('order_id');
|
| 7 |
$order = Mage::getModel('sales/order')->load($id);
|
| 8 |
if (!$order->getId()) {
|
| 9 |
$this->_getSession()->addError($this->__('This order no longer exists.'));
|
| 10 |
$this->_redirect('adminhtml/sales_order/');
|
| 11 |
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
|
| 12 |
return false;
|
| 13 |
}
|
| 14 |
Mage::register('sales_order', $order);
|
| 15 |
Mage::register('current_order', $order);
|
| 16 |
return $order;
|
| 17 |
}
|
| 18 |
{
|
| 19 |
$orderIds = $this->getRequest()->getPost('order_ids', array());
|
| 20 |
$countDeleteOrder = 0;
|
| 21 |
foreach ($orderIds as $orderId) {
|
| 22 |
if ( $this->getVersion()<=1.3 && Mage::getModel('deleteorders/erase')->_erase($orderId)) $countDeleteOrder++;
|
| 23 |
elseif($order->delete()) $countDeleteOrder++;
|
| 24 |
}
|
| 25 |
if ($countDeleteOrder>0) {
|
| 26 |
$this->_getSession()->addSuccess($this->__('%s order(s) successfully deleted', $countDeleteOrder));
|
| 27 |
}
|
| 28 |
else {
|
| 29 |
}
|
| 30 |
$this->_redirect('adminhtml/sales_order/');
|
| 31 |
}
|
| 32 |
-
if ($order = $this->_initOrder()) {
|
| 33 |
try {
|
| 34 |
|
| 35 |
if ( $this->getVersion()<=1.3) Mage::getModel('deleteorders/erase')->_erase($order->getId());
|
| 36 |
$this->__('Order was successfully deleted.')
|
| 37 |
);
|
| 38 |
}
|
| 39 |
catch (Mage_Core_Exception $e) {
|
| 40 |
$this->_getSession()->addError($e->getMessage());
|
| 41 |
}
|
| 42 |
catch (Exception $e) {
|
| 43 |
$this->_getSession()->addError($this->__('Unable to delete order.'));
|
| 44 |
}
|
| 45 |
$this->_redirect('adminhtml/sales_order/');
|
| 46 |
}
|
|
|
|
|
|
|
| 0 |
return substr(Mage::getVersion(),0,3);
|
|
|
|
|
|
|
| 1 |
$id = $this->getRequest()->getParam('order_id');
|
| 2 |
$order = Mage::getModel('sales/order')->load($id);
|
| 3 |
if (!$order->getId()) {
|
| 4 |
$this->_getSession()->addError($this->__('This order no longer exists.'));
|
| 5 |
$this->_redirect('adminhtml/sales_order/');
|
| 6 |
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
|
| 7 |
return false;
|
| 8 |
}
|
| 9 |
Mage::register('sales_order', $order);
|
| 10 |
Mage::register('current_order', $order);
|
| 11 |
return $order;
|
| 12 |
}
|
| 13 |
{
|
| 14 |
$orderIds = $this->getRequest()->getPost('order_ids', array());
|
| 15 |
$countDeleteOrder = 0;
|
| 16 |
foreach ($orderIds as $orderId) {
|
| 17 |
if ( $this->getVersion()<=1.3 && Mage::getModel('deleteorders/erase')->_erase($orderId)) $countDeleteOrder++;
|
| 18 |
elseif($order->delete()) $countDeleteOrder++;
|
| 19 |
}
|
| 20 |
if ($countDeleteOrder>0) {
|
| 21 |
$this->_getSession()->addSuccess($this->__('%s order(s) successfully deleted', $countDeleteOrder));
|
| 22 |
}
|
| 23 |
else {
|
| 24 |
}
|
| 25 |
$this->_redirect('adminhtml/sales_order/');
|
| 26 |
}
|
|
|
|
| 27 |
try {
|
| 28 |
|
| 29 |
if ( $this->getVersion()<=1.3) Mage::getModel('deleteorders/erase')->_erase($order->getId());
|
| 30 |
$this->__('Order was successfully deleted.')
|
| 31 |
);
|
| 32 |
}
|
| 33 |
catch (Mage_Core_Exception $e) {
|
| 34 |
$this->_getSession()->addError($e->getMessage());
|
| 35 |
}
|
| 36 |
catch (Exception $e) {
|
| 37 |
$this->_getSession()->addError($this->__('Unable to delete order.'));
|
| 38 |
}
|
| 39 |
$this->_redirect('adminhtml/sales_order/');
|
| 40 |
}
|
app/code/local/Wyomind/Deleteorders/etc/config.xml
DELETED
|
@@ -1,113 +0,0 @@
|
|
| 1 |
-
<?xml version="1.0"?>
|
| 2 |
-
<!--
|
| 3 |
-
/**
|
| 4 |
-
* @category Wyomind
|
| 5 |
-
* @package Wyomind_DeleteOrders
|
| 6 |
-
* @author ModuleCreator
|
| 7 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 8 |
-
*/
|
| 9 |
-
-->
|
| 10 |
-
<config>
|
| 11 |
-
<modules>
|
| 12 |
-
<Wyomind_Deleteorders>
|
| 13 |
-
<version>1.1.0</version>
|
| 14 |
-
</Wyomind_Deleteorders>
|
| 15 |
-
</modules>
|
| 16 |
-
<admin>
|
| 17 |
-
<routers>
|
| 18 |
-
<deleteorders>
|
| 19 |
-
<use>admin</use>
|
| 20 |
-
<args>
|
| 21 |
-
<module>Wyomind_Deleteorders</module>
|
| 22 |
-
<frontName>deleteorders</frontName>
|
| 23 |
-
</args>
|
| 24 |
-
</deleteorders>
|
| 25 |
-
</routers>
|
| 26 |
-
</admin>
|
| 27 |
-
<adminhtml>
|
| 28 |
-
|
| 29 |
-
<acl>
|
| 30 |
-
<resources>
|
| 31 |
-
<all>
|
| 32 |
-
<title>Allow Everything</title>
|
| 33 |
-
</all>
|
| 34 |
-
<admin>
|
| 35 |
-
<children>
|
| 36 |
-
<sales>
|
| 37 |
-
<children>
|
| 38 |
-
<order>
|
| 39 |
-
<children>
|
| 40 |
-
<actions>
|
| 41 |
-
<children>
|
| 42 |
-
<delete translate="title">
|
| 43 |
-
<title>Delete (Orders Eraser)</title>
|
| 44 |
-
</delete>
|
| 45 |
-
</children>
|
| 46 |
-
</actions>
|
| 47 |
-
</children>
|
| 48 |
-
</order>
|
| 49 |
-
</children>
|
| 50 |
-
</sales>
|
| 51 |
-
</children>
|
| 52 |
-
</admin>
|
| 53 |
-
</resources>
|
| 54 |
-
</acl>
|
| 55 |
-
</adminhtml>
|
| 56 |
-
<global>
|
| 57 |
-
<models>
|
| 58 |
-
<deleteorders>
|
| 59 |
-
<class>Wyomind_Deleteorders_Model</class>
|
| 60 |
-
<resourceModel>deleteorders_mysql4</resourceModel>
|
| 61 |
-
</deleteorders>
|
| 62 |
-
<deleteorders_mysql4>
|
| 63 |
-
<class>Wyomind_Deleteorders_Model_Mysql4</class>
|
| 64 |
-
<entities>
|
| 65 |
-
<deleteorders>
|
| 66 |
-
<table>deleteorders</table>
|
| 67 |
-
</deleteorders>
|
| 68 |
-
</entities>
|
| 69 |
-
</deleteorders_mysql4>
|
| 70 |
-
</models>
|
| 71 |
-
<deleteorders_setup>
|
| 72 |
-
<setup>
|
| 73 |
-
<module>Wyomind_Deleteorders</module>
|
| 74 |
-
</setup>
|
| 75 |
-
<connection>
|
| 76 |
-
<use>core_setup</use>
|
| 77 |
-
</connection>
|
| 78 |
-
</deleteorders_setup>
|
| 79 |
-
<deleteorders_write>
|
| 80 |
-
<connection>
|
| 81 |
-
<use>core_write</use>
|
| 82 |
-
</connection>
|
| 83 |
-
</deleteorders_write>
|
| 84 |
-
<deleteorders_read>
|
| 85 |
-
<connection>
|
| 86 |
-
<use>core_read</use>
|
| 87 |
-
</connection>
|
| 88 |
-
</deleteorders_read>
|
| 89 |
-
</resources>
|
| 90 |
-
<blocks>
|
| 91 |
-
<adminhtml>
|
| 92 |
-
<rewrite>
|
| 93 |
-
<sales_order_grid>Wyomind_Deleteorders_Block_Grid</sales_order_grid>
|
| 94 |
-
</rewrite>
|
| 95 |
-
</adminhtml>
|
| 96 |
-
</blocks>
|
| 97 |
-
<helpers>
|
| 98 |
-
<deleteorders>
|
| 99 |
-
<class>Wyomind_Deleteorders_Helper</class>
|
| 100 |
-
</deleteorders>
|
| 101 |
-
</helpers>
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
</global>
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
</config>
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Wyomind/Orderseraser/Block/Enhancedgrid/Grid.php
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
| 0 |
public function __construct()
|
| 1 |
{
|
| 2 |
parent::__construct();
|
| 3 |
$this->setId('sales_order_grid');
|
| 4 |
$this->setUseAjax(true);
|
| 5 |
$this->setDefaultSort('created_at');
|
| 6 |
$this->setDefaultDir('DESC');
|
| 7 |
$this->setSaveParametersInSession(true);
|
| 8 |
}
|
| 9 |
/**
|
| 10 |
* Retrieve collection class
|
| 11 |
*
|
| 12 |
* @return string
|
| 13 |
*/
|
| 14 |
public function getVersion(){
|
| 15 |
return substr(Mage::getVersion(),0,3);
|
| 16 |
}
|
| 17 |
|
| 18 |
{
|
| 19 |
|
| 20 |
}
|
| 21 |
{
|
| 22 |
return 'sales/order_grid_collection';
|
| 23 |
}
|
| 24 |
|
| 25 |
{
|
| 26 |
$this->addColumn('real_order_id', array(
|
| 27 |
'header'=> Mage::helper('sales')->__('Order #'),
|
| 28 |
'width' => '80px',
|
| 29 |
'type' => 'text',
|
| 30 |
'index' => 'increment_id',
|
| 31 |
));
|
| 32 |
if (!Mage::app()->isSingleStoreMode()) {
|
| 33 |
$this->addColumn('store_id', array(
|
| 34 |
'header' => Mage::helper('sales')->__('Purchased From (Store)'),
|
| 35 |
'index' => 'store_id',
|
| 36 |
'type' => 'store',
|
| 37 |
'store_view'=> true,
|
| 38 |
'display_deleted' => true,
|
| 39 |
));
|
| 40 |
}
|
| 41 |
$this->addColumn('created_at', array(
|
| 42 |
'header' => Mage::helper('sales')->__('Purchased On'),
|
| 43 |
'index' => 'created_at',
|
| 44 |
'type' => 'datetime',
|
| 45 |
'width' => '100px',
|
| 46 |
));
|
| 47 |
$this->addColumn('billing_name', array(
|
| 48 |
'header' => Mage::helper('sales')->__('Bill to Name'),
|
| 49 |
'index' => 'billing_name',
|
| 50 |
));
|
| 51 |
$this->addColumn('shipping_name', array(
|
| 52 |
'header' => Mage::helper('sales')->__('Ship to Name'),
|
| 53 |
'index' => 'shipping_name',
|
| 54 |
));
|
| 55 |
$this->addColumn('base_grand_total', array(
|
| 56 |
'header' => Mage::helper('sales')->__('G.T. (Base)'),
|
| 57 |
'index' => 'base_grand_total',
|
| 58 |
'type' => 'currency',
|
| 59 |
'currency' => 'base_currency_code',
|
| 60 |
));
|
| 61 |
$this->addColumn('grand_total', array(
|
| 62 |
'header' => Mage::helper('sales')->__('G.T. (Purchased)'),
|
| 63 |
'index' => 'grand_total',
|
| 64 |
'type' => 'currency',
|
| 65 |
'currency' => 'order_currency_code',
|
| 66 |
));
|
| 67 |
$this->addColumn('status', array(
|
| 68 |
'header' => Mage::helper('sales')->__('Status'),
|
| 69 |
'index' => 'status',
|
| 70 |
'type' => 'options',
|
| 71 |
'width' => '70px',
|
| 72 |
'options' => Mage::getSingleton('sales/order_config')->getStatuses(),
|
| 73 |
));
|
| 74 |
$actions[]= array(
|
| 75 |
'caption' => Mage::helper('sales')->__('View'),
|
| 76 |
'url' => array('base'=>'*/sales_order/view'),
|
| 77 |
'field' => 'order_id'
|
| 78 |
);
|
| 79 |
|
| 80 |
}
|
| 81 |
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/delete')) {
|
| 82 |
$actions[]= array(
|
| 83 |
'caption' => Mage::helper('sales')->__('Delete'),
|
| 84 |
'url' => array('base'=>'orderseraser/adminhtml_orderseraser/delete'),
|
| 85 |
'confirm' => Mage::helper('sales')->__('Are your sure your want to delete this order and to erase all linked data ? '),
|
| 86 |
'field' => 'order_id'
|
| 87 |
);
|
| 88 |
}
|
| 89 |
|
| 90 |
|
| 91 |
$this->addColumn('action',
|
| 92 |
array(
|
| 93 |
'header' => Mage::helper('sales')->__('Action'),
|
| 94 |
'width' => '50px',
|
| 95 |
'type' => 'action',
|
| 96 |
'getter' => 'getId',
|
| 97 |
'actions' => $actions,
|
| 98 |
'filter' => false,
|
| 99 |
'sortable' => false,
|
| 100 |
'index' => 'stores',
|
| 101 |
'is_system' => true,
|
| 102 |
));
|
| 103 |
|
| 104 |
$this->addRssList('rss/order/new', Mage::helper('sales')->__('New Order RSS'));
|
| 105 |
if($this->getVersion()>1.3){
|
| 106 |
$this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
|
| 107 |
$this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));
|
| 108 |
}
|
| 109 |
return parent::_prepareColumns();
|
| 110 |
}
|
| 111 |
protected function _prepareMassaction()
|
| 112 |
{
|
| 113 |
$this->setMassactionIdField('entity_id');
|
| 114 |
$this->getMassactionBlock()->setFormFieldName('order_ids');
|
| 115 |
$this->getMassactionBlock()->setUseSelectAll(false);
|
| 116 |
|
| 117 |
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/delete')) {
|
| 118 |
}
|
| 119 |
|
| 120 |
$this->getMassactionBlock()->addItem('cancel_order', array(
|
| 121 |
'label'=> Mage::helper('sales')->__('Cancel'),
|
| 122 |
'url' => $this->getUrl('*/sales_order/massCancel'),
|
| 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 |
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/unhold')) {
|
| 132 |
$this->getMassactionBlock()->addItem('unhold_order', array(
|
| 133 |
'label'=> Mage::helper('sales')->__('Unhold'),
|
| 134 |
'url' => $this->getUrl('*/sales_order/massUnhold'),
|
| 135 |
));
|
| 136 |
}
|
| 137 |
$this->getMassactionBlock()->addItem('pdfinvoices_order', array(
|
| 138 |
'label'=> Mage::helper('sales')->__('Print Invoices'),
|
| 139 |
'url' => $this->getUrl('*/sales_order/pdfinvoices'),
|
| 140 |
));
|
| 141 |
$this->getMassactionBlock()->addItem('pdfshipments_order', array(
|
| 142 |
'label'=> Mage::helper('sales')->__('Print Packingslips'),
|
| 143 |
'url' => $this->getUrl('*/sales_order/pdfshipments'),
|
| 144 |
));
|
| 145 |
$this->getMassactionBlock()->addItem('pdfcreditmemos_order', array(
|
| 146 |
'label'=> Mage::helper('sales')->__('Print Credit Memos'),
|
| 147 |
'url' => $this->getUrl('*/sales_order/pdfcreditmemos'),
|
| 148 |
));
|
| 149 |
$this->getMassactionBlock()->addItem('pdfdocs_order', array(
|
| 150 |
'label'=> Mage::helper('sales')->__('Print All'),
|
| 151 |
'url' => $this->getUrl('*/sales_order/pdfdocs'),
|
| 152 |
));
|
| 153 |
return $this;
|
| 154 |
}
|
| 155 |
public function getRowUrl($row)
|
| 156 |
{
|
| 157 |
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
|
| 158 |
return $this->getUrl('*/sales_order/view', array('order_id' => $row->getId()));
|
| 159 |
}
|
| 160 |
return false;
|
| 161 |
}
|
| 162 |
public function getGridUrl()
|
| 163 |
{
|
| 164 |
return $this->getUrl('*/*/grid', array('_current'=>true));
|
| 165 |
}
|
| 1 |
+
<?php
|
| 2 |
public function __construct()
|
| 3 |
{
|
| 4 |
parent::__construct();
|
| 5 |
$this->setId('sales_order_grid');
|
| 6 |
$this->setUseAjax(true);
|
| 7 |
$this->setDefaultSort('created_at');
|
| 8 |
$this->setDefaultDir('DESC');
|
| 9 |
$this->setSaveParametersInSession(true);
|
| 10 |
}
|
| 11 |
/**
|
| 12 |
* Retrieve collection class
|
| 13 |
*
|
| 14 |
* @return string
|
| 15 |
*/
|
| 16 |
public function getVersion(){
|
| 17 |
return substr(Mage::getVersion(),0,3);
|
| 18 |
}
|
| 19 |
|
| 20 |
{
|
| 21 |
|
| 22 |
}
|
| 23 |
{
|
| 24 |
return 'sales/order_grid_collection';
|
| 25 |
}
|
| 26 |
|
| 27 |
{
|
| 28 |
$this->addColumn('real_order_id', array(
|
| 29 |
'header'=> Mage::helper('sales')->__('Order #'),
|
| 30 |
'width' => '80px',
|
| 31 |
'type' => 'text',
|
| 32 |
'index' => 'increment_id',
|
| 33 |
));
|
| 34 |
if (!Mage::app()->isSingleStoreMode()) {
|
| 35 |
$this->addColumn('store_id', array(
|
| 36 |
'header' => Mage::helper('sales')->__('Purchased From (Store)'),
|
| 37 |
'index' => 'store_id',
|
| 38 |
'type' => 'store',
|
| 39 |
'store_view'=> true,
|
| 40 |
'display_deleted' => true,
|
| 41 |
));
|
| 42 |
}
|
| 43 |
$this->addColumn('created_at', array(
|
| 44 |
'header' => Mage::helper('sales')->__('Purchased On'),
|
| 45 |
'index' => 'created_at',
|
| 46 |
'type' => 'datetime',
|
| 47 |
'width' => '100px',
|
| 48 |
));
|
| 49 |
$this->addColumn('billing_name', array(
|
| 50 |
'header' => Mage::helper('sales')->__('Bill to Name'),
|
| 51 |
'index' => 'billing_name',
|
| 52 |
));
|
| 53 |
$this->addColumn('shipping_name', array(
|
| 54 |
'header' => Mage::helper('sales')->__('Ship to Name'),
|
| 55 |
'index' => 'shipping_name',
|
| 56 |
));
|
| 57 |
$this->addColumn('base_grand_total', array(
|
| 58 |
'header' => Mage::helper('sales')->__('G.T. (Base)'),
|
| 59 |
'index' => 'base_grand_total',
|
| 60 |
'type' => 'currency',
|
| 61 |
'currency' => 'base_currency_code',
|
| 62 |
));
|
| 63 |
$this->addColumn('grand_total', array(
|
| 64 |
'header' => Mage::helper('sales')->__('G.T. (Purchased)'),
|
| 65 |
'index' => 'grand_total',
|
| 66 |
'type' => 'currency',
|
| 67 |
'currency' => 'order_currency_code',
|
| 68 |
));
|
| 69 |
$this->addColumn('status', array(
|
| 70 |
'header' => Mage::helper('sales')->__('Status'),
|
| 71 |
'index' => 'status',
|
| 72 |
'type' => 'options',
|
| 73 |
'width' => '70px',
|
| 74 |
'options' => Mage::getSingleton('sales/order_config')->getStatuses(),
|
| 75 |
));
|
| 76 |
$actions[]= array(
|
| 77 |
'caption' => Mage::helper('sales')->__('View'),
|
| 78 |
'url' => array('base'=>'*/sales_order/view'),
|
| 79 |
'field' => 'order_id'
|
| 80 |
);
|
| 81 |
|
| 82 |
}
|
| 83 |
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/delete')) {
|
| 84 |
$actions[]= array(
|
| 85 |
'caption' => Mage::helper('sales')->__('Delete'),
|
| 86 |
'url' => array('base'=>'orderseraser/adminhtml_orderseraser/delete'),
|
| 87 |
'confirm' => Mage::helper('sales')->__('Are your sure your want to delete this order and to erase all linked data ? '),
|
| 88 |
'field' => 'order_id'
|
| 89 |
);
|
| 90 |
}
|
| 91 |
|
| 92 |
|
| 93 |
$this->addColumn('action',
|
| 94 |
array(
|
| 95 |
'header' => Mage::helper('sales')->__('Action'),
|
| 96 |
'width' => '50px',
|
| 97 |
'type' => 'action',
|
| 98 |
'getter' => 'getId',
|
| 99 |
'actions' => $actions,
|
| 100 |
'filter' => false,
|
| 101 |
'sortable' => false,
|
| 102 |
'index' => 'stores',
|
| 103 |
'is_system' => true,
|
| 104 |
));
|
| 105 |
|
| 106 |
$this->addRssList('rss/order/new', Mage::helper('sales')->__('New Order RSS'));
|
| 107 |
if($this->getVersion()>1.3){
|
| 108 |
$this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
|
| 109 |
$this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));
|
| 110 |
}
|
| 111 |
return parent::_prepareColumns();
|
| 112 |
}
|
| 113 |
protected function _prepareMassaction()
|
| 114 |
{
|
| 115 |
$this->setMassactionIdField('entity_id');
|
| 116 |
$this->getMassactionBlock()->setFormFieldName('order_ids');
|
| 117 |
$this->getMassactionBlock()->setUseSelectAll(false);
|
| 118 |
|
| 119 |
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/delete')) {
|
| 120 |
}
|
| 121 |
|
| 122 |
$this->getMassactionBlock()->addItem('cancel_order', array(
|
| 123 |
'label'=> Mage::helper('sales')->__('Cancel'),
|
| 124 |
'url' => $this->getUrl('*/sales_order/massCancel'),
|
| 125 |
));
|
| 126 |
}
|
| 127 |
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/hold')) {
|
| 128 |
$this->getMassactionBlock()->addItem('hold_order', array(
|
| 129 |
'label'=> Mage::helper('sales')->__('Hold'),
|
| 130 |
'url' => $this->getUrl('*/sales_order/massHold'),
|
| 131 |
));
|
| 132 |
}
|
| 133 |
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/unhold')) {
|
| 134 |
$this->getMassactionBlock()->addItem('unhold_order', array(
|
| 135 |
'label'=> Mage::helper('sales')->__('Unhold'),
|
| 136 |
'url' => $this->getUrl('*/sales_order/massUnhold'),
|
| 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 |
$this->getMassactionBlock()->addItem('pdfshipments_order', array(
|
| 144 |
'label'=> Mage::helper('sales')->__('Print Packingslips'),
|
| 145 |
'url' => $this->getUrl('*/sales_order/pdfshipments'),
|
| 146 |
));
|
| 147 |
$this->getMassactionBlock()->addItem('pdfcreditmemos_order', array(
|
| 148 |
'label'=> Mage::helper('sales')->__('Print Credit Memos'),
|
| 149 |
'url' => $this->getUrl('*/sales_order/pdfcreditmemos'),
|
| 150 |
));
|
| 151 |
$this->getMassactionBlock()->addItem('pdfdocs_order', array(
|
| 152 |
'label'=> Mage::helper('sales')->__('Print All'),
|
| 153 |
'url' => $this->getUrl('*/sales_order/pdfdocs'),
|
| 154 |
));
|
| 155 |
return $this;
|
| 156 |
}
|
| 157 |
public function getRowUrl($row)
|
| 158 |
{
|
| 159 |
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
|
| 160 |
return $this->getUrl('*/sales_order/view', array('order_id' => $row->getId()));
|
| 161 |
}
|
| 162 |
return false;
|
| 163 |
}
|
| 164 |
public function getGridUrl()
|
| 165 |
{
|
| 166 |
return $this->getUrl('*/*/grid', array('_current'=>true));
|
| 167 |
}
|
app/code/local/Wyomind/Orderseraser/Block/Erasergrid/Grid.php
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
| 0 |
public function __construct()
|
| 1 |
{
|
| 2 |
|
| 3 |
parent::__construct();
|
| 4 |
$this->setId('sales_order_grid');
|
| 5 |
$this->setUseAjax(true);
|
| 6 |
$this->setDefaultSort('created_at');
|
| 7 |
$this->setDefaultDir('DESC');
|
| 8 |
$this->setSaveParametersInSession(true);
|
| 9 |
}
|
| 10 |
/**
|
| 11 |
* Retrieve collection class
|
| 12 |
*
|
| 13 |
* @return string
|
| 14 |
*/
|
| 15 |
public function getVersion(){
|
| 16 |
return substr(Mage::getVersion(),0,3);
|
| 17 |
}
|
| 18 |
|
| 19 |
{
|
| 20 |
|
| 21 |
}
|
| 22 |
{
|
| 23 |
return 'sales/order_grid_collection';
|
| 24 |
}
|
| 25 |
|
| 26 |
{
|
| 27 |
$this->addColumn('real_order_id', array(
|
| 28 |
'header'=> Mage::helper('sales')->__('Order #'),
|
| 29 |
'width' => '80px',
|
| 30 |
'type' => 'text',
|
| 31 |
'index' => 'increment_id',
|
| 32 |
));
|
| 33 |
if (!Mage::app()->isSingleStoreMode()) {
|
| 34 |
$this->addColumn('store_id', array(
|
| 35 |
'header' => Mage::helper('sales')->__('Purchased From (Store)'),
|
| 36 |
'index' => 'store_id',
|
| 37 |
'type' => 'store',
|
| 38 |
'store_view'=> true,
|
| 39 |
'display_deleted' => true,
|
| 40 |
));
|
| 41 |
}
|
| 42 |
$this->addColumn('created_at', array(
|
| 43 |
'header' => Mage::helper('sales')->__('Purchased On'),
|
| 44 |
'index' => 'created_at',
|
| 45 |
'type' => 'datetime',
|
| 46 |
'width' => '100px',
|
| 47 |
));
|
| 48 |
$this->addColumn('billing_name', array(
|
| 49 |
'header' => Mage::helper('sales')->__('Bill to Name'),
|
| 50 |
'index' => 'billing_name',
|
| 51 |
));
|
| 52 |
$this->addColumn('shipping_name', array(
|
| 53 |
'header' => Mage::helper('sales')->__('Ship to Name'),
|
| 54 |
'index' => 'shipping_name',
|
| 55 |
));
|
| 56 |
$this->addColumn('base_grand_total', array(
|
| 57 |
'header' => Mage::helper('sales')->__('G.T. (Base)'),
|
| 58 |
'index' => 'base_grand_total',
|
| 59 |
'type' => 'currency',
|
| 60 |
'currency' => 'base_currency_code',
|
| 61 |
));
|
| 62 |
$this->addColumn('grand_total', array(
|
| 63 |
'header' => Mage::helper('sales')->__('G.T. (Purchased)'),
|
| 64 |
'index' => 'grand_total',
|
| 65 |
'type' => 'currency',
|
| 66 |
'currency' => 'order_currency_code',
|
| 67 |
));
|
| 68 |
$this->addColumn('status', array(
|
| 69 |
'header' => Mage::helper('sales')->__('Status'),
|
| 70 |
'index' => 'status',
|
| 71 |
'type' => 'options',
|
| 72 |
'width' => '70px',
|
| 73 |
'options' => Mage::getSingleton('sales/order_config')->getStatuses(),
|
| 74 |
));
|
| 75 |
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/delete')) {
|
| 76 |
$this->addColumn('action',
|
| 77 |
array(
|
| 78 |
'header' => Mage::helper('sales')->__('Action'),
|
| 79 |
'width' => '50px',
|
| 80 |
'type' => 'action',
|
| 81 |
'getter' => 'getId',
|
| 82 |
'actions' => array(
|
| 83 |
|
| 84 |
'caption' => Mage::helper('sales')->__('Delete'),
|
| 85 |
'url' => array('base'=>'orderseraser/adminhtml_orderseraser/delete/eraser/1'),
|
| 86 |
'field' => 'order_id'
|
| 87 |
)
|
| 88 |
),
|
| 89 |
'filter' => false,
|
| 90 |
'sortable' => false,
|
| 91 |
'index' => 'stores',
|
| 92 |
'is_system' => true,
|
| 93 |
));
|
| 94 |
}
|
| 95 |
|
| 96 |
return parent::_prepareColumns();
|
| 97 |
}
|
| 98 |
protected function _prepareMassaction()
|
| 99 |
{
|
| 100 |
$this->setMassactionIdField('entity_id');
|
| 101 |
$this->getMassactionBlock()->setFormFieldName('order_ids');
|
| 102 |
|
| 103 |
$this->getMassactionBlock()->setUseSelectAll(false);
|
| 104 |
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/delete')) {
|
| 105 |
|
| 106 |
}
|
| 107 |
return $this;
|
| 108 |
}
|
| 109 |
|
| 1 |
+
<?php
|
| 2 |
public function __construct()
|
| 3 |
{
|
| 4 |
|
| 5 |
parent::__construct();
|
| 6 |
$this->setId('sales_order_grid');
|
| 7 |
$this->setUseAjax(true);
|
| 8 |
$this->setDefaultSort('created_at');
|
| 9 |
$this->setDefaultDir('DESC');
|
| 10 |
$this->setSaveParametersInSession(true);
|
| 11 |
}
|
| 12 |
/**
|
| 13 |
* Retrieve collection class
|
| 14 |
*
|
| 15 |
* @return string
|
| 16 |
*/
|
| 17 |
public function getVersion(){
|
| 18 |
return substr(Mage::getVersion(),0,3);
|
| 19 |
}
|
| 20 |
|
| 21 |
{
|
| 22 |
|
| 23 |
}
|
| 24 |
{
|
| 25 |
return 'sales/order_grid_collection';
|
| 26 |
}
|
| 27 |
|
| 28 |
{
|
| 29 |
$this->addColumn('real_order_id', array(
|
| 30 |
'header'=> Mage::helper('sales')->__('Order #'),
|
| 31 |
'width' => '80px',
|
| 32 |
'type' => 'text',
|
| 33 |
'index' => 'increment_id',
|
| 34 |
));
|
| 35 |
if (!Mage::app()->isSingleStoreMode()) {
|
| 36 |
$this->addColumn('store_id', array(
|
| 37 |
'header' => Mage::helper('sales')->__('Purchased From (Store)'),
|
| 38 |
'index' => 'store_id',
|
| 39 |
'type' => 'store',
|
| 40 |
'store_view'=> true,
|
| 41 |
'display_deleted' => true,
|
| 42 |
));
|
| 43 |
}
|
| 44 |
$this->addColumn('created_at', array(
|
| 45 |
'header' => Mage::helper('sales')->__('Purchased On'),
|
| 46 |
'index' => 'created_at',
|
| 47 |
'type' => 'datetime',
|
| 48 |
'width' => '100px',
|
| 49 |
));
|
| 50 |
$this->addColumn('billing_name', array(
|
| 51 |
'header' => Mage::helper('sales')->__('Bill to Name'),
|
| 52 |
'index' => 'billing_name',
|
| 53 |
));
|
| 54 |
$this->addColumn('shipping_name', array(
|
| 55 |
'header' => Mage::helper('sales')->__('Ship to Name'),
|
| 56 |
'index' => 'shipping_name',
|
| 57 |
));
|
| 58 |
$this->addColumn('base_grand_total', array(
|
| 59 |
'header' => Mage::helper('sales')->__('G.T. (Base)'),
|
| 60 |
'index' => 'base_grand_total',
|
| 61 |
'type' => 'currency',
|
| 62 |
'currency' => 'base_currency_code',
|
| 63 |
));
|
| 64 |
$this->addColumn('grand_total', array(
|
| 65 |
'header' => Mage::helper('sales')->__('G.T. (Purchased)'),
|
| 66 |
'index' => 'grand_total',
|
| 67 |
'type' => 'currency',
|
| 68 |
'currency' => 'order_currency_code',
|
| 69 |
));
|
| 70 |
$this->addColumn('status', array(
|
| 71 |
'header' => Mage::helper('sales')->__('Status'),
|
| 72 |
'index' => 'status',
|
| 73 |
'type' => 'options',
|
| 74 |
'width' => '70px',
|
| 75 |
'options' => Mage::getSingleton('sales/order_config')->getStatuses(),
|
| 76 |
));
|
| 77 |
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/delete')) {
|
| 78 |
$this->addColumn('action',
|
| 79 |
array(
|
| 80 |
'header' => Mage::helper('sales')->__('Action'),
|
| 81 |
'width' => '50px',
|
| 82 |
'type' => 'action',
|
| 83 |
'getter' => 'getId',
|
| 84 |
'actions' => array(
|
| 85 |
|
| 86 |
'caption' => Mage::helper('sales')->__('Delete'),
|
| 87 |
'url' => array('base'=>'orderseraser/adminhtml_orderseraser/delete/eraser/1'),
|
| 88 |
'field' => 'order_id'
|
| 89 |
)
|
| 90 |
),
|
| 91 |
'filter' => false,
|
| 92 |
'sortable' => false,
|
| 93 |
'index' => 'stores',
|
| 94 |
'is_system' => true,
|
| 95 |
));
|
| 96 |
}
|
| 97 |
|
| 98 |
return parent::_prepareColumns();
|
| 99 |
}
|
| 100 |
protected function _prepareMassaction()
|
| 101 |
{
|
| 102 |
$this->setMassactionIdField('entity_id');
|
| 103 |
$this->getMassactionBlock()->setFormFieldName('order_ids');
|
| 104 |
|
| 105 |
$this->getMassactionBlock()->setUseSelectAll(false);
|
| 106 |
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/delete')) {
|
| 107 |
|
| 108 |
}
|
| 109 |
return $this;
|
| 110 |
}
|
| 111 |
|
app/code/local/Wyomind/Orderseraser/Block/Orderseraser.php
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
class Wyomind_Orderseraser_Block_Orderseraser extends Mage_Adminhtml_Block_Widget_Grid_Container
|
| 4 |
+
{
|
| 5 |
+
|
| 6 |
+
public function __construct()
|
| 7 |
+
{
|
| 8 |
+
|
| 9 |
+
//on indique ou va se trouver le controller
|
| 10 |
+
$this->_controller = 'erasergrid';
|
| 11 |
+
$this->_blockGroup = 'orderseraser';
|
| 12 |
+
|
| 13 |
+
//le texte du header qui s�affichera dans l�admin
|
| 14 |
+
$this->_headerText = "<strike style='color:white;'><span style='color:#EB5E00;'>".$this->__('Orders Eraser')."</span></strike>";
|
| 15 |
+
//le nom du bouton pour ajouter une un contact
|
| 16 |
+
parent::__construct();
|
| 17 |
+
$this->removeButton('add');
|
| 18 |
+
}
|
| 19 |
+
}
|
app/code/local/Wyomind/Orderseraser/Helper/Data.php
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
class Wyomind_Orderseraser_Helper_Data extends Mage_Core_Helper_Abstract
|
| 4 |
+
{
|
| 5 |
+
|
| 6 |
+
}
|
app/code/local/Wyomind/{Deleteorders/Model/Erase.php → Orderseraser/Model/Orderseraser.php}
RENAMED
|
@@ -1,10 +1,8 @@
|
|
| 1 |
<?php
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
class Wyomind_DeleteOrders_Model_Erase extends Varien_Object{
|
| 5 |
|
| 6 |
-
public function _erase($orderId){
|
| 7 |
-
$resource = Mage::getSingleton('core/resource');
|
| 8 |
$sql="DELETE FROM ".$tableSoe." WHERE parent_id = ".$orderId.";";
|
| 9 |
$delete->query($sql);
|
| 10 |
$sql="DELETE s FROM ".$tableSoe." s
|
| 1 |
<?php
|
| 2 |
+
class Wyomind_Orderseraser_Model_Orderseraser extends Varien_Object{
|
|
|
|
|
|
|
| 3 |
|
| 4 |
+
public function _erase($orderId){
|
| 5 |
+
$resource = Mage::getSingleton('core/resource');
|
| 6 |
$sql="DELETE FROM ".$tableSoe." WHERE parent_id = ".$orderId.";";
|
| 7 |
$delete->query($sql);
|
| 8 |
$sql="DELETE s FROM ".$tableSoe." s
|
app/code/local/Wyomind/Orderseraser/controllers/Adminhtml/OrderseraserController.php
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
| 0 |
->_addBreadcrumb($this->__('Sales'), $this->__('Sales'))
|
| 1 |
->_addBreadcrumb($this->__('Orders'), $this->__('Orders'))
|
| 2 |
->renderLayout();
|
| 3 |
return substr(Mage::getVersion(),0,3);
|
|
|
|
|
|
|
| 4 |
$id = $this->getRequest()->getParam('order_id');
|
| 5 |
$order = Mage::getModel('sales/order')->load($id);
|
| 6 |
if (!$order->getId()) {
|
| 7 |
$this->_getSession()->addError($this->__('This order no longer exists.'));
|
| 8 |
if(!$this->getRequest()->getParam('eraser')) $this->_redirect('adminhtml/sales_order/');
|
| 9 |
else $this->_redirect('orderseraser/adminhtml_orderseraser');
|
| 10 |
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
|
| 11 |
return false;
|
| 12 |
}
|
| 13 |
Mage::register('sales_order', $order);
|
| 14 |
Mage::register('current_order', $order);
|
| 15 |
return $order;
|
| 16 |
}
|
| 17 |
{
|
| 18 |
|
| 19 |
$orderIds = $this->getRequest()->getPost('order_ids', array());
|
| 20 |
$countDeleteOrder = 0;
|
| 21 |
foreach ($orderIds as $orderId) {
|
| 22 |
if ( $this->getVersion()<=1.3 && Mage::getModel('orderseraser/orderseraser')->_erase($orderId)) $countDeleteOrder++;
|
| 23 |
elseif($order->delete()) $countDeleteOrder++;
|
| 24 |
}
|
| 25 |
if ($countDeleteOrder>0) {
|
| 26 |
$this->_getSession()->addSuccess($this->__('%s order(s) successfully deleted', $countDeleteOrder));
|
| 27 |
}
|
| 28 |
else {
|
| 29 |
$this->_getSession()->addError($this->__('Unable to delete orders.'));
|
| 30 |
}
|
| 31 |
if(!$this->getRequest()->getParam('eraser')) $this->_redirect('adminhtml/sales_order/');
|
| 32 |
else $this->_redirect('orderseraser/adminhtml_orderseraser');
|
| 33 |
}
|
|
|
|
| 34 |
try {
|
| 35 |
|
| 36 |
if ( $this->getVersion()<=1.3) Mage::getModel('orderseraser/orderseraser')->_erase($order->getId());
|
| 37 |
$this->__('Order was successfully deleted.')
|
| 38 |
);
|
| 39 |
}
|
| 40 |
catch (Mage_Core_Exception $e) {
|
| 41 |
$this->_getSession()->addError($e->getMessage());
|
| 42 |
}
|
| 43 |
catch (Exception $e) {
|
| 44 |
$this->_getSession()->addError($this->__('Unable to delete order.'));
|
| 45 |
}
|
| 46 |
if(!$this->getRequest()->getParam('eraser')) $this->_redirect('adminhtml/sales_order/');
|
| 47 |
else $this->_redirect('orderseraser/adminhtml_orderseraser');
|
| 48 |
}
|
| 1 |
+
<?php
|
| 2 |
+
{
|
| 3 |
->_addBreadcrumb($this->__('Sales'), $this->__('Sales'))
|
| 4 |
->_addBreadcrumb($this->__('Orders'), $this->__('Orders'))
|
| 5 |
->renderLayout();
|
| 6 |
return substr(Mage::getVersion(),0,3);
|
| 7 |
+
protected function _initOrder()
|
| 8 |
+
{
|
| 9 |
$id = $this->getRequest()->getParam('order_id');
|
| 10 |
$order = Mage::getModel('sales/order')->load($id);
|
| 11 |
if (!$order->getId()) {
|
| 12 |
$this->_getSession()->addError($this->__('This order no longer exists.'));
|
| 13 |
if(!$this->getRequest()->getParam('eraser')) $this->_redirect('adminhtml/sales_order/');
|
| 14 |
else $this->_redirect('orderseraser/adminhtml_orderseraser');
|
| 15 |
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
|
| 16 |
return false;
|
| 17 |
}
|
| 18 |
Mage::register('sales_order', $order);
|
| 19 |
Mage::register('current_order', $order);
|
| 20 |
return $order;
|
| 21 |
}
|
| 22 |
{
|
| 23 |
|
| 24 |
$orderIds = $this->getRequest()->getPost('order_ids', array());
|
| 25 |
$countDeleteOrder = 0;
|
| 26 |
foreach ($orderIds as $orderId) {
|
| 27 |
if ( $this->getVersion()<=1.3 && Mage::getModel('orderseraser/orderseraser')->_erase($orderId)) $countDeleteOrder++;
|
| 28 |
elseif($order->delete()) $countDeleteOrder++;
|
| 29 |
}
|
| 30 |
if ($countDeleteOrder>0) {
|
| 31 |
$this->_getSession()->addSuccess($this->__('%s order(s) successfully deleted', $countDeleteOrder));
|
| 32 |
}
|
| 33 |
else {
|
| 34 |
$this->_getSession()->addError($this->__('Unable to delete orders.'));
|
| 35 |
}
|
| 36 |
if(!$this->getRequest()->getParam('eraser')) $this->_redirect('adminhtml/sales_order/');
|
| 37 |
else $this->_redirect('orderseraser/adminhtml_orderseraser');
|
| 38 |
}
|
| 39 |
+
if ($order = $this->_initOrder()) {
|
| 40 |
try {
|
| 41 |
|
| 42 |
if ( $this->getVersion()<=1.3) Mage::getModel('orderseraser/orderseraser')->_erase($order->getId());
|
| 43 |
$this->__('Order was successfully deleted.')
|
| 44 |
);
|
| 45 |
}
|
| 46 |
catch (Mage_Core_Exception $e) {
|
| 47 |
$this->_getSession()->addError($e->getMessage());
|
| 48 |
}
|
| 49 |
catch (Exception $e) {
|
| 50 |
$this->_getSession()->addError($this->__('Unable to delete order.'));
|
| 51 |
}
|
| 52 |
if(!$this->getRequest()->getParam('eraser')) $this->_redirect('adminhtml/sales_order/');
|
| 53 |
else $this->_redirect('orderseraser/adminhtml_orderseraser');
|
| 54 |
}
|
app/code/local/Wyomind/Orderseraser/etc/config.xml
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
|
| 3 |
+
<config>
|
| 4 |
+
<modules>
|
| 5 |
+
<Wyomind_Orderseraser>
|
| 6 |
+
<version>2.0.1</version>
|
| 7 |
+
</Wyomind_Orderseraser>
|
| 8 |
+
</modules>
|
| 9 |
+
<admin>
|
| 10 |
+
<routers>
|
| 11 |
+
<orderseraser>
|
| 12 |
+
<use>admin</use>
|
| 13 |
+
<args>
|
| 14 |
+
<module>Wyomind_Orderseraser</module>
|
| 15 |
+
<frontName>orderseraser</frontName>
|
| 16 |
+
</args>
|
| 17 |
+
</orderseraser>
|
| 18 |
+
</routers>
|
| 19 |
+
</admin>
|
| 20 |
+
<adminhtml>
|
| 21 |
+
<layout>
|
| 22 |
+
<updates>
|
| 23 |
+
<orderseraser>
|
| 24 |
+
<file>orderseraser.xml</file>
|
| 25 |
+
</orderseraser>
|
| 26 |
+
</updates>
|
| 27 |
+
</layout>
|
| 28 |
+
<menu>
|
| 29 |
+
<sales>
|
| 30 |
+
<children>
|
| 31 |
+
<orderseraser translate="title" module="orderseraser">
|
| 32 |
+
<title>Orders eraser ***</title>
|
| 33 |
+
<sort_order>1</sort_order>
|
| 34 |
+
<action>orderseraser/adminhtml_orderseraser</action>
|
| 35 |
+
</orderseraser>
|
| 36 |
+
</children>
|
| 37 |
+
</sales>
|
| 38 |
+
</menu>
|
| 39 |
+
<acl>
|
| 40 |
+
<resources>
|
| 41 |
+
<all>
|
| 42 |
+
<title>Allow Everything</title>
|
| 43 |
+
</all>
|
| 44 |
+
<admin>
|
| 45 |
+
<children>
|
| 46 |
+
<sales>
|
| 47 |
+
<children>
|
| 48 |
+
<order>
|
| 49 |
+
<children>
|
| 50 |
+
<actions>
|
| 51 |
+
<children>
|
| 52 |
+
<delete translate="title">
|
| 53 |
+
<title>Delete (Orders Eraser)</title>
|
| 54 |
+
</delete>
|
| 55 |
+
</children>
|
| 56 |
+
</actions>
|
| 57 |
+
</children>
|
| 58 |
+
</order>
|
| 59 |
+
</children>
|
| 60 |
+
</sales>
|
| 61 |
+
</children>
|
| 62 |
+
</admin>
|
| 63 |
+
</resources>
|
| 64 |
+
</acl>
|
| 65 |
+
|
| 66 |
+
</adminhtml>
|
| 67 |
+
<global>
|
| 68 |
+
<models>
|
| 69 |
+
<orderseraser>
|
| 70 |
+
<class>Wyomind_Orderseraser_Model</class>
|
| 71 |
+
<resourceModel>orderseraser_mysql4</resourceModel>
|
| 72 |
+
</orderseraser>
|
| 73 |
+
<orderseraser_mysql4>
|
| 74 |
+
<class>Wyomind_Orderseraser_Model_Mysql4</class>
|
| 75 |
+
<entities>
|
| 76 |
+
<orderseraser>
|
| 77 |
+
<table>orderseraser</table>
|
| 78 |
+
</orderseraser>
|
| 79 |
+
</entities>
|
| 80 |
+
</orderseraser_mysql4>
|
| 81 |
+
</models>
|
| 82 |
+
<orderseraser_setup>
|
| 83 |
+
<setup>
|
| 84 |
+
<module>Wyomind_Orderseraser</module>
|
| 85 |
+
</setup>
|
| 86 |
+
<connection>
|
| 87 |
+
<use>core_setup</use>
|
| 88 |
+
</connection>
|
| 89 |
+
</orderseraser_setup>
|
| 90 |
+
<orderseraser_write>
|
| 91 |
+
<connection>
|
| 92 |
+
<use>core_write</use>
|
| 93 |
+
</connection>
|
| 94 |
+
</orderseraser_write>
|
| 95 |
+
<orderseraser_read>
|
| 96 |
+
<connection>
|
| 97 |
+
<use>core_read</use>
|
| 98 |
+
</connection>
|
| 99 |
+
</orderseraser_read>
|
| 100 |
+
</resources>
|
| 101 |
+
<blocks>
|
| 102 |
+
<adminhtml>
|
| 103 |
+
<rewrite>
|
| 104 |
+
<sales_order_grid>Wyomind_Orderseraser_Block_Enhancedgrid_Grid</sales_order_grid>
|
| 105 |
+
</rewrite>
|
| 106 |
+
</adminhtml>
|
| 107 |
+
<orderseraser>
|
| 108 |
+
<class>Wyomind_Orderseraser_Block</class>
|
| 109 |
+
</orderseraser>
|
| 110 |
+
</blocks>
|
| 111 |
+
<helpers>
|
| 112 |
+
<orderseraser>
|
| 113 |
+
<class>Wyomind_Orderseraser_Helper</class>
|
| 114 |
+
</orderseraser>
|
| 115 |
+
</helpers>
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
</global>
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
</config>
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
|
| 127 |
+
|
app/design/adminhtml/default/default/layout/Orderseraser.xml
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<layout version="0.1.0">
|
| 3 |
+
|
| 4 |
+
<orderseraser_adminhtml_orderseraser_index>
|
| 5 |
+
<reference name="content">
|
| 6 |
+
<block type="orderseraser/orderseraser" name="orderseraser" />
|
| 7 |
+
</reference>
|
| 8 |
+
</orderseraser_adminhtml_orderseraser_index>
|
| 9 |
+
|
| 10 |
+
</layout>
|
app/etc/modules/Wyomind_Deleteorders.xml
DELETED
|
@@ -1,17 +0,0 @@
|
|
| 1 |
-
<?xml version="1.0"?>
|
| 2 |
-
<!--
|
| 3 |
-
/**
|
| 4 |
-
* @category Wyomind
|
| 5 |
-
* @package Wyomind_DeleteOrders
|
| 6 |
-
* @author ModuleCreator
|
| 7 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 8 |
-
*/
|
| 9 |
-
-->
|
| 10 |
-
<config>
|
| 11 |
-
<modules>
|
| 12 |
-
<Wyomind_Deleteorders>
|
| 13 |
-
<active>true</active>
|
| 14 |
-
<codePool>local</codePool>
|
| 15 |
-
</Wyomind_Deleteorders>
|
| 16 |
-
</modules>
|
| 17 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/etc/modules/Wyomind_Orderseraser.xml
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
|
| 3 |
+
<config>
|
| 4 |
+
<modules>
|
| 5 |
+
<Wyomind_Orderseraser>
|
| 6 |
+
<active>true</active>
|
| 7 |
+
<codePool>local</codePool>
|
| 8 |
+
</Wyomind_Orderseraser>
|
| 9 |
+
</modules>
|
| 10 |
+
</config>
|
package.xml
CHANGED
|
@@ -1,18 +1,18 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Wyomind_OrdersEraser</name>
|
| 4 |
-
<version>
|
| 5 |
-
<stability>
|
| 6 |
<license>GPL</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
-
<summary>
|
| 10 |
-
<description>
|
| 11 |
<notes>none</notes>
|
| 12 |
<authors><author><name>Pierre</name><user>auto-converted</user><email>contact@wyomind.com</email></author></authors>
|
| 13 |
-
<date>2011-03-
|
| 14 |
-
<time>
|
| 15 |
-
<contents><target name="
|
| 16 |
<compatible/>
|
| 17 |
<dependencies/>
|
| 18 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Wyomind_OrdersEraser</name>
|
| 4 |
+
<version>2.0.1</version>
|
| 5 |
+
<stability>stable</stability>
|
| 6 |
<license>GPL</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
+
<summary>Orders eraser allows you to clean your sales database by deleting useless orders and linked invoices and/or shipping in once.</summary>
|
| 10 |
+
<description>Orders eraser allows you to clean your sales database by deleting useless orders and linked invoices and/or shipping in once.</description>
|
| 11 |
<notes>none</notes>
|
| 12 |
<authors><author><name>Pierre</name><user>auto-converted</user><email>contact@wyomind.com</email></author></authors>
|
| 13 |
+
<date>2011-03-15</date>
|
| 14 |
+
<time>14:09:57</time>
|
| 15 |
+
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="Orderseraser.xml" hash="7ecc56d5dd2d7a14ae9e4445efe4fd1e"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Wyomind_Orderseraser.xml" hash="c8103aabbb8d9961415e6e347ee587dc"/></dir></target><target name="magelocal"><dir name="Wyomind"><dir name="Orderseraser"><dir name="Block"><file name="Orderseraser.php" hash="3c0098cacb0aba9a8a00ca0c0ae4e287"/><dir name="Enhancedgrid"><file name="Grid.php" hash="44caf8975104c93eda3baef4dd671a30"/></dir><dir name="Erasergrid"><file name="Grid.php" hash="2e0998d4532392829bfdf5993f2544b3"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="OrderseraserController.php" hash="1beda2e9f3b183bea24618d02bc5427e"/></dir></dir><dir name="etc"><file name="config.xml" hash="7d1c3ae66420798b88faea8eabd7c366"/></dir><dir name="Helper"><file name="Data.php" hash="9f2bab1860e9521a04f8cecf906a7acc"/></dir><dir name="Model"><file name="Orderseraser.php" hash="5ef877a60d98b8cdb6b84df654acea93"/></dir></dir></dir></target></contents>
|
| 16 |
<compatible/>
|
| 17 |
<dependencies/>
|
| 18 |
</package>
|
