soonstockreleaser - Version 1.0.2

Version Notes

- Fixed tinyint bug
- Removed Soon_All dependancy

Download this release

Release Info

Developer Hervé Guétin
Extension soonstockreleaser
Version 1.0.2
Comparing to
See all releases


Code changes from version 1.0.1 to 1.0.2

app/code/community/Soon/StockReleaser/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Soon_StockReleaser>
5
- <version>1.0.1</version>
6
  </Soon_StockReleaser>
7
  </modules>
8
 
2
  <config>
3
  <modules>
4
  <Soon_StockReleaser>
5
+ <version>1.0.2</version>
6
  </Soon_StockReleaser>
7
  </modules>
8
 
app/code/community/Soon/StockReleaser/etc/config.xml~ ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Soon_StockReleaser>
5
+ <version>1.0.1</version>
6
+ </Soon_StockReleaser>
7
+ </modules>
8
+
9
+ <frontend>
10
+ <translate>
11
+ <modules>
12
+ <Soon_StockReleaser>
13
+ <files>
14
+ <default>Soon_StockReleaser.csv</default>
15
+ </files>
16
+ </Soon_StockReleaser>
17
+ </modules>
18
+ </translate>
19
+ </frontend>
20
+
21
+ <admin>
22
+ <routers>
23
+ <adminhtml>
24
+ <args>
25
+ <modules>
26
+ <stockreleaser before="Mage_Adminhtml">Soon_StockReleaser_Adminhtml</stockreleaser>
27
+ </modules>
28
+ </args>
29
+ </adminhtml>
30
+ </routers>
31
+ </admin>
32
+
33
+ <adminhtml>
34
+ <events>
35
+ <controller_action_layout_render_before_adminhtml_sales_order_view>
36
+ <observers>
37
+ <update_order_view_get_back_button>
38
+ <type>singleton</type>
39
+ <class>stockreleaser/observer</class>
40
+ <method>updateOrderViewGetBackButton</method>
41
+ </update_order_view_get_back_button>
42
+ </observers>
43
+ </controller_action_layout_render_before_adminhtml_sales_order_view>
44
+ </events>
45
+ <layout>
46
+ <updates>
47
+ <stockreleaser>
48
+ <file>stockreleaser.xml</file>
49
+ </stockreleaser>
50
+ </updates>
51
+ </layout>
52
+ <translate>
53
+ <modules>
54
+ <Soon_StockReleaser>
55
+ <files>
56
+ <default>Soon_StockReleaser.csv</default>
57
+ </files>
58
+ </Soon_StockReleaser>
59
+ </modules>
60
+ </translate>
61
+ <menu>
62
+ <sales>
63
+ <children>
64
+ <stockreleaser_canceled_orders translate="title" module="stockreleaser">
65
+ <title>Automatically Canceled Orders</title>
66
+ <action>adminhtml/sales_order_canceled</action>
67
+ <sort_order>15</sort_order>
68
+ </stockreleaser_canceled_orders>
69
+ </children>
70
+ </sales>
71
+ </menu>
72
+ <acl>
73
+ <resources>
74
+ <all>
75
+ <title>Allow Everything</title>
76
+ </all>
77
+ <admin>
78
+ <children>
79
+ <sales>
80
+ <children>
81
+ <stockreleaser_canceled_orders translate="title">
82
+ <title>Automatically Canceled Orders</title>
83
+ </stockreleaser_canceled_orders>
84
+ </children>
85
+ </sales>
86
+ <system>
87
+ <children>
88
+ <config>
89
+ <children>
90
+ <stockreleaser translate="title" module="stockreleaser">
91
+ <title>Stock Releaser</title>
92
+ </stockreleaser>
93
+ </children>
94
+ </config>
95
+ </children>
96
+ </system>
97
+ </children>
98
+ </admin>
99
+ </resources>
100
+ </acl>
101
+ </adminhtml>
102
+
103
+ <global>
104
+ <events>
105
+ <sales_order_place_after>
106
+ <observers>
107
+ <set_autocancel>
108
+ <type>singleton</type>
109
+ <class>stockreleaser/observer</class>
110
+ <method>setAutoCancelData</method>
111
+ </set_autocancel>
112
+ </observers>
113
+ </sales_order_place_after>
114
+ </events>
115
+ <blocks>
116
+ <stockreleaser>
117
+ <class>Soon_StockReleaser_Block</class>
118
+ </stockreleaser>
119
+ </blocks>
120
+ <helpers>
121
+ <stockreleaser>
122
+ <class>Soon_StockReleaser_Helper</class>
123
+ </stockreleaser>
124
+ </helpers>
125
+ <models>
126
+ <stockreleaser>
127
+ <class>Soon_StockReleaser_Model</class>
128
+ <resourceModel>stockreleaser_mysql4</resourceModel>
129
+ </stockreleaser>
130
+ <stockreleaser_mysql4>
131
+ <class>Soon_StockReleaser_Model_Mysql4</class>
132
+ <entities>
133
+ <cancel>
134
+ <table>stockreleaser_cancel</table>
135
+ </cancel>
136
+ </entities>
137
+ </stockreleaser_mysql4>
138
+ </models>
139
+ <resources>
140
+ <stockreleaser_setup>
141
+ <setup>
142
+ <module>Soon_StockReleaser</module>
143
+ </setup>
144
+ </stockreleaser_setup>
145
+ </resources>
146
+ </global>
147
+
148
+ <default>
149
+ <stockreleaser>
150
+ <settings>
151
+ <order_statuses>payment_review,pending,pending_payment,pending_paypal</order_statuses>
152
+ </settings>
153
+ </stockreleaser>
154
+ </default>
155
+
156
+ <crontab>
157
+ <jobs>
158
+ <stockreleaser_cancel>
159
+ <schedule>
160
+ <cron_expr>* * * * *</cron_expr>
161
+ </schedule>
162
+ <run>
163
+ <model>stockreleaser/cancel::processCancel</model>
164
+ </run>
165
+ </stockreleaser_cancel>
166
+ <stockreleaser_clean_completed_orders>
167
+ <schedule>
168
+ <cron_expr>* * * * *</cron_expr>
169
+ </schedule>
170
+ <run>
171
+ <model>stockreleaser/cancel::cleanCompletedOrders</model>
172
+ </run>
173
+ </stockreleaser_clean_completed_orders>
174
+ </jobs>
175
+ </crontab>
176
+ </config>
app/code/community/Soon/StockReleaser/etc/system.xml CHANGED
@@ -12,9 +12,16 @@
12
  */
