correios - Version 1.3.2

Version Notes

Correção de bug na notificação de mensagens de alerta sobre as configurações do método de entrega na administração.

Download this release

Release Info

Developer Willian
Extension correios
Version 1.3.2
Comparing to
See all releases


Code changes from version 1.3.1 to 1.3.2

app/code/community/Storm/Correios/Model/Adminhtml/Observer.php CHANGED
@@ -3,20 +3,20 @@
3
  * @category Storm
4
  * @package Storm_Correios
5
  * @copyright Copyright (c) 2013 Willian Cordeiro de Souza
6
- * @author Willian Cordeiro de Souza <williancordeirodesouza@gmail.com>
7
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
  */
9
- class Storm_Correios_Model_Adminhtml_Observer
10
- {
11
  /**
12
  * Check if there are errors in the module configuration
13
  * and requirements for the delivery method
14
  * work properly
15
- *
16
  * @param Varien_Event_Observer $observer
17
  * @return boolean
18
  */
19
- public function checkConfiguration(Varien_Event_Observer $observer)
20
  {
21
  try {
22
  if (!Mage::getSingleton('admin/session')->isLoggedIn()) {
@@ -26,7 +26,7 @@ class Storm_Correios_Model_Adminhtml_Observer
26
  if(!Mage::helper('adminnotification')->isModuleEnabled()) {
27
  return false;
28
  }
29
-
30
  if(!extension_loaded('soap')) {
31
  throw new Exception(Mage::helper('correios')->__('The extension of PHP Soap must be installed so that the module Correios to function properly.'));
32
  }
@@ -36,27 +36,28 @@ class Storm_Correios_Model_Adminhtml_Observer
36
  }
37
 
38
  return true;
39
- } catch(Exception $e) {
40
  $this->_addMessage($e->getMessage());
41
  }
42
  }
43
-
44
  protected function _addMessage($message)
45
  {
46
  $this->_getInbox()->getResource()->parse($this->_getInbox(), array(
47
  array(
48
  'severity' => Mage_AdminNotification_Model_Inbox::SEVERITY_CRITICAL,
49
  'title' => $message,
50
- 'date_added' => date('Y-m-d H:i:s')
 
51
  )
52
  ));
53
-
54
  return $this;
55
  }
56
-
57
  /**
58
  * Gets the message model
59
- *
60
  * @return Mage_AdminNotification_Model_Inbox
61
  */
62
  protected function _getInbox()
3
  * @category Storm
4
  * @package Storm_Correios
5
  * @copyright Copyright (c) 2013 Willian Cordeiro de Souza
6
+ * @author Willian Cordeiro de Souza <williancordeirodesouza@gmail.com>
7
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
  */
9
+ class Storm_Correios_Model_Adminhtml_Observer
10
+ {
11
  /**
12
  * Check if there are errors in the module configuration
13
  * and requirements for the delivery method
14
  * work properly
15
+ *
16
  * @param Varien_Event_Observer $observer
17
  * @return boolean
18
  */
19
+ public function checkConfiguration(Varien_Event_Observer $observer)
20
  {
21
  try {
22
  if (!Mage::getSingleton('admin/session')->isLoggedIn()) {
26
  if(!Mage::helper('adminnotification')->isModuleEnabled()) {
27
  return false;
28
  }
29
+
30
  if(!extension_loaded('soap')) {
31
  throw new Exception(Mage::helper('correios')->__('The extension of PHP Soap must be installed so that the module Correios to function properly.'));
32
  }
36
  }
37
 
38
  return true;
39
+ } catch(Exception $e) {
40
  $this->_addMessage($e->getMessage());
41
  }
42
  }
43
+
44
  protected function _addMessage($message)
45
  {
46
  $this->_getInbox()->getResource()->parse($this->_getInbox(), array(
47
  array(
48
  'severity' => Mage_AdminNotification_Model_Inbox::SEVERITY_CRITICAL,
49
  'title' => $message,
50
+ 'date_added' => date('Y-m-d H:i:s'),
51
+ 'url' => '',
52
  )
53
  ));
54
+
55
  return $this;
56
  }
57
+
58
  /**
59
  * Gets the message model
60
+ *
61
  * @return Mage_AdminNotification_Model_Inbox
62
  */
63
  protected function _getInbox()
app/code/community/Storm/Correios/etc/system.xml CHANGED
@@ -14,7 +14,7 @@
14
  <groups>
15
  <correios translate="label comment" module="correios">
16
  <label>Correios</label>
17
- <comment><![CDATA[Se você tem dúvidas de como configurar o módulo acesse a <a href="https://bitbucket.org/willcs/correios/wiki/" target="_blank">Wiki</a>.]]></comment>
18
  <frontend_type>text</frontend_type>
19
  <sort_order>1</sort_order>
20
  <show_in_default>1</show_in_default>
14
  <groups>
15
  <correios translate="label comment" module="correios">
16
  <label>Correios</label>
17
+ <comment><![CDATA[Se você tem dúvidas de como configurar o módulo acesse nosso <a href="https://github.com/willstorm/correios" target="_blank">repositório</a>.]]></comment>
18
  <frontend_type>text</frontend_type>
19
  <sort_order>1</sort_order>
20
  <show_in_default>1</show_in_default>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>correios</name>
4
- <version>1.3.1</version>
5
  <stability>stable</stability>
6
  <license>OSL 3.0</license>
7
  <channel>community</channel>
@@ -19,11 +19,11 @@ As seguintes fun&#xE7;&#xF5;es est&#xE3;o dispon&#xED;ves:&#xD;
19
  * Configura&#xE7;&#xE3;o e instala&#xE7;&#xE3;o f&#xE1;cil e intu&#xED;tiva.&#xD;
20
  &#xD;
21
  This module is available only to Brazil.</description>
22
- <notes>Corre&#xE7;&#xE3;o de bug ao selecionar apenas um dos m&#xE9;todos de entrega.</notes>
23
  <authors><author><name>Willian</name><user>willsouza</user><email>williancordeirodesouza@gmail.com</email></author></authors>
24
  <date>2013-12-05</date>
25
- <time>00:27:17</time>
26
- <contents><target name="magecommunity"><dir name="Storm"><dir name="Correios"><dir name="Helper"><file name="Data.php" hash="c0344a3cccf20787f115b24cacef68b7"/></dir><dir name="Model"><dir name="Adminhtml"><file name="Observer.php" hash="3e2d7ae7abb9dc2131f2a7868fd89d87"/></dir><dir name="Carrier"><dir name="Package"><file name="Dimension.php" hash="88d12d19a36e753c94f30c08431e9c45"/></dir><dir name="Shipping"><file name="Tracking.php" hash="97c09a03c9bc77ded9e01099887ecb67"/></dir><file name="Shipping.php" hash="e8d22369e1d5e185585684774711776b"/><file name="Webservice.php" hash="e1f0bb7b3d53acbd10c2c550b79fe5a3"/></dir><dir name="Catalog"><dir name="Resource"><file name="Setup.php" hash="833a10b8bc912d3df9818f3b0f86d442"/></dir></dir><dir name="Source"><file name="FreeMethods.php" hash="67646bf270c42fa6fa8b79de336236b3"/><file name="Methods.php" hash="d9118016fe15471f813682385c95a93b"/></dir></dir><dir name="etc"><file name="config.xml" hash="2ba451fdb748cdaf09ecf19c669b0379"/><file name="system.xml" hash="ae02d64e5ad304a3dc256ccdd490d646"/></dir><dir name="sql"><dir name="correios_setup"><file name="mysql4-install-0.1.0.php" hash="dca339c0e46e4b9d116bc1eea9d09930"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="pt_BR"><file name="Storm_Correios.csv" hash="53c7b3305663dea7aff6566acde6b4b4"/></dir></target><target name="mageetc"><dir name="modules"><file name="Storm_Correios.xml" hash="93aa3a9938657131b77fa2a2e60abd71"/></dir></target></contents>
27
  <compatible/>
28
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
29
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>correios</name>
4
+ <version>1.3.2</version>
5
  <stability>stable</stability>
6
  <license>OSL 3.0</license>
7
  <channel>community</channel>
19
  * Configura&#xE7;&#xE3;o e instala&#xE7;&#xE3;o f&#xE1;cil e intu&#xED;tiva.&#xD;
20
  &#xD;
21
  This module is available only to Brazil.</description>
22
+ <notes>Corre&#xE7;&#xE3;o de bug na notifica&#xE7;&#xE3;o de mensagens de alerta sobre as configura&#xE7;&#xF5;es do m&#xE9;todo de entrega na administra&#xE7;&#xE3;o.</notes>
23
  <authors><author><name>Willian</name><user>willsouza</user><email>williancordeirodesouza@gmail.com</email></author></authors>
24
  <date>2013-12-05</date>
25
+ <time>00:56:34</time>
26
+ <contents><target name="magecommunity"><dir name="Storm"><dir name="Correios"><dir name="Helper"><file name="Data.php" hash="c0344a3cccf20787f115b24cacef68b7"/></dir><dir name="Model"><dir name="Adminhtml"><file name="Observer.php" hash="801b6e31dd5b6e33de4f5db4fa65714b"/></dir><dir name="Carrier"><dir name="Package"><file name="Dimension.php" hash="88d12d19a36e753c94f30c08431e9c45"/></dir><dir name="Shipping"><file name="Tracking.php" hash="97c09a03c9bc77ded9e01099887ecb67"/></dir><file name="Shipping.php" hash="e8d22369e1d5e185585684774711776b"/><file name="Webservice.php" hash="e1f0bb7b3d53acbd10c2c550b79fe5a3"/></dir><dir name="Catalog"><dir name="Resource"><file name="Setup.php" hash="833a10b8bc912d3df9818f3b0f86d442"/></dir></dir><dir name="Source"><file name="FreeMethods.php" hash="67646bf270c42fa6fa8b79de336236b3"/><file name="Methods.php" hash="d9118016fe15471f813682385c95a93b"/></dir></dir><dir name="etc"><file name="config.xml" hash="2ba451fdb748cdaf09ecf19c669b0379"/><file name="system.xml" hash="7fc9af5f08e42d25f0fad5b93a1694da"/></dir><dir name="sql"><dir name="correios_setup"><file name="mysql4-install-0.1.0.php" hash="dca339c0e46e4b9d116bc1eea9d09930"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="pt_BR"><file name="Storm_Correios.csv" hash="53c7b3305663dea7aff6566acde6b4b4"/></dir></target><target name="mageetc"><dir name="modules"><file name="Storm_Correios.xml" hash="93aa3a9938657131b77fa2a2e60abd71"/></dir></target></contents>
27
  <compatible/>
28
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
29
  </package>