correios - Version 1.1.5

Version Notes

* Correção de bug na passagem de parâmetros para função de requisição do webservice
* Adicionado opção de aviso de recebimento

Download this release

Release Info

Developer Willian
Extension correios
Version 1.1.5
Comparing to
See all releases


Code changes from version 1.0.4 to 1.1.5

app/code/community/Storm/Correios/Model/Carrier/Shipping.php CHANGED
@@ -260,7 +260,7 @@ class Storm_Correios_Model_Carrier_Shipping extends Mage_Shipping_Model_Carrier_
260
  * @param Varien_Object $request
261
  * @return Storm_Correios_Model_Carrier_Shipping
262
  */
263
- protected function _setClientRequest(Varien_Object $request)
264
  {
265
  $this->_clientRequest = $request;
266
  return $this;
260
  * @param Varien_Object $request
261
  * @return Storm_Correios_Model_Carrier_Shipping
262
  */
263
+ protected function _setClientRequest(array $request)
264
  {
265
  $this->_clientRequest = $request;
266
  return $this;
app/code/community/Storm/Correios/Model/Carrier/Webservice.php CHANGED
@@ -101,12 +101,12 @@ class Storm_Correios_Model_Carrier_Webservice
101
  ->setParam('nVlDiametro', 0)
102
  ->setParam('sCdMaoPropria', 'N')
103
  ->setParam('nVlValorDeclarado', 0)
104
- ->setParam('sCdAvisoRecebimento', 'N');
105
 
106
  if($this->_getHelper()->getConfigData('stated_value')) {
107
  $this->setParam('nVlValorDeclarado', $request->getPackageValue());
108
- }
109
-
110
  $this->_request = $request;
111
  return $this;
112
  }
101
  ->setParam('nVlDiametro', 0)
102
  ->setParam('sCdMaoPropria', 'N')
103
  ->setParam('nVlValorDeclarado', 0)
104
+ ->setParam('sCdAvisoRecebimento', $this->_getHelper()->getConfigData('receipt_warning') ? 'S' : 'N');
105
 
106
  if($this->_getHelper()->getConfigData('stated_value')) {
107
  $this->setParam('nVlValorDeclarado', $request->getPackageValue());
108
+ }
109
+
110
  $this->_request = $request;
111
  return $this;
112
  }
app/code/community/Storm/Correios/etc/system.xml CHANGED
@@ -86,12 +86,21 @@
86
  <show_in_website>1</show_in_website>
87
  <show_in_store>1</show_in_store>
88
  </stated_value>
 
 
 
 
 
 
 
 
 
89
  <free_shipping_method translate="label comment">
90
  <label>Free shipping method</label>
91
  <frontend_type>select</frontend_type>
92
  <source_model>correios/source_freeMethods</source_model>
93
  <comment><![CDATA[This method will be applied only when the customer purchase meet the requirements of the rules of promotions.]]></comment>
94
- <sort_order>9</sort_order>
95
  <show_in_default>1</show_in_default>
96
  <show_in_website>1</show_in_website>
97
  <show_in_store>1</show_in_store>
@@ -100,7 +109,7 @@
100
  <label>Add to delivery time</label>
101
  <frontend_type>text</frontend_type>
102
  <comment><![CDATA[Time in days to add to the delivery time of Correios.]]></comment>
103
- <sort_order>10</sort_order>
104
  <show_in_default>1</show_in_default>
105
  <show_in_website>1</show_in_website>
106
  <show_in_store>1</show_in_store>
@@ -110,7 +119,7 @@
110
  <frontend_type>select</frontend_type>
111
  <source_model>adminhtml/system_config_source_yesno</source_model>
112
  <comment><![CDATA[Only if this option is yes the error messages will be displayed]]></comment>
113
- <sort_order>11</sort_order>
114
  <show_in_default>1</show_in_default>
115
  <show_in_website>1</show_in_website>
116
  <show_in_store>1</show_in_store>
@@ -119,7 +128,7 @@
119
  <label>Show delivery time</label>
