escoin_ordermanage - Version 0.3.0

Version Notes

Added admin settings to control the appearance of front end links and their state.

Download this release

Release Info

Developer Escoin
Extension escoin_ordermanage
Version 0.3.0
Comparing to
See all releases


Code changes from version 0.2.0 to 0.3.0

app/code/community/Escoin/Ordermanage/Helper/Data.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- /**
3
  * Escoin_Ordermanage extension
4
  *
5
  * NOTICE OF LICENSE
@@ -12,7 +12,7 @@
12
  * @category Escoin
13
  * @package Escoin_Ordermanage
14
  * @copyright Copyright (c) 2014
15
- * @license http://opensource.org/licenses/mit-license.php MIT License
16
  */
17
  /**
18
  * Ordermanage default helper
@@ -22,4 +22,14 @@
22
  * �(�
23
  */
24
  class Escoin_Ordermanage_Helper_Data extends Mage_Core_Helper_Abstract{
 
 
 
 
 
 
 
 
 
 
25
  }
1
  <?php
2
+ /**
3
  * Escoin_Ordermanage extension
4
  *
5
  * NOTICE OF LICENSE
12
  * @category Escoin
13
  * @package Escoin_Ordermanage
14
  * @copyright Copyright (c) 2014
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
  */
17
  /**
18
  * Ordermanage default helper
22
  * �(�
23
  */
24
  class Escoin_Ordermanage_Helper_Data extends Mage_Core_Helper_Abstract{
25
+
26
+ public function getCancel()
27
+ {
28
+ return Mage::getStoreConfig('ordermanage/frontend/orderstate');
29
+ }
30
+
31
+ public function isEnabled()
32
+ {
33
+ return Mage::getStoreConfig('ordermanage/frontend/enabled');
34
+ }
35
  }
app/code/community/Escoin/Ordermanage/Model/System/Config/Order/Type.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Escoin_Ordermanage_Model_System_Config_Order_Type
3
+ {
4
+
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array('value' => 0, 'label' => Mage::helper('ordermanage')->__('Only cancellable orders')),
9
+ array('value' => 1, 'label' => Mage::helper('ordermanage')->__('All orders')),
10
+ );
11
+ }
12
+
13
+ }
app/code/community/Escoin/Ordermanage/etc/config.xml CHANGED
@@ -19,7 +19,7 @@
19
  <config>
20
  <modules>
21
  <Escoin_Ordermanage>
22
- <version>0.2.0</version>
23
  </Escoin_Ordermanage>
24
  </modules>
25
  <global>
@@ -105,6 +105,26 @@
105
  </observers>
106
  </sales_order_delete_after>
107
  </events>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  </adminhtml>
109
  <admin>
110
  <routers>
@@ -119,6 +139,11 @@
119
  </admin>
120
  <default>
121
  <ordermanage>
122
- </ordermanage>
 
 
 
 
 
123
  </default>
124
  </config>
19
  <config>
20
  <modules>
21
  <Escoin_Ordermanage>
22
+ <version>0.3.0</version>
23
  </Escoin_Ordermanage>
24
  </modules>
25
  <global>
105
  </observers>
106
  </sales_order_delete_after>
107
  </events>
108
+ <acl>
109
+ <resources>
110
+ <admin>
111
+ <children>
112
+ <system>
113
+ <children>
114
+ <config>
115
+ <children>
116
+ <ordermanage translate="title">
117
+ <title>Escoin Ordermanage </title>
118
+ <sort_order>100</sort_order>
119
+ </ordermanage>
120
+ </children>
121
+ </config>
122
+ </children>
123
+ </system>
124
+ </children>
125
+ </admin>
126
+ </resources>
127
+ </acl>
128
  </adminhtml>
129
  <admin>
130
  <routers>
139
  </admin>
140
  <default>
141
  <ordermanage>
142
+ <frontend>
143
+ <enabled>1</enabled>
144
+ <orderstate>0</orderstate>
145
+ <sort_order>10</sort_order>
146
+ </frontend>
147
+ </ordermanage>
148
  </default>
149
  </config>
