Asperience_DeleteAllOrders - Version 0.1.9

Version Notes

If you have ideas for improvements or find bugs, please send them to Jean-Sébastien Hederer at contact@asperience.fr, with ASPerience_DeleteAllOrders as part of the subject line.

Download this release

Release Info

Developer Jean-Sébastien Hederer
Extension Asperience_DeleteAllOrders
Version 0.1.9
Comparing to
See all releases


Code changes from version 0.1.8 to 0.1.9

app/code/community/Asperience/DeleteAllOrders/Model/Order.php CHANGED
@@ -13,14 +13,14 @@ class Asperience_DeleteAllOrders_Model_Order extends Mage_Sales_Model_Order
13
  const XML_PATH_SALES_DELETE_ALL = 'sales/delete_order/delete_all';
14
  const XML_PATH_SALES_STATUS = 'sales/delete_order/order_status';
15
 
16
- public function getDeleteStateIds()
17
  {
18
  return explode(',', Mage::getStoreConfig(self::XML_PATH_SALES_STATUS));
19
  }
20
 
21
- public function hasAvalaibleState()
22
  {
23
- return (in_array($this->getState(), $this->getDeleteStateIds()));
24
  }
25
 
26
 
@@ -31,6 +31,6 @@ class Asperience_DeleteAllOrders_Model_Order extends Mage_Sales_Model_Order
31
 
32
  public function canDelete()
33
  {
34
- return (Mage::getStoreConfig(self::XML_PATH_SALES_IS_ACTIVE) && $this->hasAvalaibleState() && (Mage::getStoreConfig(self::XML_PATH_SALES_DELETE_ALL) || $this->hasNoOrdersRelated()));
35
  }
36
  }
13
  const XML_PATH_SALES_DELETE_ALL = 'sales/delete_order/delete_all';
14
  const XML_PATH_SALES_STATUS = 'sales/delete_order/order_status';
15
 
16
+ public function getDeleteStatusIds()
17
  {
18
  return explode(',', Mage::getStoreConfig(self::XML_PATH_SALES_STATUS));
19
  }
20
 
21
+ public function hasAvalaibleStatus()
22
  {
23
+ return (in_array($this->getStatus(), $this->getDeleteStatusIds()));
24
  }
25
 
26
 
31
 
32
  public function canDelete()
33
  {
34
+ return (Mage::getStoreConfig(self::XML_PATH_SALES_IS_ACTIVE) && $this->hasAvalaibleStatus() && (Mage::getStoreConfig(self::XML_PATH_SALES_DELETE_ALL) || $this->hasNoOrdersRelated()));
35
  }
36
  }
app/code/community/Asperience/DeleteAllOrders/etc/config.xml CHANGED
@@ -10,7 +10,7 @@
10
  <config>
11
  <modules>
12
  <Asperience_DeleteAllOrders>
13
- <version>0.1.8</version>
14
  </Asperience_DeleteAllOrders>
15
  </modules>
16
 
10
  <config>
11
  <modules>
12
  <Asperience_DeleteAllOrders>
13
+ <version>0.1.9</version>
14
  </Asperience_DeleteAllOrders>
15
  </modules>
16
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Asperience_DeleteAllOrders</name>
4
- <version>0.1.8</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
7
  <channel>community</channel>
@@ -12,9 +12,9 @@ You can set the status of orders you want to delete in the configuration section
12
  Warning: It's preferable to delete only the testing orders during the development of your local website. Orders deletion is at your own risk.</description>
13
  <notes>If you have ideas for improvements or find bugs, please send them to Jean-S&#xE9;bastien Hederer at contact@asperience.fr, with ASPerience_DeleteAllOrders as part of the subject line.</notes>
14
  <authors><author><name>Jean-S&#xE9;bastien Hederer</name><user>hedererjs</user><email>hedererjs@asperience.fr</email></author></authors>
15
- <date>2012-04-30</date>
16
- <time>22:22:37</time>
17
- <contents><target name="magecommunity"><dir name="Asperience"><dir name="DeleteAllOrders"><dir name="Helper"><file name="Data.php" hash="747caa90dd55fd313f5aa0a642f89b28"/></dir><dir name="Model"><file name="Observer.php" hash="ae9890811c2411ebe791bc3dce72d6c0"/><file name="Order.php" hash="fe02bff5f6311c26f5d8c58fae716035"/></dir><dir name="controllers"><file name="IndexController.php" hash="c496b80e6cee4c19cdce016ecbfb3e6e"/></dir><dir name="etc"><file name="config.xml" hash="6ffe64700e684462bafafd1f310de643"/><file name="system.xml" hash="02f4c05514bc9b3f1c92cce9e2c16681"/></dir></dir></dir></target><target name="magelocale"><dir><dir name="de_DE"><file name="Asperience_DeleteAllOrders.csv" hash="3b17c8b23f90a9ade272559da0bc3ce0"/></dir><dir name="en_US"><file name="Asperience_DeleteAllOrders.csv" hash="9529fa6e4e87db30bca48ce104cb0d05"/></dir><dir name="fr_FR"><file name="Asperience_DeleteAllOrders.csv" hash="8334e497eb99d7496ab770e5311ef70e"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Asperience_DeleteAllOrders.xml" hash="564d484d06362fee6d4f0b42660bfa85"/></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
20
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Asperience_DeleteAllOrders</name>
4
+ <version>0.1.9</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
7
  <channel>community</channel>
12
  Warning: It's preferable to delete only the testing orders during the development of your local website. Orders deletion is at your own risk.</description>
13
  <notes>If you have ideas for improvements or find bugs, please send them to Jean-S&#xE9;bastien Hederer at contact@asperience.fr, with ASPerience_DeleteAllOrders as part of the subject line.</notes>
14
  <authors><author><name>Jean-S&#xE9;bastien Hederer</name><user>hedererjs</user><email>hedererjs@asperience.fr</email></author></authors>
15
+ <date>2012-06-01</date>
16
+ <time>22:01:35</time>
17
+ <contents><target name="magecommunity"><dir name="Asperience"><dir name="DeleteAllOrders"><dir name="Helper"><file name="Data.php" hash="747caa90dd55fd313f5aa0a642f89b28"/></dir><dir name="Model"><file name="Observer.php" hash="ae9890811c2411ebe791bc3dce72d6c0"/><file name="Order.php" hash="f6372db58a485c14fecf55fc3c676888"/></dir><dir name="controllers"><file name="IndexController.php" hash="c496b80e6cee4c19cdce016ecbfb3e6e"/></dir><dir name="etc"><file name="config.xml" hash="6eb50b102037c865253184eba7cb7dc0"/><file name="system.xml" hash="02f4c05514bc9b3f1c92cce9e2c16681"/></dir></dir></dir></target><target name="magelocale"><dir><dir name="de_DE"><file name="Asperience_DeleteAllOrders.csv" hash="3b17c8b23f90a9ade272559da0bc3ce0"/></dir><dir name="en_US"><file name="Asperience_DeleteAllOrders.csv" hash="9529fa6e4e87db30bca48ce104cb0d05"/></dir><dir name="fr_FR"><file name="Asperience_DeleteAllOrders.csv" hash="8334e497eb99d7496ab770e5311ef70e"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Asperience_DeleteAllOrders.xml" hash="564d484d06362fee6d4f0b42660bfa85"/></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
20
  </package>