120
  <frontend_type>select</frontend_type>
121
  <source_model>adminhtml/system_config_source_yesno</source_model>
122
- <sort_order>12</sort_order>
123
  <show_in_default>1</show_in_default>
124
  <show_in_website>1</show_in_website>
125
  <show_in_store>1</show_in_store>
@@ -128,7 +137,7 @@
128
  <label>Calculate Handling Fee</label>
129
  <frontend_type>select</frontend_type>
130
  <source_model>shipping/source_handlingType</source_model>
131
- <sort_order>13</sort_order>
132
  <show_in_default>1</show_in_default>
133
  <show_in_website>1</show_in_website>
134
  <show_in_store>0</show_in_store>
@@ -138,7 +147,7 @@
138
  <frontend_type>text</frontend_type>
139
  <comment><![CDATA[This value will be added on final price of shipping]]></comment>
140
  <validate>validate-number</validate>
141
- <sort_order>14</sort_order>
142
  <show_in_default>1</show_in_default>
143
  <show_in_website>1</show_in_website>
144
  <show_in_store>0</show_in_store>
86
  <show_in_website>1</show_in_website>
87
  <show_in_store>1</show_in_store>
88
  </stated_value>
89
+ <receipt_warning>
90
+ <label>Use receipt warning</label>
91
+ <frontend_type>select</frontend_type>
92
+ <source_model>adminhtml/system_config_source_yesno</source_model>
93
+ <sort_order>9</sort_order>
94
+ <show_in_default>1</show_in_default>
95
+ <show_in_website>1</show_in_website>
96
+ <show_in_store>1</show_in_store>
97
+ </receipt_warning>
98
  <free_shipping_method translate="label comment">
99
  <label>Free shipping method</label>
100
  <frontend_type>select</frontend_type>
101
  <source_model>correios/source_freeMethods</source_model>
102
  <comment><![CDATA[This method will be applied only when the customer purchase meet the requirements of the rules of promotions.]]></comment>
103
+ <sort_order>10</sort_order>
104
  <show_in_default>1</show_in_default>
105
  <show_in_website>1</show_in_website>
106
  <show_in_store>1</show_in_store>
109
  <label>Add to delivery time</label>
110
  <frontend_type>text</frontend_type>
111
  <comment><![CDATA[Time in days to add to the delivery time of Correios.]]></comment>
112
+ <sort_order>11</sort_order>
113
  <show_in_default>1</show_in_default>
114
  <show_in_website>1</show_in_website>
115
  <show_in_store>1</show_in_store>
119
  <frontend_type>select</frontend_type>
120
  <source_model>adminhtml/system_config_source_yesno</source_model>
121
  <comment><![CDATA[Only if this option is yes the error messages will be displayed]]></comment>
122
+ <sort_order>12</sort_order>
123
  <show_in_default>1</show_in_default>
124
  <show_in_website>1</show_in_website>
125
  <show_in_store>1</show_in_store>
128
  <label>Show delivery time</label>
129
  <frontend_type>select</frontend_type>
130
  <source_model>adminhtml/system_config_source_yesno</source_model>
131
+ <sort_order>13</sort_order>
132
  <show_in_default>1</show_in_default>
133
  <show_in_website>1</show_in_website>
134
  <show_in_store>1</show_in_store>
137
  <label>Calculate Handling Fee</label>
138
  <frontend_type>select</frontend_type>
139
  <source_model>shipping/source_handlingType</source_model>
140
+ <sort_order>14</sort_order>
141
  <show_in_default>1</show_in_default>
142
  <show_in_website>1</show_in_website>
143
  <show_in_store>0</show_in_store>
147
  <frontend_type>text</frontend_type>
148
  <comment><![CDATA[This value will be added on final price of shipping]]></comment>
149
  <validate>validate-number</validate>
150
+ <sort_order>15</sort_order>
151
  <show_in_default>1</show_in_default>
152
  <show_in_website>1</show_in_website>
153
  <show_in_store>0</show_in_store>
