correios - Version 1.3.3

Version Notes

- Exibição de alerta ao não selecionar nenhum método de entrega.
- Método de entrega padrão selecionados na instalação do módulo

Download this release

Release Info

Developer Willian
Extension correios
Version 1.3.3
Comparing to
See all releases


Code changes from version 1.3.2 to 1.3.3

app/code/community/Storm/Correios/Model/Carrier/Webservice.php CHANGED
@@ -29,6 +29,10 @@ class Storm_Correios_Model_Carrier_Webservice
29
  )
30
  ));
31
 
 
 
 
 
32
  $this->setParam('nCdEmpresa', $this->_getHelper()->getConfigData('account_code'))
33
  ->setParam('sDsSenha', $this->_getHelper()->getConfigData('account_password'))
34
  ->setParam('nCdServico', $this->_getHelper()->getConfigData('shipping_methods'))
@@ -149,7 +153,7 @@ class Storm_Correios_Model_Carrier_Webservice
149
  }
150
 
151
  $result = array();
152
-
153
  if(is_array($request)) {
154
  foreach($request as $methodData) {
155
  $result[] = $this->_convertWebserviceValues($methodData);
29
  )
30
  ));
31
 
32
+ if(!$this->_getHelper()->getConfigData('shipping_methods')) {
33
+ throw new Exception($this->_getHelper()->__('You must to select some shipping method.'));
34
+ }
35
+
36
  $this->setParam('nCdEmpresa', $this->_getHelper()->getConfigData('account_code'))
37
  ->setParam('sDsSenha', $this->_getHelper()->getConfigData('account_password'))
38
  ->setParam('nCdServico', $this->_getHelper()->getConfigData('shipping_methods'))
153
  }
154
 
155
  $result = array();
156
+
157
  if(is_array($request)) {
158
  foreach($request as $methodData) {
159
  $result[] = $this->_convertWebserviceValues($methodData);
app/code/community/Storm/Correios/etc/config.xml CHANGED
@@ -94,7 +94,8 @@
94
  <name>Correios</name>
95
  <title>Correios</title>
96
  <debug_mode>0</debug_mode>
97
- <showmethod>1</showmethod>
 
98
  <free_shipping_method>lower-price</free_shipping_method>
99
  <show_deliverytime>1</show_deliverytime>
100
  </correios>
94
  <name>Correios</name>
95
  <title>Correios</title>
96
  <debug_mode>0</debug_mode>
97
+ <showmethod>1</showmethod>
98
+ <shipping_methods>40010,41106</shipping_methods>
99
  <free_shipping_method>lower-price</free_shipping_method>
100
  <show_deliverytime>1</show_deliverytime>
101
  </correios>
app/locale/pt_BR/Storm_Correios.csv CHANGED
@@ -44,4 +44,5 @@
44
  "Show delivery time","Mostrar o prazo de entrega"
45
  "Use receipt warning","Usar aviso de recebimento"
46
  "Use own hands","Utilizar mão própria"
47
- "Cannot be possible to estimate shipping from Correios.","Não foi possível estimar o frete dos Correios."
 
44
  "Show delivery time","Mostrar o prazo de entrega"
45
  "Use receipt warning","Usar aviso de recebimento"
46
  "Use own hands","Utilizar mão própria"
47
+ "Cannot be possible to estimate shipping from Correios.","Não foi possível estimar o frete dos Correios."
48
+ "You must to select some shipping method.","Você deve selecionar um método de entrega."
package.xml CHANGED
@@ -1,7 +1,7 @@
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,11 +19,13 @@ 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 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>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>correios</name>
4
+ <version>1.3.3</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>- Exibi&#xE7;&#xE3;o de alerta ao n&#xE3;o selecionar nenhum m&#xE9;todo de entrega.&#xD;
23
+ - M&#xE9;todo de entrega padr&#xE3;o selecionados na instala&#xE7;&#xE3;o do m&#xF3;dulo&#xD;
24
+ </notes>
25
  <authors><author><name>Willian</name><user>willsouza</user><email>williancordeirodesouza@gmail.com</email></author></authors>
26
+ <date>2014-01-22</date>
27
+ <time>23:36:45</time>
28
+ <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="d876bf2bf01ef22319f79c57a5dabd8d"/></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="e781224a3dbd9007877e4ab0f710bc0d"/><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="a538e33954855283dd4ca3c83ffeb4ea"/></dir></target><target name="mageetc"><dir name="modules"><file name="Storm_Correios.xml" hash="93aa3a9938657131b77fa2a2e60abd71"/></dir></target></contents>
29
  <compatible/>
30
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
31
  </package>