app/code/community/Escoin/Ordermanage/etc/system.xml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" ?>
2
+ <config>
3
+ <tabs>
4
+ <escoin translate="label">
5
+ <label>Escoin</label>
6
+ <sort_order>100</sort_order>
7
+ </escoin>
8
+ </tabs>
9
+ <sections>
10
+ <ordermanage translate="label">
11
+ <label>OrderManage</label>
12
+ <sort_order>200</sort_order>
13
+ <show_in_default>1</show_in_default>
14
+ <show_in_website>1</show_in_website>
15
+ <show_in_store>1</show_in_store>
16
+ <tab>escoin</tab>
17
+ <groups>
18
+ <frontend translate="label">
19
+ <label>Frontend</label>
20
+ <sort_order>10</sort_order>
21
+ <show_in_default>1</show_in_default>
22
+ <show_in_website>1</show_in_website>
23
+ <show_in_store>0</show_in_store>
24
+ <fields>
25
+ <enabled translate="label">
26
+ <label>Enable cancel link</label>
27
+ <comment>enable/disable cancel link for users</comment>
28
+ <show_in_default>1</show_in_default>
29
+ <show_in_website>1</show_in_website>
30
+ <show_in_store>0</show_in_store>
31
+ <frontend_type>select</frontend_type>
32
+ <source_model>adminhtml/system_config_source_yesno</source_model>
33
+ <sort_order>10</sort_order>
34
+ </enabled>
35
+ <orderstate translate="label">
36
+ <label>Enable for orders</label>
37
+ <comment>enabled for all orders?</comment>
38
+ <show_in_default>1</show_in_default>
39
+ <show_in_website>1</show_in_website>
40
+ <show_in_store>0</show_in_store>
41
+ <frontend_type>select</frontend_type>
42
+ <source_model>ordermanage/system_config_order_type</source_model>
43
+ <sort_order>20</sort_order>
44
+ </orderstate>
45
+ </fields>
46
+ </frontend>
47
+ </groups>
48
+ </ordermanage>
49
+ </sections>
50
+ </config>
app/design/frontend/base/default/template/escoin_ordermanage/sales/order/history.phtml CHANGED
@@ -17,6 +17,7 @@
17
  */
18
 
19
  ?>
 
20
  <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
21
  <?php $_orders = $this->getOrders(); ?>
22
  <div class="page-head">
@@ -50,7 +51,7 @@
50
  <span class="separator">|</span> <a href="<?php echo $this->getReorderUrl($_order) ?>" style="font-weight: bold; color: #403A3A;"><?php echo $this->__('Reorder') ?></a>
51
  <?php endif ?>
52
  <?php /* CHANGES STARTS */ ?>