app/locale/pt_BR/Storm_Correios.csv CHANGED
@@ -41,4 +41,5 @@
41
  "This value will be added on final price of shipping","Este valor será adicionado no preço final do frete"
42
  "The extension of PHP Soap must be installed so that the module Correios to function properly.","A extensão do PHP Soap deve estar instalada para que o módulo dos Correios funcione corretamente."
43
  "You must to install PHP Soap extension to use shipping method Correios.","Você deve instalar a extensão Soap do PHP para usar o método de entrega dos Correios."
44
- "Show delivery time","Mostrar o prazo de entrega"
 
41
  "This value will be added on final price of shipping","Este valor será adicionado no preço final do frete"
42
  "The extension of PHP Soap must be installed so that the module Correios to function properly.","A extensão do PHP Soap deve estar instalada para que o módulo dos Correios funcione corretamente."
43
  "You must to install PHP Soap extension to use shipping method Correios.","Você deve instalar a extensão Soap do PHP para usar o método de entrega dos Correios."
44
+ "Show delivery time","Mostrar o prazo de entrega"
45
+ "Use receipt warning","Usar aviso de recebimento"
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>correios</name>
4
- <version>1.0.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL 3.0</license>
7
  <channel>community</channel>
@@ -20,11 +20,12 @@ As seguintes fun&#xE7;&#xF5;es est&#xE3;o dispon&#xED;ves:&lt;br /&gt;&lt;br /&g
20
  Caso tenha d&#xFA;vida de como instalar e configurar o m&#xF3;dulo &lt;a href="https://bitbucket.org/willcs/correios/wiki"&gt;acesse nosso Wiki&lt;/a&gt;.&lt;br /&gt;&#xD;
21
  &lt;hr /&gt;&#xD;
22
  This module is available only to Brazil.</description>
23
- <notes>* Corre&#xE7;&#xE3;o de bug na exibi&#xE7;&#xE3;o do rastreador de objetos</notes>
 
24
  <authors><author><name>Willian</name><user>willsouza</user><email>williancordeirodesouza@gmail.com</email></author></authors>
25
- <date>2013-04-27</date>
26
- <time>02:12:13</time>
27
- <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="bd6ee1f366902a4d202b48357fb3ca70"/><file name="Webservice.php" hash="79c7b0d57285e94b82b1c47521da3675"/></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="36060a936ec137400232886f11483783"/><file name="system.xml" hash="e5873a80b24f0234ffe30194baf6765b"/></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="614f83b94693fbb2e05f85ed6030d6d0"/></dir></target><target name="mageetc"><dir name="modules"><file name="Storm_Correios.xml" hash="93aa3a9938657131b77fa2a2e60abd71"/></dir></target></contents>
28
  <compatible/>
29
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
30
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>correios</name>
4
+ <version>1.1.5</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL 3.0</license>
7
  <channel>community</channel>
20
  Caso tenha d&#xFA;vida de como instalar e configurar o m&#xF3;dulo &lt;a href="https://bitbucket.org/willcs/correios/wiki"&gt;acesse nosso Wiki&lt;/a&gt;.&lt;br /&gt;&#xD;
21
  &lt;hr /&gt;&#xD;
22
  This module is available only to Brazil.</description>
23
+ <notes>* Corre&#xE7;&#xE3;o de bug na passagem de par&#xE2;metros para fun&#xE7;&#xE3;o de requisi&#xE7;&#xE3;o do webservice&#xD;
24
+ * Adicionado op&#xE7;&#xE3;o de aviso de recebimento</notes>
25
  <authors><author><name>Willian</name><user>willsouza</user><email>williancordeirodesouza@gmail.com</email></author></authors>
26
+ <date>2013-05-24</date>
27
+ <time>02:10:10</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="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="25c7dd9d1cd372c64809111649bc005a"/></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="36060a936ec137400232886f11483783"/><file name="system.xml" hash="bc75566617251c41704332a9bdea3f97"/></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="e01a2a989f734adceb76d204d4514952"/></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>