Bertholdo_Entrega - Version 1.0.2

Version Notes

Inserting the routine cleaning of the range table of ceps

Inserção da rotina de limpeza da tabela de range de ceps

Download this release

Release Info

Developer Luciano Albis
Extension Bertholdo_Entrega
Version 1.0.2
Comparing to
See all releases


Code changes from version 1.0.1 to 1.0.2

app/code/community/Bertholdo/Entrega/controllers/Adminhtml/EntregarangecepController.php CHANGED
@@ -38,7 +38,7 @@ class Bertholdo_Entrega_Adminhtml_EntregarangecepController extends Mage_Adminht
38
  {
39
  if ($this->getRequest()->getPost())
40
  {
41
- if( !empty($csvRangeCeps) && ( ($tipoFile == "text/csv") || ($tipoFile == "application/vnd.ms-excel") ) )
42
  {
43
  // SALVANDO O ARQUIVO
44
 
@@ -81,6 +81,10 @@ class Bertholdo_Entrega_Adminhtml_EntregarangecepController extends Mage_Adminht
81
  Mage::getSingleton('adminhtml/session')->addError($message);
82
  }
83
 
 
 
 
 
84
  // ATUALIZANDO PRODUTOS
85
 
86
  $qtdLinhas = count($linhasFile);
@@ -98,8 +102,8 @@ class Bertholdo_Entrega_Adminhtml_EntregarangecepController extends Mage_Adminht
98
  $peso_fim = $linhasFile[$i][3];
99
  $valor_compra = $linhasFile[$i][4];
100
  $valor_sem_desc = $linhasFile[$i][5];
101
- $valor_com_desc = $linhasFile[$i][6];
102
-
103
  // ATUALIZANDO OS RANGES DE CEP
104
 
105
  try
38
  {
39
  if ($this->getRequest()->getPost())
40
  {
41
+ if( !empty($csvRangeCeps) && ( ($tipoFile == "text/csv") || ($tipoFile == "application/vnd.ms-excel") || ($tipoFile == "application/csv") ) )
42
  {
43
  // SALVANDO O ARQUIVO
44
 
81
  Mage::getSingleton('adminhtml/session')->addError($message);
82
  }
83
 
84
+ // LIMPANDO A TABELA DE RANGE DE CEPS CASO N�O QUEIRA UTILIZAR OS CEPS EXISTENTES
85
+
86
+ $objBD_write->query("TRUNCATE $entrega_range_cep");
87
+
88
  // ATUALIZANDO PRODUTOS
89
 
90
  $qtdLinhas = count($linhasFile);
102
  $peso_fim = $linhasFile[$i][3];
103
  $valor_compra = $linhasFile[$i][4];
104
  $valor_sem_desc = $linhasFile[$i][5];
105
+ $valor_com_desc = $linhasFile[$i][6];
106
+
107
  // ATUALIZANDO OS RANGES DE CEP
108
 
109
  try
package.xml CHANGED
@@ -1,18 +1,20 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Bertholdo_Entrega</name>
4
- <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>The Brt Delivery module was designed by the company Bertholdo Consulting, in order to help the administrator of the virtual store in the delivery process of their products to customers using its own means of delivery such as a motorcycle courier, car, truck and so on.</summary>
10
  <description>The process is very simple, just generate the CSV file and modify the information of the postal code ranges, if you want to register a new range through the file just enter the information yourself, always remembering to follow the format of the file and importing the same route of administration. We created a video that demonstrates the use of the module following all the necessary steps aiming thus facilitate its use.</description>
11
- <notes>Revised version.</notes>
 
 
12
  <authors><author><name>Luciano Albis</name><user>lucianoalbis</user><email>lucianoalbis@yahoo.com.br</email></author><author><name>Bertholdo Consultoria</name><user>bertholdo</user><email>bertholdo@bertholdo.com.br</email></author></authors>
13
- <date>2014-07-15</date>
14
- <time>15:37:30</time>
15
- <contents><target name="magecommunity"><dir name="Bertholdo"><dir name="Entrega"><dir name="Helper"><file name="Data.php" hash="2a05828134226589b976ee7e974b3ea2"/></dir><dir name="Model"><dir name="Carrier"><file name="EntregaMethod.php" hash="97f80a02a508f3f9017b69e3fa1ddbd1"/></dir></dir><file name="README.TXT" hash="2d35b56344c1de36cb88dbe5dce58d3d"/><dir name="controllers"><dir name="Adminhtml"><file name="EntregarangecepController.php" hash="aa35e0036af36256e0aa18a9701a460d"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="024359bfd80da4325530cfa9e67f0950"/><file name="config.xml" hash="efa284ad00e0331953f6dda8de235454"/><file name="system.xml" hash="62c1aeb333150fe079897916fa0f9879"/></dir><dir name="sql"><dir name="entrega_setup"><file name="mysql4-install-1.0.0.php" hash="cd58c212ebfab44e956e77f1f029cb91"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Bertholdo_Entrega.xml" hash=""/></dir></target><target name="magelocale"><dir name="pt_BR"><file name="Bertholdo_Entrega.csv" hash=""/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="entrega.xml" hash=""/></dir><dir name="template"><dir name="entrega"><file name="entregarangecep.phtml" hash=""/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="Bertholdo"><file name="logo_brtentrega.jpg" hash=""/></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.5</min><max>5.5.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Bertholdo_Entrega</name>
4
+ <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>The Brt Delivery module was designed by the company Bertholdo Consulting, in order to help the administrator of the virtual store in the delivery process of their products to customers using its own means of delivery such as a motorcycle courier, car, truck and so on.</summary>
10
  <description>The process is very simple, just generate the CSV file and modify the information of the postal code ranges, if you want to register a new range through the file just enter the information yourself, always remembering to follow the format of the file and importing the same route of administration. We created a video that demonstrates the use of the module following all the necessary steps aiming thus facilitate its use.</description>
11
+ <notes>Inserting the routine cleaning of the range table of ceps&#xD;
12
+ &#xD;
13
+ Inser&#xE7;&#xE3;o da rotina de limpeza da tabela de range de ceps</notes>
14
  <authors><author><name>Luciano Albis</name><user>lucianoalbis</user><email>lucianoalbis@yahoo.com.br</email></author><author><name>Bertholdo Consultoria</name><user>bertholdo</user><email>bertholdo@bertholdo.com.br</email></author></authors>
15
+ <date>2014-08-08</date>
16
+ <time>15:47:27</time>
17
+ <contents><target name="magecommunity"><dir name="Bertholdo"><dir name="Entrega"><dir name="Helper"><file name="Data.php" hash="2a05828134226589b976ee7e974b3ea2"/></dir><dir name="Model"><dir name="Carrier"><file name="EntregaMethod.php" hash="97f80a02a508f3f9017b69e3fa1ddbd1"/></dir></dir><file name="README.TXT" hash="2d35b56344c1de36cb88dbe5dce58d3d"/><dir name="controllers"><dir name="Adminhtml"><file name="EntregarangecepController.php" hash="a78804edb06090e3c5e661415b8287f0"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="024359bfd80da4325530cfa9e67f0950"/><file name="config.xml" hash="efa284ad00e0331953f6dda8de235454"/><file name="system.xml" hash="62c1aeb333150fe079897916fa0f9879"/></dir><dir name="sql"><dir name="entrega_setup"><file name="mysql4-install-1.0.0.php" hash="cd58c212ebfab44e956e77f1f029cb91"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Bertholdo_Entrega.xml" hash=""/></dir></target><target name="magelocale"><dir name="pt_BR"><file name="Bertholdo_Entrega.csv" hash=""/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="entrega.xml" hash=""/></dir><dir name="template"><dir name="entrega"><file name="entregarangecep.phtml" hash=""/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="Bertholdo"><file name="logo_brtentrega.jpg" hash=""/></dir></dir></dir></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>5.3.5</min><max>5.5.0</max></php></required></dependencies>
20
  </package>