13
  -->
14
  <config>
 
 
 
 
 
 
 
15
  <sections>
16
  <stockreleaser translate="label" module="stockreleaser">
17
- <label>Stock Release</label>
18
  <tab>soon</tab>
19
  <frontend_type>text</frontend_type>
20
  <sort_order>1000</sort_order>
12
  */
13
  -->
14
  <config>
15
+ <tabs>
16
+ <soon>
17
+ <label><![CDATA[<strong style="color: #e3007a;">So</strong><strong style="color: #19539d;">on</strong><div style="display: inline;"><a style="display: block; float: right; width: 20px; background: url(data:data:image/gif;base64,R0lGODlhCgAJAIACAOMAetHe3yH+EUNyZWF0ZWQgd2l0aCBHSU1QACwAAAAACgAJAAACEowPqXmhbYCTjTJUcXZR+/UYBQA7) 0 4px no-repeat!important; text-indent: 9000px; white-space: nowrap;" href="http://www.agence-soon.fr" title="Agence Soon - Marketing Intéractif" target="_blank">http://www.agence-soon.fr</a></div>]]></label>
18
+ <class>soon-tab</class>
19
+ <sort_order>1000</sort_order>
20
+ </soon>
21
+ </tabs>
22
  <sections>
23
  <stockreleaser translate="label" module="stockreleaser">
24
+ <label>Stock Releaser</label>
25
  <tab>soon</tab>
26
  <frontend_type>text</frontend_type>
27
  <sort_order>1000</sort_order>
app/code/community/Soon/StockReleaser/etc/system.xml~ ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Agence Soon
5
+ *
6
+ *
7
+ * @category Soon
8
+ * @package Soon_StockReleaser
9
+ * @copyright Copyright (c) 2011 Agence Soon. (http://www.agence-soon.fr)
10
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
11
+ * @author Hervé Guétin
12
+ */
13
+ -->
14
+ <config>
15
+ <sections>
16
+ <stockreleaser translate="label" module="stockreleaser">
17
+ <label>Stock Releaser</label>
18
+ <tab>soon</tab>
19
+ <frontend_type>text</frontend_type>
20
+ <sort_order>1000</sort_order>
21
+ <show_in_default>1</show_in_default>
22
+ <show_in_website>1</show_in_website>
23
+ <show_in_store>1</show_in_store>
24
+
25
+ <frontend_model>stockreleaser/adminhtml_system_config_form</frontend_model>
26
+
27
+ <groups>
28
+ <settings translate="label">
29
+ <label>Settings</label>
30
+ <frontend_type>text</frontend_type>
31
+ <sort_order>10</sort_order>
32
+ <show_in_default>1</show_in_default>
33
+ <show_in_website>1</show_in_website>
34
+ <show_in_store>1</show_in_store>
35
+ <fields>
36
+ <order_statuses translate="label">
37
+ <label>Order Statuses</label>
38
+ <frontend_type>multiselect</frontend_type>
39
+ <comment>Order statuses that must be automatically cancelled</comment>
40
+ <sort_order>1</sort_order>
41
+ <source_model>stockreleaser/system_config_source_order_status</source_model>
42
+ <show_in_default>1</show_in_default>
43
+ <show_in_website>1</show_in_website>
44
+ <show_in_store>1</show_in_store>
45
+ <can_be_empty>1</can_be_empty>
46
+ </order_statuses>
47
+ </fields>
48
+ </settings>
49
+ <leadtime>
50
+ <label>Leadtimes Manager</label>
51
+ <frontend_type>text</frontend_type>
52
+ <sort_order>20</sort_order>
53
+ <show_in_default>1</show_in_default>
54
+ <show_in_website>1</show_in_website>
55
+ <show_in_store>1</show_in_store>
56
+
57
+ <use_custom_form>1</use_custom_form>
58
+
59
+ </leadtime>
60
+ </groups>
61
+ </stockreleaser>
62
+ </sections>
63
+ </config>
app/code/community/Soon/StockReleaser/sql/stockreleaser_setup/{mysql4-install-1.0.1.php → mysql4-install-1.0.1.php~} RENAMED
File without changes
app/code/community/Soon/StockReleaser/sql/stockreleaser_setup/mysql4-install-1.0.2.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Agence Soon
5
+ *
6
+ * @category Soon
7
+ * @package Soon_StockReleaser
8
+ * @copyright Copyright (c) 2011 Agence Soon. (http://www.agence-soon.fr)
9
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
10
+ * @author Hervé Guétin
11
+ */
12
+ $installer = $this;
13
+
14
+ $installer->startSetup();
15
+
16
+ $installer->run("
17
+
18
+ -- DROP TABLE IF EXISTS {$this->getTable('stockreleaser_cancel')};
19
+ CREATE TABLE {$this->getTable('stockreleaser_cancel')} (
20
+ `id` int unsigned NOT NULL auto_increment,
21
+ `order_id` text NOT NULL default '',
22
+ `autocancel_date` datetime,
23
+ `autocancel_status` tinyint(1) NOT NULL default '0',
24
+ PRIMARY KEY (`id`)
25
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
26
+ ");
27
+
28
+ $installer->endSetup();
app/code/community/Soon/StockReleaser/todo.txt DELETED
@@ -1,19 +0,0 @@
1
- == Reste à faire ==
2
-
3
- Test sur 1.4
4
-
5
- * Documentation
6
- - Attention Cron
7
-
8
-
9
- == Testé sur ===
10
- 1.6.0.0
11
-
12
- == Fait ==
13
-
14
- 25.10.2011 - Traductions restantes
15
- 25.10.2011 - Nettoyage des commandes terminées
16
- 25.10.2011 - Revoir en-tête classes pour être conforme aux règles de dev Soon
17
- 25.10.2011 - Revoir commentaires code pour être conforme aux règles de dev Soon
18
- 24.10.2011 - Ajout champ annulation sur grid + suppression delete (attention ajout champ "autocancel_status") => Création d'une grille des commandes annulées.
19
- 19.10.2011 - Config des délais dans system > configuration et mise à jour des modèles / du module en conséquence.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
package.xml CHANGED
@@ -1,42 +1,28 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>soonstockreleaser</name>
4
- <version>1.0.1</version>
5
  <stability>stable</stability>
6
- <license uri="http://opensource.org/licenses/AFL-3.0">AFL 3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>This extension allows the automatic cancellation of orders that haven't been paid.&#xD;
 
10
  &#xD;
11
- =====&#xD;
12
  &#xD;
13
- Ce module annule automatiquement les commandes non pay&#xE9;es.</summary>
14
- <description>This extension allows the automatic cancellation of orders that haven't been paid.&#xD;
15
  &#xD;
16
- The administrator can chose, for each payment type, the leadtime before the order is cancelled, ie : 15 min for credit cards and 7 days for checks.&#xD;
17
  &#xD;
18
- It is also possible to chose which order statuses are to be canceled.&#xD;
19
- &#xD;
20
- A grid listing all automatically canceled orders is available in the backend.&#xD;
21
- &#xD;
22
- Stock management follows the Magento core workflow.&#xD;
23
- &#xD;
24
- =====&#xD;
25
- &#xD;
26
- Ce module annule automatiquement les commandes non pay&#xE9;es.&#xD;
27
- &#xD;
28
- L'administrateur peut choisir, pour chaque mode de paiement, le d&#xE9;lai avant annulation, par exemple, 15 min pour les paiement par CB ou 7 jours pour les paiements par ch&#xE8;que.&#xD;
29
- &#xD;
30
- Il est aussi possible de choisir quels statuts de commande sont sujets &#xE0; annulation automatique.&#xD;
31
- &#xD;
32
- Une grille listant toutes les commandes automatiquement annul&#xE9;es est disponible depuis le back-office.&#xD;
33
- &#xD;
34
- La gestion des stocks suit le workflow core de Magento.</description>
35
- <notes>Fixed bug : table prefix is not prepended on table creation</notes>
36
- <authors><author><name>Herv&#xE9; Gu&#xE9;tin</name><user>auto-converted</user><email>contact@agence-soon.fr</email></author></authors>
37
- <date>2012-04-10</date>
38
- <time>15:32:46</time>
39
- <contents><target name="magecommunity"><dir name="Soon"><dir name="StockReleaser"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="Canceled"><file name="Grid.php" hash="2ab54aea2466416f79270c6157f4027b"/></dir><file name="Canceled.php" hash="f3b053eb0ed1b2e90e5590e39a6d438e"/></dir></dir><dir name="System"><dir name="Config"><file name="Form.php" hash="0f7593d7d5cdf600e84ff5534f7be38c"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="84acca73a948d547bf9758dd171d380a"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Cancel"><file name="Collection.php" hash="6c20ecd45e02cac81fbbfb40004e4503"/></dir><file name="Cancel.php" hash="fc4a5783d80bf3e1d93758f98031dcc5"/></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Order"><file name="Status.php" hash="e41c7f2dea058b1d553c3f23ba1b7e13"/></dir><file name="Unit.php" hash="cbca7c0591fde1b5c9695838360a0f02"/></dir></dir></dir><file name="Cancel.php" hash="17733aaec655bc08ff383885bf71b8d1"/><file name="Observer.php" hash="7f3b8d9b62953e83213a615b9b4377be"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="CanceledController.php" hash="21c172dfc466a7ac717888bab8cc5f23"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="be2c3551e2bc4353910606fa4969373d"/><file name="system.xml" hash="5147f906671110bfe8c6d243688ca257"/></dir><dir name="sql"><dir name="stockreleaser_setup"><file name="mysql4-install-1.0.1.php" hash="a4a05e0d511a0d74da28abd61b8493f6"/></dir></dir><file name="todo.txt" hash="9fca20a656dd91dd42764020c5531c9b"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="stockreleaser.xml" hash="cefb4ab4827886c5bb74f9764c955b50"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Soon_StockReleaser.xml" hash="e60326b41f8446add982cd7f6ee1f782"/></dir></target><target name="magelocale"><dir name="fr_FR"><file name="Soon_StockReleaser.csv" hash="650762314ddaee6197e8962d5405441f"/></dir></target></contents>
40
  <compatible/>
41
- <dependencies><required><package><name>soonall</name><channel>community</channel><min>0.1.0</min><max>100.0.0</max></package></required></dependencies>
42
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>soonstockreleaser</name>
4
+ <version>1.0.2</version>
5
  <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/OSL-3.0">OSL 3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>Automatically cancels unpaid orders.</summary>
10
+ <description>This extension automatically cancels unpaid orders.&#xD;
11
  &#xD;
12
+ The admin can chose, for enery payment method, a leadtime prior to cancelling the order. Ie : 15 min for Credit Card and 7 days for check.&#xD;
13
  &#xD;
14
+ It is also possible to filter which order statuses will be automatically canceld.&#xD;
 
15
  &#xD;
16
+ A grid listing all automatically canceled orders with their cancelation dates is added to the backend.&#xD;
17
  &#xD;
18
+ Stock management follows Magento workflow.</description>
19
+ <notes>- Fixed tinyint bug&#xD;
20
+ - Removed Soon_All dependancy&#xD;
21
+ </notes>
22
+ <authors><author><name>Herv&#xE9; Gu&#xE9;tin</name><user>agencesoon</user><email>contact@agence-soon.fr</email></author></authors>
23
+ <date>2012-11-28</date>
24
+ <time>10:14:27</time>
25
+ <contents><target name="mageetc"><dir name="modules"><file name="Soon_StockReleaser.xml" hash="e60326b41f8446add982cd7f6ee1f782"/></dir></target><target name="magecommunity"><dir name="Soon"><dir name="StockReleaser"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="Canceled"><file name="Grid.php" hash="2ab54aea2466416f79270c6157f4027b"/></dir><file name="Canceled.php" hash="f3b053eb0ed1b2e90e5590e39a6d438e"/></dir></dir><dir name="System"><dir name="Config"><file name="Form.php" hash="0f7593d7d5cdf600e84ff5534f7be38c"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="84acca73a948d547bf9758dd171d380a"/></dir><dir name="Model"><file name="Cancel.php" hash="17733aaec655bc08ff383885bf71b8d1"/><dir name="Mysql4"><dir name="Cancel"><file name="Collection.php" hash="6c20ecd45e02cac81fbbfb40004e4503"/></dir><file name="Cancel.php" hash="fc4a5783d80bf3e1d93758f98031dcc5"/></dir><file name="Observer.php" hash="7f3b8d9b62953e83213a615b9b4377be"/><dir name="System"><dir name="Config"><dir name="Source"><dir name="Order"><file name="Status.php" hash="e41c7f2dea058b1d553c3f23ba1b7e13"/></dir><file name="Unit.php" hash="cbca7c0591fde1b5c9695838360a0f02"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="CanceledController.php" hash="21c172dfc466a7ac717888bab8cc5f23"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="b3e7485b20f017994003128108e7b981"/><file name="config.xml~" hash="be2c3551e2bc4353910606fa4969373d"/><file name="system.xml" hash="668864c4733e1a87b70295a0f5e45c11"/><file name="system.xml~" hash="48ca24f6e1c9f8f5da2d5cfe5c37c342"/></dir><dir name="sql"><dir name="stockreleaser_setup"><file name="mysql4-install-1.0.1.php~" hash="a4a05e0d511a0d74da28abd61b8493f6"/><file name="mysql4-install-1.0.2.php" hash="bc8f092fd46476958753a62c73b531ce"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="stockreleaser.xml" hash="cefb4ab4827886c5bb74f9764c955b50"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="fr_FR"><file name="Soon_StockReleaser.csv" hash="650762314ddaee6197e8962d5405441f"/></dir></target></contents>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  <compatible/>
27
+ <dependencies><required><php><min>5.3.0</min><max>5.5.0</max></php></required></dependencies>
28
  </package>