53
- <?php if ($_order->canCancel()) { ?>
54
  <span class="separator">|</span>
55
  <a href="<?php echo $this->getUrl('sales/order/cancel', array('order_id' => $_order->getId())); ?>" class="order-cancel">
56
  <?php echo $this->__('Cancel') ?>
17
  */
18
 
19
  ?>
20
+ <?php $_helper = Mage::helper('ordermanage'); ?>
21
  <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
22
  <?php $_orders = $this->getOrders(); ?>
23
  <div class="page-head">
51
  <span class="separator">|</span> <a href="<?php echo $this->getReorderUrl($_order) ?>" style="font-weight: bold; color: #403A3A;"><?php echo $this->__('Reorder') ?></a>
52
  <?php endif ?>
53
  <?php /* CHANGES STARTS */ ?>
54
+ <?php if (($_order->canCancel() || $_helper->getCancel()) && $_helper->isEnabled()) { ?>
55
  <span class="separator">|</span>
56
  <a href="<?php echo $this->getUrl('sales/order/cancel', array('order_id' => $_order->getId())); ?>" class="order-cancel">
57
  <?php echo $this->__('Cancel') ?>
app/design/frontend/base/default/template/escoin_ordermanage/sales/order/recent.phtml CHANGED
@@ -17,6 +17,7 @@
17
  */
18
 
19
  ?>
 
20
  <div class="account-box ad-orders">
21
  <?php $_orders = $this->getOrders(); ?>
22
  <div class="head">
@@ -49,7 +50,7 @@
49
  <span class="separator">|</span> <a href="<?php echo $this->getReorderUrl($_order) ?>" style="font-weight: bold; color: #403A3A;"><?php echo $this->__('Reorder') ?></a>
50
  <?php endif ?>
51
  <?php /* CHANGES STARTS */ ?>
52
- <?php if ($_order->canCancel()) { ?>
53
  <span class="separator">|</span>
54
  <a class="order-cancel" href="<?php echo $this->getUrl('sales/order/cancel', array('order_id' => $_order->getId())); ?>">
55
  <?php echo $this->__('Cancel') ?>
17
  */
18
 
19
  ?>
20
+ <?php $_helper = Mage::helper('ordermanage'); ?>
21
  <div class="account-box ad-orders">
22
  <?php $_orders = $this->getOrders(); ?>
23
  <div class="head">
50
  <span class="separator">|</span> <a href="<?php echo $this->getReorderUrl($_order) ?>" style="font-weight: bold; color: #403A3A;"><?php echo $this->__('Reorder') ?></a>
51
  <?php endif ?>
52
  <?php /* CHANGES STARTS */ ?>
53
+ <?php if (($_order->canCancel() || $_helper->getCancel()) && $_helper->isEnabled()) { ?>
54
  <span class="separator">|</span>
55
  <a class="order-cancel" href="<?php echo $this->getUrl('sales/order/cancel', array('order_id' => $_order->getId())); ?>">
56
  <?php echo $this->__('Cancel') ?>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>escoin_ordermanage</name>
4
- <version>0.2.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/mit-license.php">MIT License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Escoin Ordermanage module to add delete functionality to magento</summary>
10
  <description>Escoin Ordermanage module adds the functionality to delete orders in the admin end and the option for users to cancel their orders in the frontend.</description>
11
- <notes>Escoin_Ordermanage ver 0.1.1 stable. Fixed cancel order links for frontend.</notes>
12
- <authors><author><name>Tarun Mukherjee</name><user>tmukherjee13</user><email>tmukherjee13@gmail.com</email></author></authors>
13
- <date>2014-07-11</date>
14
- <time>15:47:06</time>
15
- <contents><target name="magecommunity"><dir name="Escoin"><dir name="Ordermanage"><dir name="Block"><dir name="Order"><file name="History.php" hash="1e58105669c01604fd57cdca07f0b28c"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Ordermanage"><file name="OrderController.php" hash="faf0708302e8b3529ecc29ab4f3ef525"/></dir></dir><file name="OrderController.php" hash="0084f51a0f19ab279b3f203e58d42e1b"/></dir><dir name="etc"><file name="config.xml" hash="0ef0bf38ce80c8f885b084d8c183e713"/></dir><dir name="Helper"><file name="Data.php" hash="52dc40aceed28ea0fad8ee885b02385a"/></dir><dir name="Model"><file name="Observer.php" hash="f6f75d978b2faa558840eee1000233ab"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Escoin_Ordermanage.xml" hash="3cdaee218f290b4dff9386cb8fa78c4f"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="escoin_ordermanage.xml" hash="510f38130495a132f6bb211cd289bd56"/></dir><dir name="template"><dir name="escoin_ordermanage"><dir name="sales"><dir name="order"><file name="history.phtml" hash="7e29c2b9aab96558c7714c852b270455"/><file name="recent.phtml" hash="611199672cf7704f81cc77653a899da3"/></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="Escoin_Ordermanage.csv" hash="8c671e41dab92339bfb2e5917bbe3b7a"/></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>escoin_ordermanage</name>
4
+ <version>0.3.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/mit-license.php">MIT License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Escoin Ordermanage module to add delete functionality to magento</summary>
10
  <description>Escoin Ordermanage module adds the functionality to delete orders in the admin end and the option for users to cancel their orders in the frontend.</description>
11
+ <notes>Added admin settings to control the appearance of front end links and their state.</notes>
12
+ <authors><author><name>Escoin</name><user>escoin</user><email>info@espot.co.in</email></author></authors>
13
+ <date>2014-07-26</date>
14
+ <time>07:07:24</time>
15
+ <contents><target name="magecommunity"><dir name="Escoin"><dir name="Ordermanage"><dir name="Block"><dir name="Order"><file name="History.php" hash="1e58105669c01604fd57cdca07f0b28c"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Ordermanage"><file name="OrderController.php" hash="faf0708302e8b3529ecc29ab4f3ef525"/></dir></dir><file name="OrderController.php" hash="0084f51a0f19ab279b3f203e58d42e1b"/></dir><dir name="etc"><file name="config.xml" hash="8ef6be6b0655a1f47d1a90df45d203c7"/><file name="system.xml" hash="690d5cc622afc33dbc1c2c855a55e5da"/></dir><dir name="Helper"><file name="Data.php" hash="5d2b38816660bb7e3474048e763a8d24"/></dir><dir name="Model"><file name="Observer.php" hash="f6f75d978b2faa558840eee1000233ab"/><dir name="System"><dir name="Config"><dir name="Order"><file name="Type.php" hash="76c109b72a3541454ab3cd682cddcaa0"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Escoin_Ordermanage.xml" hash="3cdaee218f290b4dff9386cb8fa78c4f"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="escoin_ordermanage.xml" hash="510f38130495a132f6bb211cd289bd56"/></dir><dir name="template"><dir name="escoin_ordermanage"><dir name="sales"><dir name="order"><file name="history.phtml" hash="0d7062861fb13c21c1bcafc6a0cd725a"/><file name="recent.phtml" hash="d1cb95088a25806cd8b9dcc38c31ff3a"/></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="Escoin_Ordermanage.csv" hash="8c671e41dab92339bfb2e5917bbe3b7a"/></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>