correios - Version 1.0.4

Version Notes

* Correção de bug na exibição do rastreador de objetos

Download this release

Release Info

Developer Willian
Extension correios
Version 1.0.4
Comparing to
See all releases


Code changes from version 1.0.3 to 1.0.4

app/code/community/Storm/Correios/Model/Carrier/Shipping/Tracking.php CHANGED
@@ -82,15 +82,18 @@ class Storm_Correios_Model_Carrier_Shipping_Tracking extends Varien_Object
82
  if(preg_match_all('/<tr.*?>(.*?)<\/tr>/i', $response, $rows)) {
83
  foreach($rows[1] as $row) {
84
  preg_match_all('/<td.*?>(.*?)<\/td>/i', $row, $cols);
85
- list($deliverydate, $deliverytime) = explode(' ', $cols[1][0]);
86
- $deliverydate = new Zend_Date($deliverydate, 'dd/MM/YYYY', new Zend_Locale('pt_BR'));
87
 
88
- $data[] = array(
89
- 'activity' => strip_tags($cols[1][2]),
90
- 'deliverydate' => $deliverydate->toString('YYYY-MM-dd'),
91
- 'deliverytime' => sprintf('%s:00', $deliverytime),
92
- 'deliverylocation' => $cols[1][1]
93
- );
 
 
 
 
 
94
  }
95
 
96
  return $data;
82
  if(preg_match_all('/<tr.*?>(.*?)<\/tr>/i', $response, $rows)) {
83
  foreach($rows[1] as $row) {
84
  preg_match_all('/<td.*?>(.*?)<\/td>/i', $row, $cols);
 
 
85
 
86
+ if(count($cols[1]) > 1) {
87
+ list($deliverydate, $deliverytime) = explode(' ', $cols[1][0]);
88
+ $deliverydate = new Zend_Date($deliverydate, 'dd/MM/YYYY', new Zend_Locale('pt_BR'));
89
+
90
+ $data[] = array(
91
+ 'activity' => strip_tags($cols[1][2]),
92
+ 'deliverydate' => $deliverydate->toString('YYYY-MM-dd'),
93
+ 'deliverytime' => sprintf('%s:00', $deliverytime),
94
+ 'deliverylocation' => $cols[1][1]
95
+ );
96
+ }
97
  }
98
 
99
  return $data;
app/code/community/Storm/Correios/etc/config.xml CHANGED
@@ -11,7 +11,7 @@
11
  <config>
12
  <modules>
13
  <Storm_Correios>
14
- <version>1.0.2</version>
15
  </Storm_Correios>
16
  </modules>
17
 
@@ -95,7 +95,7 @@
95
  <title>Correios</title>
96
  <debug_mode>0</debug_mode>
97
  <showmethod>1</showmethod>
98
- <free_shipping_method>no-free-shipping</free_shipping_method>
99
  <show_deliverytime>1</show_deliverytime>
100
  </correios>
101
  </carriers>
11
  <config>
12
  <modules>
13
  <Storm_Correios>
14
+ <version>1.0.4</version>
15
  </Storm_Correios>
16
  </modules>
17
 
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>
101
  </carriers>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>correios</name>
4
- <version>1.0.3</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,11 @@ 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>* Adicionada op&#xE7;&#xE3;o para n&#xE3;o exibir o prazo de entrega</notes>
24
  <authors><author><name>Willian</name><user>willsouza</user><email>williancordeirodesouza@gmail.com</email></author></authors>
25
- <date>2013-04-26</date>
26
- <time>01:39:21</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="6eb85dafb65d4d35bbf36a609905aae7"/></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="2c44532bab3a88901458f87e0addb250"/><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.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
  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>