Andreani - Version 0.1.11

Version Notes

Release Version 0.1.11

Fix:

- Metodos de calcular envio: completo, medio, basico

- Posibilidad de seleccionar el peso soportado por el cotizador

- Se pueden crear ordenes desde el admin y calcular el envio con la extension

- Arreglado error que siempre guardaba andreani sucursal

- Si no encuentra sucursal, no permite seleccionar envio a sucursal

- Estado de pedidos dropdown para filtrar enviados, entregados, etc.

- ACL funciona correctamente

- Se guarda la fecha cuando el pedido pasa a estado Entregado

Download this release

Release Info

Developer Gaspar Mac
Extension Andreani
Version 0.1.11
Comparing to
See all releases


Code changes from version 0.1.10 to 0.1.11

Files changed (29) hide show
  1. app/code/community/Ecloud/Andreani/Block/Adminhtml/Config/Edit.php +1 -1
  2. app/code/community/Ecloud/Andreani/Block/Adminhtml/Config/Form/Field/Medida.php +2 -2
  3. app/code/community/Ecloud/Andreani/Block/Adminhtml/Pedidos.php +2 -2
  4. app/code/community/Ecloud/Andreani/Block/Adminhtml/Pedidos/Edit.php +4 -3
  5. app/code/community/Ecloud/Andreani/Block/Adminhtml/Pedidos/Edit/Form.php +26 -24
  6. app/code/community/Ecloud/Andreani/Block/Adminhtml/Pedidos/Edit/Renderer/Button.php +1 -1
  7. app/code/community/Ecloud/Andreani/Block/Adminhtml/Pedidos/Grid.php +25 -3
  8. app/code/community/Ecloud/Andreani/Block/Andreani.php +1 -1
  9. app/code/community/Ecloud/Andreani/Helper/Data.php +1 -1
  10. app/code/community/Ecloud/Andreani/Model/Andreani.php +1 -29
  11. app/code/community/Ecloud/Andreani/Model/Carrier/Andreani.php +118 -74
  12. app/code/community/Ecloud/Andreani/Model/Carrier/Andreaniestandar.php +1 -1
  13. app/code/community/Ecloud/Andreani/Model/Carrier/Andreanisucursal.php +1 -1
  14. app/code/community/Ecloud/Andreani/Model/Carrier/Andreaniurgente.php +1 -1
  15. app/code/community/Ecloud/Andreani/Model/Config/Medida.php +1 -1
  16. app/code/community/Ecloud/Andreani/Model/Config/Metodo.php +39 -0
  17. app/code/community/Ecloud/Andreani/Model/Config/Pesomax.php +39 -0
  18. app/code/community/Ecloud/Andreani/Model/Config/TestMode.php +1 -1
  19. app/code/community/Ecloud/Andreani/Model/Observer.php +40 -6
  20. app/code/community/Ecloud/Andreani/Model/Order.php +1 -1
  21. app/code/community/Ecloud/Andreani/Model/Resource/Order.php +1 -1
  22. app/code/community/Ecloud/Andreani/Model/Resource/Order/Collection.php +1 -1
  23. app/code/community/Ecloud/Andreani/controllers/Adminhtml/Pedidos/PedidosController.php +1 -1
  24. app/code/community/Ecloud/Andreani/controllers/Adminhtml/PedidosController.php +17 -2
  25. app/code/community/Ecloud/Andreani/etc/config.xml +141 -130
  26. app/code/community/Ecloud/Andreani/etc/system.xml +24 -0
  27. app/code/community/Ecloud/Andreani/sql/andreani_setup/mysql4-upgrade-0.1.10-0.1.11.php +15 -0
  28. app/etc/modules/Ecloud_Andreani.xml +1 -1
  29. package.xml +17 -12
app/code/community/Ecloud/Andreani/Block/Adminhtml/Config/Edit.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * @version 0.1.10 04.08.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
1
  <?php
2
  /**
3
+ * @version 0.1.11 09.10.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
app/code/community/Ecloud/Andreani/Block/Adminhtml/Config/Form/Field/Medida.php CHANGED
@@ -1,13 +1,13 @@
1
  <?php
2
  /**
3
- * @version 0.1.10 04.08.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
7
  ?>
8
  <?php
9
  /**
10
- * @version 0.1.10 04.08.2014
11
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
12
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
13
  */
1
  <?php
2
  /**
3
+ * @version 0.1.11 09.10.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
7
  ?>
8
  <?php
9
  /**
10
+ * @version 0.1.11 09.10.2014
11
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
12
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
13
  */
app/code/community/Ecloud/Andreani/Block/Adminhtml/Pedidos.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * @version 0.1.10 04.08.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
@@ -11,7 +11,7 @@ class Ecloud_Andreani_Block_Adminhtml_Pedidos extends Mage_Adminhtml_Block_Widge
11
  {
12
  $this->_blockGroup = 'andreani';
13
  $this->_controller = 'adminhtml_pedidos';
14
- $this->_headerText = Mage::helper('adminhtml')->__('Estado de Pedidos');
15
 
16
  parent::__construct();
17
  $this->_removeButton('add');
1
  <?php
2
  /**
3
+ * @version 0.1.11 09.10.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
11
  {
12
  $this->_blockGroup = 'andreani';
13
  $this->_controller = 'adminhtml_pedidos';
14
+ $this->_headerText = Mage::helper('adminhtml')->__('Estado de Pedidos de Andreani');
15
 
16
  parent::__construct();
17
  $this->_removeButton('add');
app/code/community/Ecloud/Andreani/Block/Adminhtml/Pedidos/Edit.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * @version 0.1.10 04.08.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
@@ -20,9 +20,10 @@ class Ecloud_Andreani_Block_Adminhtml_Pedidos_Edit extends Mage_Adminhtml_Block_
20
  //define the label for the save and delete button
21
  $this->_headerText = Mage::helper('andreani')->__('Edit Form');
22
 
23
- //$this->_updateButton('save', 'label','Guardar');
 
24
  //$this->_updateButton('delete', 'label', 'Delete');
25
- $this->_removeButton('save');
26
  $this->_removeButton('reset');
27
  $this->_removeButton('delete');
28
 
1
  <?php
2
  /**
3
+ * @version 0.1.11 09.10.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
20
  //define the label for the save and delete button
21
  $this->_headerText = Mage::helper('andreani')->__('Edit Form');
22
 
23
+ $this->_updateButton('save', 'label', Mage::helper('andreani')->__('Guardar'));
24
+
25
  //$this->_updateButton('delete', 'label', 'Delete');
26
+ //$this->_removeButton('save');
27
  $this->_removeButton('reset');
28
  $this->_removeButton('delete');
29
 
app/code/community/Ecloud/Andreani/Block/Adminhtml/Pedidos/Edit/Form.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * @version 0.1.10 04.08.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
@@ -15,119 +15,111 @@ class Ecloud_Andreani_Block_Adminhtml_Pedidos_Edit_Form extends Mage_Adminhtml_B
15
  array(
16
  'id' => 'edit_form',
17
  'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
18
- 'method' => 'post'
 
19
  ));
20
 
21
- $form = new Varien_Data_Form();
22
  $this->setForm($form);
 
23
  $fieldset = $form->addFieldset('edit_form', array('legend'=>Mage::helper('andreani')->__('Datos del pedido')));
24
 
 
 
 
 
 
 
 
25
  $fieldset->addField('nombre', 'text', array(
26
  'label' => Mage::helper('andreani')->__('Nombre de Cliente'),
27
  'required' => false,
28
  'name' => 'nombre',
29
- 'readonly' => true,
30
  ));
31
 
32
  $fieldset->addField('apellido', 'text', array(
33
  'label' => Mage::helper('andreani')->__('Apellido'),
34
  'required' => false,
35
  'name' => 'apellido',
36
- 'readonly' => true,
37
- 'tabindex' => 1,
38
  ));
39
  $fieldset->addField('dni', 'text', array(
40
  'label' => Mage::helper('andreani')->__('DNI'),
41
  'required' => false,
42
  'name' => 'dni',
43
- 'readonly' => true,
44
  ));
45
  $fieldset->addField('telefono', 'text', array(
46
  'label' => Mage::helper('andreani')->__('Telefono'),
47
  'required' => false,
48
  'name' => 'telefono',
49
- 'readonly' => true,
50
  ));
51
  $fieldset->addField('email', 'text', array(
52
  'label' => Mage::helper('andreani')->__('E-mail'),
53
  'required' => false,
54
  'name' => 'email',
55
- 'readonly' => true,
56
  ));
57
 
58
  $fieldset->addField('provincia', 'text', array(
59
  'label' => Mage::helper('andreani')->__('Provincia'),
60
  'required' => false,
61
  'name' => 'provincia',
62
- 'readonly' => true,
63
  ));
64
  $fieldset->addField('localidad', 'text', array(
65
  'label' => Mage::helper('andreani')->__('Localidad'),
66
  'required' => false,
67
  'name' => 'localidad',
68
- 'readonly' => true,
69
  ));
70
  $fieldset->addField('cp_destino', 'text', array(
71
  'label' => Mage::helper('andreani')->__('Codigo postal'),
72
  'required' => false,
73
  'name' => 'cp_destino',
74
- 'readonly' => true,
75
  ));
76
  $fieldset->addField('direccion', 'text', array(
77
  'label' => Mage::helper('andreani')->__('Direccion'),
78
  'required' => false,
79
  'name' => 'direccion',
80
- 'readonly' => true,
81
  ));
82
 
83
  $fieldset->addField('detalle_productos', 'textarea', array(
84
  'label' => Mage::helper('andreani')->__('Detalle Productos'),
85
  'required' => false,
86
  'name' => 'detalle_productos',
87
- 'readonly' => true,
88
  ));
89
 
90
  $fieldset->addField('valor_declarado', 'text', array(
91
  'label' => Mage::helper('andreani')->__('Valor Declarado'),
92
  'required' => false,
93
  'name' => 'valor_declarado',
94
- 'readonly' => true,
95
  ));
96
  $fieldset->addField('volumen', 'text', array(
97
  'label' => Mage::helper('andreani')->__('Volumen'),
98
  'required' => false,
99
  'name' => 'volumen',
100
- 'readonly' => true,
101
  ));
102
  $fieldset->addField('peso', 'text', array(
103
  'label' => Mage::helper('andreani')->__('Peso'),
104
  'required' => false,
105
  'name' => 'peso',
106
- 'readonly' => true,
107
  ));
108
  $fieldset->addField('categoria_distancia_id', 'text', array(
109
  'label' => Mage::helper('andreani')->__('Categoria Distancia'),
110
  'required' => false,
111
  'name' => 'categoria_distancia_id',
112
- 'readonly' => true,
113
  ));
114
  $fieldset->addField('categoria_peso', 'text', array(
115
  'label' => Mage::helper('andreani')->__('Categoria Peso'),
116
  'required' => false,
117
  'name' => 'categoria_peso',
118
- 'readonly' => true,
119
  ));
120
  $fieldset->addField('precio', 'text', array(
121
  'label' => Mage::helper('andreani')->__('Precio de Envio'),
122
  'required' => false,
123
  'name' => 'precio',
124
- 'readonly' => true,
125
  ));
126
  $fieldset->addField('cliente', 'text', array(
127
  'label' => Mage::helper('andreani')->__('Nro. Cliente Andreani'),
128
  'required' => false,
129
  'name' => 'cliente',
130
- 'readonly' => true,
131
  'sort_order'=> 30,
132
  ));
133
 
@@ -135,7 +127,6 @@ class Ecloud_Andreani_Block_Adminhtml_Pedidos_Edit_Form extends Mage_Adminhtml_B
135
  'label' => Mage::helper('andreani')->__('Contrato Andreani'),
136
  'required' => false,
137
  'name' => 'contrato',
138
- 'readonly' => true,
139
  'sort_order'=> 30,
140
  ));
141
 
@@ -146,19 +137,24 @@ class Ecloud_Andreani_Block_Adminhtml_Pedidos_Edit_Form extends Mage_Adminhtml_B
146
  'readonly' => true,
147
  ));
148
 
 
 
 
 
 
 
149
  $fieldset->addField('recibo_tracking', 'text', array(
150
  'label' => Mage::helper('andreani')->__('Recibo Andreani'),
151
  'required' => false,
152
  'name' => 'recibo_tracking',
153
- 'readonly' => true,
154
  ));
155
 
156
  $fieldset->addField('sucursal_retiro', 'text', array(
157
  'label' => Mage::helper('andreani')->__('Sucursal de Retiro'),
158
  'required' => false,
159
  'name' => 'sucursal_retiro',
160
- 'readonly' => true,
161
  ));
 
162
  $fieldset->addField('estado', 'text', array(
163
  'label' => Mage::helper('andreani')->__('Estado del envio'),
164
  'required' => false,
@@ -175,6 +171,12 @@ class Ecloud_Andreani_Block_Adminhtml_Pedidos_Edit_Form extends Mage_Adminhtml_B
175
  'readonly' => true
176
  ));
177
 
 
 
 
 
 
 
178
  if (Mage::registry('order_data')){
179
  $form->setValues(Mage::registry('order_data')->getData());
180
  }
1
  <?php
2
  /**
3
+ * @version 0.1.11 09.10.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
15
  array(
16
  'id' => 'edit_form',
17
  'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
18
+ 'method' => 'post',
19
+ 'enctype' => 'multipart/form-data'
20
  ));
21
 
22
+ $form->setUseContainer(true);
23
  $this->setForm($form);
24
+
25
  $fieldset = $form->addFieldset('edit_form', array('legend'=>Mage::helper('andreani')->__('Datos del pedido')));
26
 
27
+ $fieldset->addField('order_increment_id', 'text', array(
28
+ 'label' => Mage::helper('andreani')->__('Pedido #'),
29
+ 'required' => false,
30
+ 'name' => 'order_increment_id',
31
+ 'readonly' => true,
32
+ ));
33
+
34
  $fieldset->addField('nombre', 'text', array(
35
  'label' => Mage::helper('andreani')->__('Nombre de Cliente'),
36
  'required' => false,
37
  'name' => 'nombre',
 
38
  ));
39
 
40
  $fieldset->addField('apellido', 'text', array(
41
  'label' => Mage::helper('andreani')->__('Apellido'),
42
  'required' => false,
43
  'name' => 'apellido',
44
+ //'tabindex' => 1,
 
45
  ));
46
  $fieldset->addField('dni', 'text', array(
47
  'label' => Mage::helper('andreani')->__('DNI'),
48
  'required' => false,
49
  'name' => 'dni',
 
50
  ));
51
  $fieldset->addField('telefono', 'text', array(
52
  'label' => Mage::helper('andreani')->__('Telefono'),
53
  'required' => false,
54
  'name' => 'telefono',
 
55
  ));
56
  $fieldset->addField('email', 'text', array(
57
  'label' => Mage::helper('andreani')->__('E-mail'),
58
  'required' => false,
59
  'name' => 'email',
 
60
  ));
61
 
62
  $fieldset->addField('provincia', 'text', array(
63
  'label' => Mage::helper('andreani')->__('Provincia'),
64
  'required' => false,
65
  'name' => 'provincia',
 
66
  ));
67
  $fieldset->addField('localidad', 'text', array(
68
  'label' => Mage::helper('andreani')->__('Localidad'),
69
  'required' => false,
70
  'name' => 'localidad',
 
71
  ));
72
  $fieldset->addField('cp_destino', 'text', array(
73
  'label' => Mage::helper('andreani')->__('Codigo postal'),
74
  'required' => false,
75
  'name' => 'cp_destino',
 
76
  ));
77
  $fieldset->addField('direccion', 'text', array(
78
  'label' => Mage::helper('andreani')->__('Direccion'),
79
  'required' => false,
80
  'name' => 'direccion',
 
81
  ));
82
 
83
  $fieldset->addField('detalle_productos', 'textarea', array(
84
  'label' => Mage::helper('andreani')->__('Detalle Productos'),
85
  'required' => false,
86
  'name' => 'detalle_productos',
 
87
  ));
88
 
89
  $fieldset->addField('valor_declarado', 'text', array(
90
  'label' => Mage::helper('andreani')->__('Valor Declarado'),
91
  'required' => false,
92
  'name' => 'valor_declarado',
 
93
  ));
94
  $fieldset->addField('volumen', 'text', array(
95
  'label' => Mage::helper('andreani')->__('Volumen'),
96
  'required' => false,
97
  'name' => 'volumen',
 
98
  ));
99
  $fieldset->addField('peso', 'text', array(
100
  'label' => Mage::helper('andreani')->__('Peso'),
101
  'required' => false,
102
  'name' => 'peso',
 
103
  ));
104
  $fieldset->addField('categoria_distancia_id', 'text', array(
105
  'label' => Mage::helper('andreani')->__('Categoria Distancia'),
106
  'required' => false,
107
  'name' => 'categoria_distancia_id',
 
108
  ));
109
  $fieldset->addField('categoria_peso', 'text', array(
110
  'label' => Mage::helper('andreani')->__('Categoria Peso'),
111
  'required' => false,
112
  'name' => 'categoria_peso',
 
113
  ));
114
  $fieldset->addField('precio', 'text', array(
115
  'label' => Mage::helper('andreani')->__('Precio de Envio'),
116
  'required' => false,
117
  'name' => 'precio',
 
118
  ));
119
  $fieldset->addField('cliente', 'text', array(
120
  'label' => Mage::helper('andreani')->__('Nro. Cliente Andreani'),
121
  'required' => false,
122
  'name' => 'cliente',
 
123
  'sort_order'=> 30,
124
  ));
125
 
127
  'label' => Mage::helper('andreani')->__('Contrato Andreani'),
128
  'required' => false,
129
  'name' => 'contrato',
 
130
  'sort_order'=> 30,
131
  ));
132
 
137
  'readonly' => true,
138
  ));
139
 
140
+ $fieldset->addField('cod_tracking', 'text', array(
141
+ 'label' => Mage::helper('andreani')->__('Nro Andreani - Tracking'),
142
+ 'required' => false,
143
+ 'name' => 'cod_tracking',
144
+ ));
145
+
146
  $fieldset->addField('recibo_tracking', 'text', array(
147
  'label' => Mage::helper('andreani')->__('Recibo Andreani'),
148
  'required' => false,
149
  'name' => 'recibo_tracking',
 
150
  ));
151
 
152
  $fieldset->addField('sucursal_retiro', 'text', array(
153
  'label' => Mage::helper('andreani')->__('Sucursal de Retiro'),
154
  'required' => false,
155
  'name' => 'sucursal_retiro',
 
156
  ));
157
+
158
  $fieldset->addField('estado', 'text', array(
159
  'label' => Mage::helper('andreani')->__('Estado del envio'),
160
  'required' => false,
171
  'readonly' => true
172
  ));
173
 
174
+ $fieldset->addField('entrega', 'text', array(
175
+ 'label' => Mage::helper('andreani')->__('Fecha de entrega a Andreani'),
176
+ 'required' => false,
177
+ 'name' => 'entrega',
178
+ ));
179
+
180
  if (Mage::registry('order_data')){
181
  $form->setValues(Mage::registry('order_data')->getData());
182
  }
app/code/community/Ecloud/Andreani/Block/Adminhtml/Pedidos/Edit/Renderer/Button.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * @version 0.1.10 04.08.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
1
  <?php
2
  /**
3
+ * @version 0.1.11 09.10.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
app/code/community/Ecloud/Andreani/Block/Adminhtml/Pedidos/Grid.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * @version 0.1.10 04.08.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
@@ -45,6 +45,14 @@ class Ecloud_Andreani_Block_Adminhtml_Pedidos_Grid extends Mage_Adminhtml_Block_
45
  'type' => 'text'
46
  ));
47
 
 
 
 
 
 
 
 
 
48
  $this->addColumn('nombre', array(
49
  'header' => Mage::helper('andreani')->__('Nombre'),
50
  'sortable' => true,
@@ -115,13 +123,27 @@ class Ecloud_Andreani_Block_Adminhtml_Pedidos_Grid extends Mage_Adminhtml_Block_
115
  'renderer' => 'andreani/adminhtml_Pedidos_Edit_Renderer_button'
116
  ));
117
 
 
 
 
 
 
 
 
 
118
  $this->addColumn('estado', array(
119
  'header' => Mage::helper('andreani')->__('Estado'),
120
  'sortable' => false,
121
  'width' => '5',
122
  'index' => 'estado',
123
- 'type' => 'text',
124
-
 
 
 
 
 
 
125
  ));
126
 
127
  return parent::_prepareColumns();
1
  <?php
2
  /**
3
+ * @version 0.1.11 09.10.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
45
  'type' => 'text'
46
  ));
47
 
48
+ $this->addColumn('order_increment_id', array(
49
+ 'header' => Mage::helper('andreani')->__('# Pedido'),
50
+ 'sortable' => true,
51
+ 'width' => '5',
52
+ 'index' => 'order_increment_id',
53
+ 'type' => 'text'
54
+ ));
55
+
56
  $this->addColumn('nombre', array(
57
  'header' => Mage::helper('andreani')->__('Nombre'),
58
  'sortable' => true,
123
  'renderer' => 'andreani/adminhtml_Pedidos_Edit_Renderer_button'
124
  ));
125
 
126
+ $this->addColumn('entrega', array(
127
+ 'header' => Mage::helper('andreani')->__('Fecha de entrega'),
128
+ 'sortable' => true,
129
+ 'width' => '5',
130
+ 'index' => 'entrega',
131
+ 'type' => 'text'
132
+ ));
133
+
134
  $this->addColumn('estado', array(
135
  'header' => Mage::helper('andreani')->__('Estado'),
136
  'sortable' => false,
137
  'width' => '5',
138
  'index' => 'estado',
139
+ 'type' => 'options',
140
+ 'sortable' => false,
141
+ 'options' => array(
142
+ 'Enviado' => 'Enviado',
143
+ 'Eliminar' => 'Eliminar',
144
+ 'Entregado' => 'Entregado',
145
+ 'Pendiente' => 'Pendiente'
146
+ )
147
  ));
148
 
149
  return parent::_prepareColumns();
app/code/community/Ecloud/Andreani/Block/Andreani.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * @version 0.1.10 04.08.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
1
  <?php
2
  /**
3
+ * @version 0.1.11 09.10.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
app/code/community/Ecloud/Andreani/Helper/Data.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * @version 0.1.10 04.08.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
1
  <?php
2
  /**
3
+ * @version 0.1.11 09.10.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
app/code/community/Ecloud/Andreani/Model/Andreani.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * @version 0.1.10 04.08.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
@@ -11,34 +11,6 @@ class Ecloud_Andreani_Model_Andreani extends Mage_Core_Model_Abstract
11
  {
12
  parent::_construct();
13
  $this->_init('andreani/andreani');
14
-
15
- foreach ($request->getAllItems() as $_item) {
16
- // Tomamos el attr "medida" segun la configuracion del cliente
17
- if (Mage::getStoreConfig('carriers/andreaniconfig/medida',Mage::app()->getStore())=="") {
18
- $datos["medida"] = "gramos";
19
- } else {
20
- $datos["medida"] = Mage::getStoreConfig('carriers/andreaniconfig/medida',Mage::app()->getStore());
21
- }
22
-
23
- if ($datos["medida"]=="kilos") {
24
- $datos["medida"] = 1000;
25
- } elseif ($datos["medida"]=="gramos") {
26
- $datos["medida"] = 1;
27
- } else {
28
- $datos["medida"] = 1; //si está vacio: "gramos"
29
- }
30
- $datos["peso"] = ($_item->getQty() * $_item->getWeight() * $datos["medida"]) + $datos["peso"];
31
- $datos["valorDeclarado"] = ($_item->getQty() * $_item->getPrice()) + $datos["valorDeclarado"];
32
-
33
- $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $_item->getSku(), array('volumen'));
34
- $datos["volumen"] = ($_item->getQty() * $product->getVolumen() * $datos["medida"]) + $datos["volumen"];
35
-
36
- // Creamos un string con el detalle de cada producto
37
- $datos["DetalleProductos"] = "(" . $_item->getQty() . ") " .$_item->getName() . " + " . $datos["DetalleProductos"];
38
- }
39
-
40
- die(var_dump($datos["volumen"]));
41
-
42
  }
43
 
44
  }
1
  <?php
2
  /**
3
+ * @version 0.1.11 09.10.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
11
  {
12
  parent::_construct();
13
  $this->_init('andreani/andreani');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  }
15
 
16
  }
app/code/community/Ecloud/Andreani/Model/Carrier/Andreani.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * @version 0.1.10 04.08.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
@@ -27,6 +27,8 @@
27
  $datos["DetalleProductos"] = "";
28
  $sku = "";
29
  $freeBoxes = 0;
 
 
30
  Mage::getSingleton('core/session')->unsAndreani();
31
 
32
  // Reiniciar variable Sucursales para descachear las Sucursales.
@@ -52,8 +54,9 @@
52
  foreach ($request->getAllItems() as $_item) {
53
  if($sku != $_item->getSku()) {
54
  $sku = $_item->getSku();
 
55
  $datos["peso"] = ($_item->getQty() * $_item->getWeight() * $datos["medida"]) + $datos["peso"];
56
- $datos["valorDeclarado"] = ($_item->getQty() * $_item->getPrice()) + $datos["valorDeclarado"];
57
 
58
  $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $_item->getSku(), array('volumen'));
59
  $datos["volumen"] += ($_item->getQty() * $product->getVolumen() * $datos["medida"]);
@@ -79,10 +82,10 @@
79
  $cart = Mage::getSingleton('checkout/cart');
80
  $quote = $cart->getQuote();
81
  $shippingAddress = $quote->getShippingAddress();
82
- $datos["cpDestino"] = intval($shippingAddress->getPostcode());
83
- $datos["localidad"] = $shippingAddress->getData('city');
84
- $datos["provincia"] = $shippingAddress->getData('region');
85
- $datos["direccion"] = $shippingAddress->getData('street');
86
  $datos["nombre"] = $shippingAddress->getData('firstname');
87
  $datos["apellido"] = $shippingAddress->getData('lastname');
88
  $datos["telefono"] = $shippingAddress->getData('telephone');
@@ -97,42 +100,77 @@
97
  $result = Mage::getModel('shipping/rate_result');
98
  $method = Mage::getModel('shipping/rate_result_method');
99
 
100
- $error_msg = Mage::helper('andreani')->__("Su pedido supera el peso máximo de 50 kg permitido por Andreani. Por favor divida su orden en más pedidos o consulte al administrador de la tienda. Gracias y disculpe las molestias.");
 
 
 
 
 
 
 
 
 
 
 
101
 
102
  if ($this->_code == "andreaniestandar" & Mage::getStoreConfig('carriers/andreaniestandar/active',Mage::app()->getStore()) == 1) {
103
- // En CASAWS -> 50 kg
104
- if($datos["volumen"] >= 50000){
105
  $error = Mage::getModel('shipping/rate_result_error');
106
  $error->setCarrier($this->_code);
107
  $error->setCarrierTitle($this->getConfigData('title'));
108
  $error->setErrorMessage($error_msg);
109
  return $error;
110
  } else {
111
- $result->append($this->_getAndreaniEstandar($datos,$request));
 
 
 
 
 
 
 
 
 
112
  }
113
  }
114
  if ($this->_code == "andreaniurgente" & Mage::getStoreConfig('carriers/andreaniurgente/active',Mage::app()->getStore()) == 1) {
115
- // En CASAWS -> 50 kg
116
- if($datos["volumen"] >= 50000){
117
  $error = Mage::getModel('shipping/rate_result_error');
118
  $error->setCarrier($this->_code);
119
  $error->setCarrierTitle($this->getConfigData('title'));
120
  $error->setErrorMessage($error_msg);
121
  return $error;
122
  } else {
123
- $result->append($this->_getAndreaniUrgente($datos,$request));
 
 
 
 
 
 
 
 
 
124
  }
125
  }
126
  if ($this->_code == "andreanisucursal" & Mage::getStoreConfig('carriers/andreanisucursal/active',Mage::app()->getStore()) == 1) {
127
- // En CASAWS -> 50 kg
128
- if($datos["volumen"] >= 50000){
129
  $error = Mage::getModel('shipping/rate_result_error');
130
  $error->setCarrier($this->_code);
131
  $error->setCarrierTitle($this->getConfigData('title'));
132
  $error->setErrorMessage($error_msg);
133
  return $error;
134
  } else {
135
- $result->append($this->_getAndreaniSucursal($datos,$request));
 
 
 
 
 
 
 
 
 
136
  }
137
  }
138
 
@@ -164,20 +202,15 @@
164
  $datos["urlSucursal"] = 'https://www.e-andreani.com/CASAWS/ecommerce/ConsultaSucursales.svc?wsdl';
165
  }
166
 
167
- // Buscamos la sucursal mas cercana del cliente segun el CP ingresado
168
- $sucursales = $this->consultarSucursales($datos,"estandar");
169
- $datos["sucursalRetiro"]= $sucursales->Sucursal;
170
- $datos["DireccionSucursal"] = $sucursales->Direccion;
171
-
172
  // Buscamos en eAndreani el costo del envio segun los parametros enviados
173
  $datos["precio"] = $this->cotizarEnvio($datos);
174
  $datos["CategoriaDistanciaId"] = $this->envio->CategoriaDistanciaId;
175
  $datos["CategoriaPeso"] = $this->envio->CategoriaPeso;
176
 
177
- Mage::getSingleton('core/session')->setAndreani($datos);
178
 
179
  if ($datos["precio"] == 0) {
180
- $texto = "Error en la conexión con eAndreani. Por favor chequear los datos ingresados en la información de envio.";
181
  } else {
182
  $texto = Mage::getStoreConfig('carriers/andreaniestandar/description',Mage::app()->getStore()) . " {$this->envio->CategoriaDistancia}.";
183
  }
@@ -225,20 +258,15 @@
225
  $datos["urlSucursal"] = 'https://www.e-andreani.com/CASAWS/ecommerce/ConsultaSucursales.svc?wsdl';
226
  }
227
 
228
- // Buscamos la sucursal mas cercana del cliente segun el CP ingresado
229
- $sucursales = $this->consultarSucursales($datos,"urgente");
230
- $datos["sucursalRetiro"]= $sucursales->Sucursal;
231
- $datos["DireccionSucursal"] = $sucursales->Direccion;
232
-
233
  // Buscamos en eAndreani el costo del envio segun los parametros enviados
234
  $datos["precio"] = $this->cotizarEnvio($datos);
235
  $datos["CategoriaDistanciaId"] = $this->envio->CategoriaDistanciaId;
236
  $datos["CategoriaPeso"] = $this->envio->CategoriaPeso;
237
 
238
- Mage::getSingleton('core/session')->setAndreani($datos);
239
 
240
  if ($datos["precio"] == 0) {
241
- $texto = "Error en la conexión con eAndreani. Por favor chequear los datos ingresados en la información de envio.";
242
  } else {
243
  $texto = Mage::getStoreConfig('carriers/andreaniurgente/description',Mage::app()->getStore()) . " {$this->envio->CategoriaDistancia}.";
244
  }
@@ -275,6 +303,7 @@
275
  $rate->setCarrier($this->_code);
276
  $rate->setCarrierTitle("Andreani");
277
  $rate->setMethod($this->_code);
 
278
 
279
  $datos["contrato"] = Mage::getStoreConfig('carriers/andreanisucursal/contrato',Mage::app()->getStore());
280
 
@@ -287,7 +316,12 @@
287
  }
288
 
289
  // Buscamos la sucursal mas cercana del cliente segun el CP ingresado
290
- $sucursales = $this->consultarSucursales($datos,"sucursal");
 
 
 
 
 
291
  $datos["sucursalRetiro"]= $sucursales->Sucursal;
292
  $datos["DireccionSucursal"] = $sucursales->Direccion;
293
 
@@ -295,15 +329,19 @@
295
  $datos["precio"] = $this->cotizarEnvio($datos);
296
 
297
  if ($datos["precio"] == 0) {
298
- $texto = "Error en la conexión con eAndreani. Por favor chequear los datos ingresados en la información de envio.";
299
  } else {
300
- $texto = Mage::getStoreConfig('carriers/andreanisucursal/description',Mage::app()->getStore()) . " {$sucursales->Descripcion} ({$sucursales->Direccion}). Estas a {$this->distancia_final_txt} {$this->mode} ({$this->duracion_final}).";
 
 
 
 
301
  }
302
 
303
  $datos["CategoriaDistanciaId"] = $this->envio->CategoriaDistanciaId;
304
  $datos["CategoriaPeso"] = $this->envio->CategoriaPeso;
305
 
306
- Mage::getSingleton('core/session')->setAndreani($datos);
307
 
308
  $rate->setMethodTitle($texto);
309
 
@@ -383,6 +421,8 @@
383
  * @return $costoEnvio
384
  */
385
  public function consultarSucursales($params,$metodo) {
 
 
386
  try {
387
  // Nos fijamos si ya consultamos la sucursal en Andreani
388
  if(is_object(Mage::getSingleton('core/session')->getSucursales())) {
@@ -414,7 +454,6 @@
414
  $client = new SoapClient($params["urlSucursal"], $options);
415
  $client->__setSoapHeaders(array($wsse_header));
416
 
417
- if ($params["cpDestino"] == "") { $params["cpDestino"] = "00000000"; }
418
  $phpresponse = $client->ConsultarSucursales(array(
419
  'consulta' => array(
420
  'CodigoPostal' => $params["cpDestino"],
@@ -426,64 +465,69 @@
426
  Mage::log("Entra si encuentra el CP");
427
  // Si no tenemos la direccion del cliente pero SI el CP, deberia mostrarnos la sucursal de nuestra localidad sin calcular la distancia a la misma.
428
  $sucursales = $phpresponse->ConsultarSucursalesResult->ResultadoConsultarSucursales;
429
- if ($this->_code == "andreanisucursal") { $sucursales = $this->distancematrix(array('0' => $sucursales),$params["direccion"],$params["localidad"],$params["provincia"]); }
 
 
430
  } else {
431
- Mage::log("No encontro el CP y busca por localidad: " . $params["localidad"]);
432
- $phpresponse = $client->ConsultarSucursales(array(
433
- 'consulta' => array(
434
- 'CodigoPostal' => NULL,
435
- 'Localidad' => $params["localidad"],
436
- 'Provincia' => NULL
437
- )));
438
- if (is_object($phpresponse->ConsultarSucursalesResult->ResultadoConsultarSucursales) OR is_array($phpresponse->ConsultarSucursalesResult->ResultadoConsultarSucursales)) {
439
- Mage::log("Encontro localidad");
440
- $sucursales = $phpresponse->ConsultarSucursalesResult->ResultadoConsultarSucursales;
441
- if (is_array($sucursales)) {
442
- Mage::log("Encontro mas de una localidad");
443
- // Consultamos por "localidad" y encontro varios resultados
444
- // buscamos en GoogleAPI cual es la sucursal mas cercana segun la direccion del cliente
445
- $sucursales = $this->distancematrix($sucursales,$params["direccion"],$params["localidad"],$params["provincia"]);
446
- } else {
447
- if ($this->_code == "andreanisucursal") { $sucursales = $this->distancematrix(array('0' => $sucursales),$params["direccion"],$params["localidad"],$params["provincia"]); }
448
- }
449
  } else {
450
- Mage::log("No encontro la localidad busca por provincia");
451
- if ($params["provincia"]=="") {
452
- $params["provincia"] = NULL;
453
- Mage::log("Entra si la provincia esta vacia");
454
- }
455
  $phpresponse = $client->ConsultarSucursales(array(
456
  'consulta' => array(
457
  'CodigoPostal' => NULL,
458
- 'Localidad' => NULL,
459
- 'Provincia' => $params["provincia"]
460
  )));
461
-
462
-
463
  if (is_object($phpresponse->ConsultarSucursalesResult->ResultadoConsultarSucursales) OR is_array($phpresponse->ConsultarSucursalesResult->ResultadoConsultarSucursales)) {
464
- Mage::log("Encontro sucursales en la provincia. Si está vacia.. nos trae todas las provincias");
465
  $sucursales = $phpresponse->ConsultarSucursalesResult->ResultadoConsultarSucursales;
466
  if (is_array($sucursales)) {
467
- Mage::log("Encontro muchas sucursales en la provincia");
468
- // Consultamos por "provincia" y encontro varios resultados
469
  // buscamos en GoogleAPI cual es la sucursal mas cercana segun la direccion del cliente
470
- $sucursales = $this->distancematrix($sucursales,$params["direccion"],$params["localidad"],$params["provincia"]);
471
  } else {
472
  if ($this->_code == "andreanisucursal") { $sucursales = $this->distancematrix(array('0' => $sucursales),$params["direccion"],$params["localidad"],$params["provincia"]); }
473
  }
474
  } else {
475
- Mage::log("No encontro la provincia y busca todas las localidades para determinar la mas cercana");
476
- // buscar todas las sucursales
477
- // buscamos en GoogleAPI cual es la sucursal mas cercana segun la direccion del cliente
 
 
478
  $phpresponse = $client->ConsultarSucursales(array(
479
  'consulta' => array(
480
  'CodigoPostal' => NULL,
481
  'Localidad' => NULL,
482
- 'Provincia' => NULL
483
  )));
484
- $sucursales = $phpresponse->ConsultarSucursalesResult->ResultadoConsultarSucursales;
485
 
486
- $sucursales = $this->distancematrix($sucursales,$params["direccion"],$params["localidad"],$params["provincia"]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
487
  }
488
  }
489
  }
@@ -580,4 +624,4 @@
580
  }
581
 
582
  }
583
- ?>
1
  <?php
2
  /**
3
+ * @version 0.1.11 09.10.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
27
  $datos["DetalleProductos"] = "";
28
  $sku = "";
29
  $freeBoxes = 0;
30
+ $pesoMaximo = Mage::getStoreConfig('carriers/andreaniconfig/pesomax',Mage::app()->getStore());
31
+
32
  Mage::getSingleton('core/session')->unsAndreani();
33
 
34
  // Reiniciar variable Sucursales para descachear las Sucursales.
54
  foreach ($request->getAllItems() as $_item) {
55
  if($sku != $_item->getSku()) {
56
  $sku = $_item->getSku();
57
+ $price = floor($_item->getPrice());
58
  $datos["peso"] = ($_item->getQty() * $_item->getWeight() * $datos["medida"]) + $datos["peso"];
59
+ $datos["valorDeclarado"] = ($_item->getQty() * $price) + $datos["valorDeclarado"];
60
 
61
  $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $_item->getSku(), array('volumen'));
62
  $datos["volumen"] += ($_item->getQty() * $product->getVolumen() * $datos["medida"]);
82
  $cart = Mage::getSingleton('checkout/cart');
83
  $quote = $cart->getQuote();
84
  $shippingAddress = $quote->getShippingAddress();
85
+ $datos["cpDestino"] = intval($request->getDestPostcode());
86
+ $datos["localidad"] = $request->getDestCity();
87
+ $datos["provincia"] = $request->getDestRegionCode();
88
+ $datos["direccion"] = $request->getDestStreet();
89
  $datos["nombre"] = $shippingAddress->getData('firstname');
90
  $datos["apellido"] = $shippingAddress->getData('lastname');
91
  $datos["telefono"] = $shippingAddress->getData('telephone');
100
  $result = Mage::getModel('shipping/rate_result');
101
  $method = Mage::getModel('shipping/rate_result_method');
102
 
103
+ $error_msg = Mage::helper('andreani')->__("Completá los datos para poder calcular el costo de su pedido.");
104
+
105
+ // Optimizacion con OneStepCheckout
106
+ if ($datos["cpDestino"]=="" && $datos["localidad"]=="" && $datos["provincia"]=="" && $datos["direccion"]=="") {
107
+ $error = Mage::getModel('shipping/rate_result_error');
108
+ $error->setCarrier($this->_code);
109
+ $error->setCarrierTitle($this->getConfigData('title'));
110
+ $error->setErrorMessage($error_msg);
111
+ return $error;
112
+ }
113
+
114
+ $error_msg = Mage::helper('andreani')->__("Su pedido supera el peso máximo permitido por Andreani. Por favor divida su orden en más pedidos o consulte al administrador de la tienda. Gracias y disculpe las molestias.");
115
 
116
  if ($this->_code == "andreaniestandar" & Mage::getStoreConfig('carriers/andreaniestandar/active',Mage::app()->getStore()) == 1) {
117
+ if($datos["volumen"] >= $pesoMaximo){
 
118
  $error = Mage::getModel('shipping/rate_result_error');
119
  $error->setCarrier($this->_code);
120
  $error->setCarrierTitle($this->getConfigData('title'));
121
  $error->setErrorMessage($error_msg);
122
  return $error;
123
  } else {
124
+ $response = $this->_getAndreaniEstandar($datos,$request);
125
+ if(is_string($response)){
126
+ $error = Mage::getModel('shipping/rate_result_error');
127
+ $error->setCarrier($this->_code);
128
+ $error->setCarrierTitle($this->getConfigData('title'));
129
+ $error->setErrorMessage($response);
130
+ return $error;
131
+ } else {
132
+ $result->append($response);
133
+ }
134
  }
135
  }
136
  if ($this->_code == "andreaniurgente" & Mage::getStoreConfig('carriers/andreaniurgente/active',Mage::app()->getStore()) == 1) {
137
+ if($datos["volumen"] >= $pesoMaximo){
 
138
  $error = Mage::getModel('shipping/rate_result_error');
139
  $error->setCarrier($this->_code);
140
  $error->setCarrierTitle($this->getConfigData('title'));
141
  $error->setErrorMessage($error_msg);
142
  return $error;
143
  } else {
144
+ $response = $this->_getAndreaniUrgente($datos,$request);
145
+ if(is_string($response)){
146
+ $error = Mage::getModel('shipping/rate_result_error');
147
+ $error->setCarrier($this->_code);
148
+ $error->setCarrierTitle($this->getConfigData('title'));
149
+ $error->setErrorMessage($response);
150
+ return $error;
151
+ } else {
152
+ $result->append($response);
153
+ }
154
  }
155
  }
156
  if ($this->_code == "andreanisucursal" & Mage::getStoreConfig('carriers/andreanisucursal/active',Mage::app()->getStore()) == 1) {
157
+ if($datos["volumen"] >= $pesoMaximo){
 
158
  $error = Mage::getModel('shipping/rate_result_error');
159
  $error->setCarrier($this->_code);
160
  $error->setCarrierTitle($this->getConfigData('title'));
161
  $error->setErrorMessage($error_msg);
162
  return $error;
163
  } else {
164
+ $response = $this->_getAndreaniSucursal($datos,$request);
165
+ if(is_string($response)){
166
+ $error = Mage::getModel('shipping/rate_result_error');
167
+ $error->setCarrier($this->_code);
168
+ $error->setCarrierTitle($this->getConfigData('title'));
169
+ $error->setErrorMessage($response);
170
+ return $error;
171
+ } else {
172
+ $result->append($response);
173
+ }
174
  }
175
  }
176
 
202
  $datos["urlSucursal"] = 'https://www.e-andreani.com/CASAWS/ecommerce/ConsultaSucursales.svc?wsdl';
203
  }
204
 
 
 
 
 
 
205
  // Buscamos en eAndreani el costo del envio segun los parametros enviados
206
  $datos["precio"] = $this->cotizarEnvio($datos);
207
  $datos["CategoriaDistanciaId"] = $this->envio->CategoriaDistanciaId;
208
  $datos["CategoriaPeso"] = $this->envio->CategoriaPeso;
209
 
210
+ Mage::getSingleton('core/session')->setAndreaniEstandar($datos);
211
 
212
  if ($datos["precio"] == 0) {
213
+ return $texto = Mage::helper('andreani')->__("Error en la conexión con Andreani. Por favor chequee los datos ingresados en la información de envio y vuelva a intentar.");
214
  } else {
215
  $texto = Mage::getStoreConfig('carriers/andreaniestandar/description',Mage::app()->getStore()) . " {$this->envio->CategoriaDistancia}.";
216
  }
258
  $datos["urlSucursal"] = 'https://www.e-andreani.com/CASAWS/ecommerce/ConsultaSucursales.svc?wsdl';
259
  }
260
 
 
 
 
 
 
261
  // Buscamos en eAndreani el costo del envio segun los parametros enviados
262
  $datos["precio"] = $this->cotizarEnvio($datos);
263
  $datos["CategoriaDistanciaId"] = $this->envio->CategoriaDistanciaId;
264
  $datos["CategoriaPeso"] = $this->envio->CategoriaPeso;
265
 
266
+ Mage::getSingleton('core/session')->setAndreaniUrgente($datos);
267
 
268
  if ($datos["precio"] == 0) {
269
+ return $texto = Mage::helper('andreani')->__("Error en la conexión con Andreani. Por favor chequee los datos ingresados en la información de envio y vuelva a intentar.");
270
  } else {
271
  $texto = Mage::getStoreConfig('carriers/andreaniurgente/description',Mage::app()->getStore()) . " {$this->envio->CategoriaDistancia}.";
272
  }
303
  $rate->setCarrier($this->_code);
304
  $rate->setCarrierTitle("Andreani");
305
  $rate->setMethod($this->_code);
306
+ $metodo = Mage::getStoreConfig('carriers/andreaniconfig/metodo',Mage::app()->getStore());
307
 
308
  $datos["contrato"] = Mage::getStoreConfig('carriers/andreanisucursal/contrato',Mage::app()->getStore());
309
 
316
  }
317
 
318
  // Buscamos la sucursal mas cercana del cliente segun el CP ingresado
319
+ $sucursales = $this->consultarSucursales($datos,"sucursal");
320
+
321
+ if($sucursales=="nosucursal"){
322
+ return "No hay sucursales cerca de tu domicilio.";
323
+ }
324
+
325
  $datos["sucursalRetiro"]= $sucursales->Sucursal;
326
  $datos["DireccionSucursal"] = $sucursales->Direccion;
327
 
329
  $datos["precio"] = $this->cotizarEnvio($datos);
330
 
331
  if ($datos["precio"] == 0) {
332
+ return $texto = Mage::helper('andreani')->__("Error en la conexión con Andreani. Por favor chequee los datos ingresados en la información de envio y vuelva a intentar.");
333
  } else {
334
+ if($metodo != 'basico'){
335
+ $texto = Mage::getStoreConfig('carriers/andreanisucursal/description',Mage::app()->getStore()) . " {$sucursales->Descripcion} ({$sucursales->Direccion}). Estas a {$this->distancia_final_txt} {$this->mode} ({$this->duracion_final}).";
336
+ }else{
337
+ $texto = Mage::getStoreConfig('carriers/andreanisucursal/description',Mage::app()->getStore()) . " {$sucursales->Descripcion} ({$sucursales->Direccion}).";
338
+ }
339
  }
340
 
341
  $datos["CategoriaDistanciaId"] = $this->envio->CategoriaDistanciaId;
342
  $datos["CategoriaPeso"] = $this->envio->CategoriaPeso;
343
 
344
+ Mage::getSingleton('core/session')->setAndreaniSucursal($datos);
345
 
346
  $rate->setMethodTitle($texto);
347
 
421
  * @return $costoEnvio
422
  */
423
  public function consultarSucursales($params,$metodo) {
424
+
425
+ $metodo = Mage::getStoreConfig('carriers/andreaniconfig/metodo',Mage::app()->getStore());
426
  try {
427
  // Nos fijamos si ya consultamos la sucursal en Andreani
428
  if(is_object(Mage::getSingleton('core/session')->getSucursales())) {
454
  $client = new SoapClient($params["urlSucursal"], $options);
455
  $client->__setSoapHeaders(array($wsse_header));
456
 
 
457
  $phpresponse = $client->ConsultarSucursales(array(
458
  'consulta' => array(
459
  'CodigoPostal' => $params["cpDestino"],
465
  Mage::log("Entra si encuentra el CP");
466
  // Si no tenemos la direccion del cliente pero SI el CP, deberia mostrarnos la sucursal de nuestra localidad sin calcular la distancia a la misma.
467
  $sucursales = $phpresponse->ConsultarSucursalesResult->ResultadoConsultarSucursales;
468
+ if ($this->_code == "andreanisucursal" && ($metodo == 'medio' || $metodo == 'completo') == 1) {
469
+ $sucursales = $this->distancematrix(array('0' => $sucursales),$params["direccion"],$params["localidad"],$params["provincia"]);
470
+ }
471
  } else {
472
+ if($metodo != 'completo'){
473
+ $sucursales = "nosucursal";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
474
  } else {
 
 
 
 
 
475
  $phpresponse = $client->ConsultarSucursales(array(
476
  'consulta' => array(
477
  'CodigoPostal' => NULL,
478
+ 'Localidad' => $params["localidad"],
479
+ 'Provincia' => NULL
480
  )));
 
 
481
  if (is_object($phpresponse->ConsultarSucursalesResult->ResultadoConsultarSucursales) OR is_array($phpresponse->ConsultarSucursalesResult->ResultadoConsultarSucursales)) {
482
+ Mage::log("Encontro localidad");
483
  $sucursales = $phpresponse->ConsultarSucursalesResult->ResultadoConsultarSucursales;
484
  if (is_array($sucursales)) {
485
+ Mage::log("Encontro mas de una localidad");
486
+ // Consultamos por "localidad" y encontro varios resultados
487
  // buscamos en GoogleAPI cual es la sucursal mas cercana segun la direccion del cliente
488
+ $sucursales = $this->distancematrix($sucursales,$params["direccion"],$params["localidad"],$params["provincia"]);
489
  } else {
490
  if ($this->_code == "andreanisucursal") { $sucursales = $this->distancematrix(array('0' => $sucursales),$params["direccion"],$params["localidad"],$params["provincia"]); }
491
  }
492
  } else {
493
+ Mage::log("No encontro la localidad busca por provincia");
494
+ if ($params["provincia"]=="") {
495
+ $params["provincia"] = NULL;
496
+ Mage::log("Entra si la provincia esta vacia");
497
+ }
498
  $phpresponse = $client->ConsultarSucursales(array(
499
  'consulta' => array(
500
  'CodigoPostal' => NULL,
501
  'Localidad' => NULL,
502
+ 'Provincia' => $params["provincia"]
503
  )));
 
504
 
505
+
506
+ if (is_object($phpresponse->ConsultarSucursalesResult->ResultadoConsultarSucursales) OR is_array($phpresponse->ConsultarSucursalesResult->ResultadoConsultarSucursales)) {
507
+ Mage::log("Encontro sucursales en la provincia. Si está vacia.. nos trae todas las provincias");
508
+ $sucursales = $phpresponse->ConsultarSucursalesResult->ResultadoConsultarSucursales;
509
+ if (is_array($sucursales)) {
510
+ Mage::log("Encontro muchas sucursales en la provincia");
511
+ // Consultamos por "provincia" y encontro varios resultados
512
+ // buscamos en GoogleAPI cual es la sucursal mas cercana segun la direccion del cliente
513
+ $sucursales = $this->distancematrix($sucursales,$params["direccion"],$params["localidad"],$params["provincia"]);
514
+ } else {
515
+ if ($this->_code == "andreanisucursal") { $sucursales = $this->distancematrix(array('0' => $sucursales),$params["direccion"],$params["localidad"],$params["provincia"]); }
516
+ }
517
+ } else {
518
+ Mage::log("No encontro la provincia y busca todas las localidades para determinar la mas cercana");
519
+ // buscar todas las sucursales
520
+ // buscamos en GoogleAPI cual es la sucursal mas cercana segun la direccion del cliente
521
+ $phpresponse = $client->ConsultarSucursales(array(
522
+ 'consulta' => array(
523
+ 'CodigoPostal' => NULL,
524
+ 'Localidad' => NULL,
525
+ 'Provincia' => NULL
526
+ )));
527
+ $sucursales = $phpresponse->ConsultarSucursalesResult->ResultadoConsultarSucursales;
528
+
529
+ $sucursales = $this->distancematrix($sucursales,$params["direccion"],$params["localidad"],$params["provincia"]);
530
+ }
531
  }
532
  }
533
  }
624
  }
625
 
626
  }
627
+ ?>
app/code/community/Ecloud/Andreani/Model/Carrier/Andreaniestandar.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * @version 0.1.10 04.08.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
1
  <?php
2
  /**
3
+ * @version 0.1.11 09.10.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
app/code/community/Ecloud/Andreani/Model/Carrier/Andreanisucursal.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * @version 0.1.10 04.08.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
1
  <?php
2
  /**
3
+ * @version 0.1.11 09.10.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
app/code/community/Ecloud/Andreani/Model/Carrier/Andreaniurgente.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * @version 0.1.10 04.08.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
1
  <?php
2
  /**
3
+ * @version 0.1.11 09.10.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
app/code/community/Ecloud/Andreani/Model/Config/Medida.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * @version 0.1.10 04.08.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
1
  <?php
2
  /**
3
+ * @version 0.1.11 09.10.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
app/code/community/Ecloud/Andreani/Model/Config/Metodo.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @version 0.1.11 09.10.2014
4
+ * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
+ * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
+ */
7
+ ?><?php
8
+ class Ecloud_Andreani_Model_Config_Metodo
9
+ {
10
+
11
+ /**
12
+ * Options getter
13
+ *
14
+ * @return array
15
+ */
16
+ public function toOptionArray()
17
+ {
18
+ return array(
19
+ array('value' => 'basico', 'label'=>Mage::helper('adminhtml')->__('Básico')),
20
+ array('value' => 'medio', 'label'=>Mage::helper('adminhtml')->__('Medio')),
21
+ array('value' => 'completo', 'label'=>Mage::helper('adminhtml')->__('Completo')),
22
+ );
23
+ }
24
+
25
+ /**
26
+ * Get options in "key-value" format
27
+ *
28
+ * @return array
29
+ */
30
+ public function toArray()
31
+ {
32
+ return array(
33
+ 'basico' => Mage::helper('adminhtml')->__('Básico'),
34
+ 'medio' => Mage::helper('adminhtml')->__('Medio'),
35
+ 'completo' => Mage::helper('adminhtml')->__('Completo'),
36
+ );
37
+ }
38
+
39
+ }
app/code/community/Ecloud/Andreani/Model/Config/Pesomax.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @version 0.1.11 09.10.2014
4
+ * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
+ * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
+ */
7
+ ?><?php
8
+ class Ecloud_Andreani_Model_Config_Pesomax
9
+ {
10
+
11
+ /**
12
+ * Options getter
13
+ *
14
+ * @return array
15
+ */
16
+ public function toOptionArray()
17
+ {
18
+ return array(
19
+ array('value' => '30000', 'label'=>Mage::helper('adminhtml')->__('30 Kg')),
20
+ array('value' => '50000', 'label'=>Mage::helper('adminhtml')->__('50 Kg')),
21
+ array('value' => '100000', 'label'=>Mage::helper('adminhtml')->__('100 Kg')),
22
+ );
23
+ }
24
+
25
+ /**
26
+ * Get options in "key-value" format
27
+ *
28
+ * @return array
29
+ */
30
+ public function toArray()
31
+ {
32
+ return array(
33
+ '30000' => Mage::helper('adminhtml')->__('30 Kg'),
34
+ '50000' => Mage::helper('adminhtml')->__('50 Kg'),
35
+ '100000' => Mage::helper('adminhtml')->__('100 Kg'),
36
+ );
37
+ }
38
+
39
+ }
app/code/community/Ecloud/Andreani/Model/Config/TestMode.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * @version 0.1.10 04.08.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
1
  <?php
2
  /**
3
+ * @version 0.1.11 09.10.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
app/code/community/Ecloud/Andreani/Model/Observer.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * @version 0.1.10 04.08.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
@@ -19,14 +19,33 @@ class Ecloud_Andreani_Model_Observer extends Mage_Core_Model_Session_Abstract {
19
  public function andreaniObserver($observer) {
20
  try {
21
  // 1. Tomamos todos los datos de la orden
22
- $datos = Mage::getSingleton('core/session')->getAndreani();
 
 
 
 
 
 
 
 
 
 
 
23
 
24
- Mage::log("Datos observer" . print_r($datos,true));
25
- // 2. Buscamos el ID de la orden
 
 
 
 
 
26
  $OrderId = $observer->getEvent()->getOrder()->getId();
 
 
27
  // 3. Los almacenamos en la tabla "andreani_order"
28
  $_dataSave = (array(
29
  'id_orden' => intval($OrderId),
 
30
  'contrato' => $datos["contrato"],
31
  'cliente' => $datos["cliente"],
32
  'direccion' => $datos["direccion"],
@@ -139,7 +158,7 @@ Mage::log("Datos a guardar" . print_r($_dataSave,true));
139
  'NumeroCelular' => $datos["telefono"],
140
  'NumeroDocumento' => $datos["dni"],
141
  'NumeroTelefono' => $datos["telefono"],
142
- 'NumeroTransaccion' => "Transacción nro: " . $datos["id_orden"],
143
  'Peso' => $datos["peso"],
144
  'Piso' => NULL,
145
  'Provincia' => $datos["provincia"],
@@ -159,7 +178,7 @@ Mage::log("Datos a guardar" . print_r($_dataSave,true));
159
  ->setCarrierCode('andreani') //carrier code
160
  ->setTitle('Andreani');
161
  $shipment->addTrack($track);
162
-
163
  //Enviamos numero Andreani, nos devolvera el url de la constancia que lo almacenaremos en la tabla andreani_order.
164
  $NroAndreani = $phpresponse->ConfirmarCompraResult->NumeroAndreani;
165
  $constanciaResponse = $client->ImprimirConstancia(array(
@@ -182,5 +201,20 @@ Mage::log("Datos a guardar" . print_r($_dataSave,true));
182
 
183
  }
184
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  }
186
  ?>
1
  <?php
2
  /**
3
+ * @version 0.1.11 09.10.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
19
  public function andreaniObserver($observer) {
20
  try {
21
  // 1. Tomamos todos los datos de la orden
22
+ //fix. seteamos el contrato correcto
23
+ $metodoenvio = $observer->getEvent()->getOrder()->getShippingMethod();
24
+ if($metodoenvio == 'andreaniestandar_andreaniestandar'){
25
+ $datos = Mage::getSingleton('core/session')->getAndreaniEstandar();
26
+ }
27
+ if($metodoenvio == 'andreaniurgente_andreaniurgente'){
28
+ $datos = Mage::getSingleton('core/session')->getAndreaniUrgente();
29
+ }
30
+ if($metodoenvio == 'andreanisucursal_andreanisucursal'){
31
+ $datos = Mage::getSingleton('core/session')->getAndreaniSucursal();
32
+ }
33
+
34
 
35
+ // fix. setteamos datos de ship porque si la orden viene de admin, vienen vacios
36
+ $ship = $observer->getEvent()->getOrder()->getShippingAddress();
37
+ $datos["nombre"] = $ship->getFirstname();
38
+ $datos["apellido"] = $ship->getLastname();
39
+ $datos["telefono"] = $ship->getTelephone();
40
+
41
+ // 2. Buscamos el ID de la orden y increment id
42
  $OrderId = $observer->getEvent()->getOrder()->getId();
43
+ $OrderIncId = $observer->getEvent()->getOrder()->getIncrementId();
44
+
45
  // 3. Los almacenamos en la tabla "andreani_order"
46
  $_dataSave = (array(
47
  'id_orden' => intval($OrderId),
48
+ 'order_increment_id' => intval($OrderIncId),
49
  'contrato' => $datos["contrato"],
50
  'cliente' => $datos["cliente"],
51
  'direccion' => $datos["direccion"],
158
  'NumeroCelular' => $datos["telefono"],
159
  'NumeroDocumento' => $datos["dni"],
160
  'NumeroTelefono' => $datos["telefono"],
161
+ 'NumeroTransaccion' => "Orden nro: " . $datos["order_increment_id"],
162
  'Peso' => $datos["peso"],
163
  'Piso' => NULL,
164
  'Provincia' => $datos["provincia"],
178
  ->setCarrierCode('andreani') //carrier code
179
  ->setTitle('Andreani');
180
  $shipment->addTrack($track);
181
+
182
  //Enviamos numero Andreani, nos devolvera el url de la constancia que lo almacenaremos en la tabla andreani_order.
183
  $NroAndreani = $phpresponse->ConfirmarCompraResult->NumeroAndreani;
184
  $constanciaResponse = $client->ImprimirConstancia(array(
201
 
202
  }
203
 
204
+ /**
205
+ * NOTA: Despues de guardar el shippment, enviamos el mail al comprador con su tracking code
206
+ */
207
+ public function salesOrderShipmentSaveAfter($observer) {
208
+ $shipment = $observer->getEvent()->getShipment();
209
+ // enviamos el mail con el tracking code
210
+ if($shipment){
211
+ if(!$shipment->getEmailSent()){
212
+ $shipment->sendEmail(true);
213
+ $shipment->setEmailSent(true);
214
+ $shipment->save();
215
+ }
216
+ }
217
+ }
218
+
219
  }
220
  ?>
app/code/community/Ecloud/Andreani/Model/Order.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * @version 0.1.10 04.08.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
1
  <?php
2
  /**
3
+ * @version 0.1.11 09.10.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
app/code/community/Ecloud/Andreani/Model/Resource/Order.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * @version 0.1.10 04.08.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
1
  <?php
2
  /**
3
+ * @version 0.1.11 09.10.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
app/code/community/Ecloud/Andreani/Model/Resource/Order/Collection.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * @version 0.1.10 04.08.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
1
  <?php
2
  /**
3
+ * @version 0.1.11 09.10.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
app/code/community/Ecloud/Andreani/controllers/Adminhtml/Pedidos/PedidosController.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * @version 0.1.10 04.08.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
1
  <?php
2
  /**
3
+ * @version 0.1.11 09.10.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
app/code/community/Ecloud/Andreani/controllers/Adminhtml/PedidosController.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * @version 0.1.10 04.08.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
@@ -10,7 +10,7 @@ class Ecloud_Andreani_Adminhtml_PedidosController extends Mage_Adminhtml_Control
10
 
11
  public function indexAction()
12
  {
13
- $this->_title($this->__('Andreani'))->_title($this->__('Estado de pedidos'));
14
  $this->loadLayout();
15
  $this->_setActiveMenu('andreani/andreani');
16
  $this->_addContent($this->getLayout()->createBlock('andreani/adminhtml_pedidos'));
@@ -68,7 +68,10 @@ class Ecloud_Andreani_Adminhtml_PedidosController extends Mage_Adminhtml_Control
68
  Mage::getSingleton('adminhtml/session')->addError(Mage::helper('andreani')->__('Por favor seleccionar una orden!'));
69
  } else {
70
  try {
 
 
71
  foreach ($ids as $id) {
 
72
  Mage::getModel('andreani/order')->load($id)->setData("estado","Entregado")->save();
73
  }
74
  Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('andreani')->__('Se han actualizado %d registro(s).', count($ids)));
@@ -183,5 +186,17 @@ class Ecloud_Andreani_Adminhtml_PedidosController extends Mage_Adminhtml_Control
183
  $this->renderLayout();
184
  }
185
 
 
 
 
 
 
 
 
 
 
 
 
 
186
  }
187
  ?>
1
  <?php
2
  /**
3
+ * @version 0.1.11 09.10.2014
4
  * @author ecloud solutions http://www.ecloudsolutions.com <info@ecloudsolutions.com>
5
  * @copyright Copyright (C) 2010 - 2014 ecloud solutions ®
6
  */
10
 
11
  public function indexAction()
12
  {
13
+ $this->_title($this->__('Andreani'))->_title($this->__('Estado de pedidos de Andreani'));
14
  $this->loadLayout();
15
  $this->_setActiveMenu('andreani/andreani');
16
  $this->_addContent($this->getLayout()->createBlock('andreani/adminhtml_pedidos'));
68
  Mage::getSingleton('adminhtml/session')->addError(Mage::helper('andreani')->__('Por favor seleccionar una orden!'));
69
  } else {
70
  try {
71
+ date_default_timezone_set('America/Argentina/Buenos_Aires');
72
+ $date = date('d/m/Y h:i:s A', time());
73
  foreach ($ids as $id) {
74
+ Mage::getModel('andreani/order')->load($id)->setData("entrega",$date)->save();
75
  Mage::getModel('andreani/order')->load($id)->setData("estado","Entregado")->save();
76
  }
77
  Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('andreani')->__('Se han actualizado %d registro(s).', count($ids)));
186
  $this->renderLayout();
187
  }
188
 
189
+ public function saveAction() {
190
+ if ($data = $this->getRequest()->getPost()) {
191
+ $model = Mage::getModel('andreani/order');
192
+ $model->setData($data)->setId($this->getRequest()->getParam('id'));
193
+ $model->save();
194
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('andreani')->__('El pedido fue editado con éxito.'));
195
+ Mage::getSingleton('adminhtml/session')->setFormData(false);
196
+ }
197
+
198
+ $this->_redirect('*/*/');
199
+ }
200
+
201
  }
202
  ?>
app/code/community/Ecloud/Andreani/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Ecloud_Andreani>
5
- <version>0.1.10</version>
6
  </Ecloud_Andreani>
7
  </modules>
8
  <global>
@@ -19,90 +19,99 @@
19
  <models>
20
  <andreani>
21
  <class>Ecloud_Andreani_Model</class>
22
- <resourceModel>andreani_resource</resourceModel>
23
  </andreani>
24
- <andreani_resource>
25
- <class>Ecloud_Andreani_Model_Resource</class>
26
- <entities>
27
- <order>
28
- <table>andreani_order</table>
29
- </order>
30
- </entities>
31
- </andreani_resource>
32
  </models>
33
  <resources>
34
- <andreani_setup>
35
- <setup>
36
- <module>Ecloud_Andreani</module>
37
- <class>Mage_Eav_Model_Entity_Setup</class>
38
- </setup>
39
- <connection>
40
- <use>core_setup</use>
41
- </connection>
42
- </andreani_setup>
43
- <andreani_write>
44
- <connection>
45
- <use>core_write</use>
46
- </connection>
47
- </andreani_write>
48
- <andreani_read>
49
- <connection>
50
- <use>core_read</use>
51
- </connection>
52
- </andreani_read>
53
- </resources>
54
  <fieldsets>
55
- <sales_copy_order_billing_address>
56
- <dni><to_order>*</to_order></dni>
57
- </sales_copy_order_billing_address>
58
- <sales_copy_order_shipping_address>
59
- <dni><to_order>*</to_order></dni>
60
- </sales_copy_order_shipping_address>
61
- <sales_convert_quote_address>
62
- <dni><to_order_address>*</to_order_address><to_customer_address>*</to_customer_address></dni>
63
- </sales_convert_quote_address>
64
- <sales_convert_order_address>
65
- <dni><to_quote_address>*</to_quote_address></dni>
66
- </sales_convert_order_address>
67
 
68
- <customer_address>
69
- <dni><to_quote_address>*</to_quote_address></dni>
70
- </customer_address>
71
- <checkout_onepage_billing>
72
- <dni><to_customer>*</to_customer></dni>
73
- </checkout_onepage_billing>
74
- </fieldsets>
75
- <events>
76
- <sales_order_place_after>
77
- <observers>
78
- <andreani_order_success>
79
- <type>singleton</type>
80
- <class>andreani/observer</class>
81
- <method>andreaniObserver</method>
82
- </andreani_order_success>
83
- </observers>
84
- </sales_order_place_after>
85
- <sales_order_shipment_save_before>
86
- <observers>
87
- <andreani>
88
- <type>singleton</type>
89
- <class>andreani/observer</class>
90
- <method>salesOrderShipmentSaveBefore</method>
91
- </andreani>
92
- </observers>
93
- </sales_order_shipment_save_before>
94
- </events>
 
 
 
 
 
 
 
 
 
95
  </global>
96
  <admin>
97
  <routers>
98
- <adminhtml>
99
- <args>
100
- <modules>
101
- <andreani before="Mage_Adminhtml">Ecloud_Andreani_Adminhtml</andreani>
102
- </modules>
103
- </args>
104
- </adminhtml>
105
- </routers>
106
  <fieldsets>
107
  <customer_dataflow>
108
  <dni>
@@ -113,23 +122,23 @@
113
  </fieldsets>
114
  </admin>
115
  <adminhtml>
116
- <menu>
117
- <sales>
118
- <children>
119
- <andreani translate="title">
120
- <title>Andreani</title>
121
- <sort_order>91</sort_order>
122
- <children>
123
- <pedidos translate="title">
124
- <title>Estado de Pedidos</title>
125
- <sort_order>20</sort_order>
126
- <action>adminhtml/pedidos/index</action>
127
- </pedidos>
128
- </children>
129
- </andreani>
130
- </children>
131
- </sales>
132
- </menu>
133
  <acl>
134
  <resources>
135
  <all>
@@ -141,9 +150,9 @@
141
  <title>Andreani</title>
142
  <sort_order>1000</sort_order>
143
  <children>
144
- <andreanibackend translate="title">
145
  <title>Andreani</title>
146
- </andreanibackend>
147
  </children>
148
  </andreani>
149
  </children>
@@ -159,38 +168,40 @@
159
  </layout>
160
  </adminhtml>
161
  <default>
162
- <carriers>
163
- <andreaniconfig>
164
- <cache>0</cache>
165
- <medida>kilos</medida>
166
- </andreaniconfig>
167
- <andreaniestandar>
168
- <active>0</active>
169
- <model>andreani/carrier_andreaniestandar</model>
170
- <name>andreani</name>
171
- <title>Andreani Estandar</title>
172
- <description><![CDATA[Recibí el pedido en tu casa.]]></description>
173
- <sort_order>10</sort_order>
174
- <regla>0</regla>
175
- </andreaniestandar>
176
- <andreaniurgente>
177
- <active>0</active>
178
- <model>andreani/carrier_andreaniurgente</model>
179
- <name>andreaniurgente</name>
180
- <title>Andreani Urgente</title>
181
- <description><![CDATA[Recibí el pedido en tu casa en 24 hs!]]></description>
182
- <sort_order>20</sort_order>
183
- <regla>0</regla>
184
- </andreaniurgente>
185
- <andreanisucursal>
186
- <active>0</active>
187
- <model>andreani/carrier_andreanisucursal</model>
188
- <name>andreanisucursal</name>
189
- <title>Andreani Sucursal</title>
190
- <description><![CDATA[Busca el pedido en la sucursal más cercana: ]]></description>
191
- <sort_order>30</sort_order>
192
- <regla>0</regla>
193
- </andreanisucursal>
194
- </carriers>
195
- </default>
 
 
196
  </config>
2
  <config>
3
  <modules>
4
  <Ecloud_Andreani>
5
+ <version>0.1.11</version>
6
  </Ecloud_Andreani>
7
  </modules>
8
  <global>
19
  <models>
20
  <andreani>
21
  <class>Ecloud_Andreani_Model</class>
22
+ <resourceModel>andreani_resource</resourceModel>
23
  </andreani>
24
+ <andreani_resource>
25
+ <class>Ecloud_Andreani_Model_Resource</class>
26
+ <entities>
27
+ <order>
28
+ <table>andreani_order</table>
29
+ </order>
30
+ </entities>
31
+ </andreani_resource>
32
  </models>
33
  <resources>
34
+ <andreani_setup>
35
+ <setup>
36
+ <module>Ecloud_Andreani</module>
37
+ <class>Mage_Eav_Model_Entity_Setup</class>
38
+ </setup>
39
+ <connection>
40
+ <use>core_setup</use>
41
+ </connection>
42
+ </andreani_setup>
43
+ <andreani_write>
44
+ <connection>
45
+ <use>core_write</use>
46
+ </connection>
47
+ </andreani_write>
48
+ <andreani_read>
49
+ <connection>
50
+ <use>core_read</use>
51
+ </connection>
52
+ </andreani_read>
53
+ </resources>
54
  <fieldsets>
55
+ <sales_copy_order_billing_address>
56
+ <dni><to_order>*</to_order></dni>
57
+ </sales_copy_order_billing_address>
58
+ <sales_copy_order_shipping_address>
59
+ <dni><to_order>*</to_order></dni>
60
+ </sales_copy_order_shipping_address>
61
+ <sales_convert_quote_address>
62
+ <dni><to_order_address>*</to_order_address><to_customer_address>*</to_customer_address></dni>
63
+ </sales_convert_quote_address>
64
+ <sales_convert_order_address>
65
+ <dni><to_quote_address>*</to_quote_address></dni>
66
+ </sales_convert_order_address>
67
 
68
+ <customer_address>
69
+ <dni><to_quote_address>*</to_quote_address></dni>
70
+ </customer_address>
71
+ <checkout_onepage_billing>
72
+ <dni><to_customer>*</to_customer></dni>
73
+ </checkout_onepage_billing>
74
+ </fieldsets>
75
+ <events>
76
+ <sales_order_place_after>
77
+ <observers>
78
+ <andreani_order_success>
79
+ <type>singleton</type>
80
+ <class>andreani/observer</class>
81
+ <method>andreaniObserver</method>
82
+ </andreani_order_success>
83
+ </observers>
84
+ </sales_order_place_after>
85
+ <sales_order_shipment_save_before>
86
+ <observers>
87
+ <andreani>
88
+ <type>singleton</type>
89
+ <class>andreani/observer</class>
90
+ <method>salesOrderShipmentSaveBefore</method>
91
+ </andreani>
92
+ </observers>
93
+ </sales_order_shipment_save_before>
94
+ <sales_order_shipment_save_after>
95
+ <observers>
96
+ <andreani>
97
+ <type>singleton</type>
98
+ <class>andreani/observer</class>
99
+ <method>salesOrderShipmentSaveAfter</method>
100
+ </andreani>
101
+ </observers>
102
+ </sales_order_shipment_save_after>
103
+ </events>
104
  </global>
105
  <admin>
106
  <routers>
107
+ <adminhtml>
108
+ <args>
109
+ <modules>
110
+ <andreani before="Mage_Adminhtml">Ecloud_Andreani_Adminhtml</andreani>
111
+ </modules>
112
+ </args>
113
+ </adminhtml>
114
+ </routers>
115
  <fieldsets>
116
  <customer_dataflow>
117
  <dni>
122
  </fieldsets>
123
  </admin>
124
  <adminhtml>
125
+ <menu>
126
+ <sales>
127
+ <children>
128
+ <andreani translate="title">
129
+ <title>Andreani</title>
130
+ <sort_order>91</sort_order>
131
+ <children>
132
+ <pedidos translate="title">
133
+ <title>Estado de Pedidos</title>
134
+ <sort_order>20</sort_order>
135
+ <action>adminhtml/pedidos/index</action>
136
+ </pedidos>
137
+ </children>
138
+ </andreani>
139
+ </children>
140
+ </sales>
141
+ </menu>
142
  <acl>
143
  <resources>
144
  <all>
150
  <title>Andreani</title>
151
  <sort_order>1000</sort_order>
152
  <children>
153
+ <pedidos translate="title" module="andreani">
154
  <title>Andreani</title>
155
+ </pedidos>
156
  </children>
157
  </andreani>
158
  </children>
168
  </layout>
169
  </adminhtml>
170
  <default>
171
+ <carriers>
172
+ <andreaniconfig>
173
+ <cache>0</cache>
174
+ <medida>kilos</medida>
175
+ <pesomax>30</pesomax>
176
+ <metodo>completo</metodo>
177
+ </andreaniconfig>
178
+ <andreaniestandar>
179
+ <active>0</active>
180
+ <model>andreani/carrier_andreaniestandar</model>
181
+ <name>andreani</name>
182
+ <title>Andreani Estandar</title>
183
+ <description><![CDATA[Recibí el pedido en tu casa.]]></description>
184
+ <sort_order>10</sort_order>
185
+ <regla>0</regla>
186
+ </andreaniestandar>
187
+ <andreaniurgente>
188
+ <active>0</active>
189
+ <model>andreani/carrier_andreaniurgente</model>
190
+ <name>andreaniurgente</name>
191
+ <title>Andreani Urgente</title>
192
+ <description><![CDATA[Recibí el pedido en tu casa en 24 hs!]]></description>
193
+ <sort_order>20</sort_order>
194
+ <regla>0</regla>
195
+ </andreaniurgente>
196
+ <andreanisucursal>
197
+ <active>0</active>
198
+ <model>andreani/carrier_andreanisucursal</model>
199
+ <name>andreanisucursal</name>
200
+ <title>Andreani Sucursal</title>
201
+ <description><![CDATA[Busca el pedido en la sucursal más cercana: ]]></description>
202
+ <sort_order>30</sort_order>
203
+ <regla>0</regla>
204
+ </andreanisucursal>
205
+ </carriers>
206
+ </default>
207
  </config>
app/code/community/Ecloud/Andreani/etc/system.xml CHANGED
@@ -82,6 +82,30 @@
82
  <show_in_store>1</show_in_store>
83
  <sort_order>60</sort_order>
84
  </medida>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  </fields>
86
  </andreaniconfig>
87
  <andreanisucursal translate="label">
82
  <show_in_store>1</show_in_store>
83
  <sort_order>60</sort_order>
84
  </medida>
85
+ <pesomax translate="label">
86
+ <label>Peso máximo habilitado:</label>
87
+ <comment>
88
+ <![CDATA[Consulta con Andreani para ampliar el peso máximo habilitado para tu usuario.]]>
89
+ </comment>
90
+ <frontend_type>select</frontend_type>
91
+ <source_model>andreani/config_Pesomax</source_model>
92
+ <sort_order>70</sort_order>
93
+ <show_in_default>1</show_in_default>
94
+ <show_in_website>1</show_in_website>
95
+ <show_in_store>1</show_in_store>
96
+ </pesomax>
97
+ <metodo translate="label">
98
+ <label>Metodo consulta sucursales:</label>
99
+ <comment>
100
+ <![CDATA[Básico consulta solo por CP. Medio consulta por CP e informa al cliente a cuanto esta de la sucursal. Completo consulta por CP, provincia/localidad, calcula la mas cercana en caso de encontrar varias y la selecciona.]]>
101
+ </comment>
102
+ <frontend_type>select</frontend_type>
103
+ <source_model>andreani/config_Metodo</source_model>
104
+ <sort_order>80</sort_order>
105
+ <show_in_default>1</show_in_default>
106
+ <show_in_website>1</show_in_website>
107
+ <show_in_store>1</show_in_store>
108
+ </metodo>
109
  </fields>
110
  </andreaniconfig>
111
  <andreanisucursal translate="label">
app/code/community/Ecloud/Andreani/sql/andreani_setup/mysql4-upgrade-0.1.10-0.1.11.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $setup = $this;
4
+
5
+ $setup->startSetup();
6
+
7
+ try{
8
+ $setup->run("
9
+ ALTER TABLE {$this->getTable('andreani_order')} ADD `entrega` VARCHAR(255) NOT NULL ;
10
+ ");
11
+ } catch (Exception $e) {
12
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
13
+ }
14
+
15
+ $setup->endSetup();
app/etc/modules/Ecloud_Andreani.xml CHANGED
@@ -7,7 +7,7 @@
7
  <depends>
8
  <Mage_Shipping />
9
  </depends>
10
- <version>0.1.10</version>
11
  </Ecloud_Andreani>
12
  </modules>
13
  </config>
7
  <depends>
8
  <Mage_Shipping />
9
  </depends>
10
+ <version>0.1.11</version>
11
  </Ecloud_Andreani>
12
  </modules>
13
  </config>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Andreani</name>
4
- <version>0.1.10</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/gpl-license.php">GNU General Public License (GPL)</license>
7
  <channel>community</channel>
@@ -24,24 +24,29 @@ For Customers:&#xD;
24
  Location and distance y distance to the nearest branch for "Shipments to branch".&#xD;
25
  Express delivery service.&#xD;
26
  Tracking of shipments.</description>
27
- <notes>Release Version 0.1.10&#xD;
28
  &#xD;
29
  Fix:&#xD;
30
- - Cotizador ampliado hasta 50kg.&#xD;
31
  &#xD;
32
- - Send tracking information no vuelve a llamar a ConfirmarCompra si la orden ya tiene un n&#xFA;mero de env&#xED;o.&#xD;
33
  &#xD;
34
- - Orden de Andreani -&gt; Estado de pedidos es por ID Orden descendente.&#xD;
35
  &#xD;
36
- - Versi&#xF3;n PHP hasta 5.5.15.&#xD;
37
  &#xD;
38
- - El contrato pas&#xF3; a ser varchar(255).&#xD;
39
  &#xD;
40
- - Se pasaron los archivos de "local" a "community" </notes>
41
- <authors><author><name>Gaspar Mac</name><user>ecloudsolutions</user><email>gaspar@ecloudsolutions.com</email></author><author><name>Nicolas Demayo</name><user>nikete</user><email>nicolas.demayo@ecloudsolutions.com</email></author><author><name>Franco Sabolo</name><user>kako_ecloud</user><email>franco.sabolo@ecloudsolutions.com</email></author><author><name>Mariano Botti</name><user>mbotti89</user><email>mariano.botti@ecloudsolutions.com</email></author></authors>
42
- <date>2014-08-04</date>
43
- <time>19:57:35</time>
44
- <contents><target name="magecommunity"><dir name="Ecloud"><dir name="Andreani"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><file name="Edit.php" hash="dff7e47f8890a0472a70557324c0b6b5"/><dir name="Form"><dir name="Field"><file name="Medida.php" hash="14891f54e3227d7346d9366390dee353"/></dir></dir></dir><dir name="Pedidos"><dir name="Edit"><file name="Form.php" hash="6d340eb5f24f9b5f3736917dbf3a77ec"/><dir name="Renderer"><file name="Button.php" hash="8080c62dd85520205aaf3a551a80647e"/></dir></dir><file name="Edit.php" hash="30212eb7939a12d937152e08f980ab64"/><file name="Grid.php" hash="3b2a519b42de33cfe673e508a759166e"/></dir><file name="Pedidos.php" hash="c5f9058d4b288696e721be500b25612d"/></dir><file name="Andreani.php" hash="8ba6082dfc04617177495bfea4bed381"/></dir><dir name="Helper"><file name="Data.php" hash="36f44a54652157203b49a91c45fa4560"/></dir><dir name="Model"><file name="Andreani.php" hash="a6037a578d62fa6ff0cd8630c11e676b"/><dir name="Carrier"><file name="Andreani.php" hash="e46e516b4242092b90803e3eef58f9fa"/><file name="Andreaniestandar.php" hash="bf4eaab3a133a01218043e2a6344859f"/><file name="Andreanisucursal.php" hash="751ffe7905199495a6a186fc3c39751c"/><file name="Andreaniurgente.php" hash="46a113d743e87a63bddb67dc6714d705"/></dir><dir name="Config"><file name="Medida.php" hash="8e09d61b3b6a6469a9e67a900c1f43c7"/><file name="TestMode.php" hash="aa0ed7043c6361f064240aeefa27d8ec"/></dir><file name="Observer.php" hash="e94e8099da3cd20a1ba5f355f47c9676"/><file name="Order.php" hash="462a8fee2bf5a25465bcd1f0a6a48f35"/><dir name="Resource"><dir name="Order"><file name="Collection.php" hash="b7fcefacf48e7934c1ccdf085f100cf4"/></dir><file name="Order.php" hash="630b4416bfa3590c5e9704b3fe38c307"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Pedidos"><file name="PedidosController.php" hash="6ad5521b707b5cf2af75dea017e759fd"/></dir><file name="PedidosController.php" hash="73fa3b7e309ffaaefb28a0b2087c12e0"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="572688a74a8eb634953c6bf59d2635f2"/><file name="config.xml" hash="6c028ee48dbd118e172cb7a8dc90fdd8"/><file name="system.xml" hash="ec1bf9a3739d671995cea0afb9289725"/></dir><dir name="sql"><dir name="andreani_setup"><file name="mysql4-install-0.1.0.php" hash="23b5ff1bb77faa3394279983279ef508"/><file name="mysql4-install-0.1.1.php" hash="af9c6884b1ef1e106f598e84d5ac97d5"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="19bbe941b87c48a7c976099f26b6df87"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="31485210af28297146e193090d0ae586"/><file name="mysql4-upgrade-0.1.3-0.1.4.php" hash="19bbe941b87c48a7c976099f26b6df87"/><file name="mysql4-upgrade-0.1.4-0.1.5.php" hash="19bbe941b87c48a7c976099f26b6df87"/><file name="mysql4-upgrade-0.1.5-0.1.6.php" hash="2e5071273633e63d487fa573dc2a33d9"/><file name="mysql4-upgrade-0.1.6-0.1.7.php" hash="2e5071273633e63d487fa573dc2a33d9"/><file name="mysql4-upgrade-0.1.9-0.1.10.php" hash="785667de6dde9f943af7a11ef410e00d"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ecloud_Andreani.xml" hash="f328f654fd1a6505fc94a0f0bb4175bc"/></dir></target><target name="magelib"><dir name="Andreani"><file name="wsseAuth.php" hash="7f7c0dcac241e7422a6bc657638fc5df"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="checkout"><dir name="onepage"><file name="shipping.phtml" hash="dd07d8ad6a22cd9e2553109498057439"/></dir></dir><dir name="customer"><dir name="address"><file name="edit.phtml" hash="c6a693c55bec274da69b12839a5f4ef1"/></dir></dir><dir name="persistent"><dir name="checkout"><dir name="onepage"><file name="billing.phtml" hash="c4c0a62c21e9e1a6d2b1b872d0f8bdfc"/></dir></dir></dir><dir name="shipping"><dir name="tracking"><file name="popup.phtml" hash="cab9a1b01c732d7553be9b47e1e1b542"/></dir></dir></dir></dir></dir></dir></target></contents>
 
 
 
 
 
 
45
  <compatible/>
46
  <dependencies><required><php><min>5.2.0</min><max>5.5.15</max></php><extension><name>Core</name><min></min><max></max></extension><extension><name>soap</name><min></min><max></max></extension></required></dependencies>
47
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Andreani</name>
4
+ <version>0.1.11</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/gpl-license.php">GNU General Public License (GPL)</license>
7
  <channel>community</channel>
24
  Location and distance y distance to the nearest branch for "Shipments to branch".&#xD;
25
  Express delivery service.&#xD;
26
  Tracking of shipments.</description>
27
+ <notes>Release Version 0.1.11&#xD;
28
  &#xD;
29
  Fix:&#xD;
 
30
  &#xD;
31
+ - Metodos de calcular envio: completo, medio, basico&#xD;
32
  &#xD;
33
+ - Posibilidad de seleccionar el peso soportado por el cotizador&#xD;
34
  &#xD;
35
+ - Se pueden crear ordenes desde el admin y calcular el envio con la extension&#xD;
36
  &#xD;
37
+ - Arreglado error que siempre guardaba andreani sucursal&#xD;
38
  &#xD;
39
+ - Si no encuentra sucursal, no permite seleccionar envio a sucursal&#xD;
40
+ &#xD;
41
+ - Estado de pedidos dropdown para filtrar enviados, entregados, etc.&#xD;
42
+ &#xD;
43
+ - ACL funciona correctamente&#xD;
44
+ &#xD;
45
+ - Se guarda la fecha cuando el pedido pasa a estado Entregado</notes>
46
+ <authors><author><name>Gaspar Mac</name><user>ecloudsolutions</user><email>gaspar@ecloudsolutions.com</email></author><author><name>Nicolas Demayo</name><user>nikete</user><email>nicolas.demayo@ecloudsolutions.com</email></author><author><name>Franco Sabolo</name><user>kako_ecloud</user><email>franco.sabolo@ecloudsolutions.com</email></author><author><name>Mariano Botti</name><user>mbotti89</user><email>mariano.botti@ecloudsolutions.com</email></author><author><name>Bruno Mininno</name><user>brunomininno</user><email>bruno.mininno@ecloudsolutions.com</email></author></authors>
47
+ <date>2014-10-09</date>
48
+ <time>16:39:21</time>
49
+ <contents><target name="magecommunity"><dir name="Ecloud"><dir name="Andreani"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><file name="Edit.php" hash="1fb7ab7a8d7038b10bd21d892d290951"/><dir name="Form"><dir name="Field"><file name="Medida.php" hash="bd0e408266db98fc5983dd42846f4df6"/></dir></dir></dir><dir name="Pedidos"><dir name="Edit"><file name="Form.php" hash="2e1ad460f4574c4c966142fa254709e5"/><dir name="Renderer"><file name="Button.php" hash="ef247084cd66ff765d3d9d404c354f3d"/></dir></dir><file name="Edit.php" hash="0b0e66b3b3ea2ab0326d0dfe78c30bb6"/><file name="Grid.php" hash="45d4915fd3b3ef46613ebbb65d999913"/></dir><file name="Pedidos.php" hash="0f859e6b5863b67fff8c6a71bd04f58d"/></dir><file name="Andreani.php" hash="20fc1d1db2cf5a513455a383286745a2"/></dir><dir name="Helper"><file name="Data.php" hash="9e4f8bd045e3e5a81d1244c2447ce123"/></dir><dir name="Model"><file name="Andreani.php" hash="054bdd2c97d003a852030fdea16a9b9b"/><dir name="Carrier"><file name="Andreani.php" hash="c26699fba3f9a54547c630ba3ee1b9ed"/><file name="Andreaniestandar.php" hash="e00ac4c4af8ac421bd45fedbc5b3e909"/><file name="Andreanisucursal.php" hash="c51d67670a12cffff2aa209593d3ae00"/><file name="Andreaniurgente.php" hash="96c25ecdc5586b84c3b885cdbb402b37"/></dir><dir name="Config"><file name="Medida.php" hash="6d6c32fc7a74d33e143903922e4c7ad7"/><file name="Metodo.php" hash="2f56b9b116cef7e342b406a1920c40c9"/><file name="Pesomax.php" hash="b1230aaa4452fc8a9b6250ede13fbbc2"/><file name="TestMode.php" hash="f32f4ee2b572f121a205f5243a43b906"/></dir><file name="Observer.php" hash="3bb7abd474a3c81e78e2fb9b41bf7a3f"/><file name="Order.php" hash="c56f43ef722ee07f4146445a60030f6a"/><dir name="Resource"><dir name="Order"><file name="Collection.php" hash="a3962d4eee6254df24b7863514f425e9"/></dir><file name="Order.php" hash="69b3b1e098fc552652ca615ad253100f"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Pedidos"><file name="PedidosController.php" hash="a90d175284d7443f3b42609fca837a9d"/></dir><file name="PedidosController.php" hash="24f3ecab45083c2329d26f419b2b0f51"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="572688a74a8eb634953c6bf59d2635f2"/><file name="config.xml" hash="0cbad23336f948af5f14c3370c26d143"/><file name="system.xml" hash="8396ab20317b606a46592cf9d713635c"/></dir><dir name="sql"><dir name="andreani_setup"><file name="mysql4-install-0.1.0.php" hash="23b5ff1bb77faa3394279983279ef508"/><file name="mysql4-install-0.1.1.php" hash="af9c6884b1ef1e106f598e84d5ac97d5"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="19bbe941b87c48a7c976099f26b6df87"/><file name="mysql4-upgrade-0.1.10-0.1.11.php" hash="49cb97b29c78ba1ab6f3497559bc6556"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="31485210af28297146e193090d0ae586"/><file name="mysql4-upgrade-0.1.3-0.1.4.php" hash="19bbe941b87c48a7c976099f26b6df87"/><file name="mysql4-upgrade-0.1.4-0.1.5.php" hash="19bbe941b87c48a7c976099f26b6df87"/><file name="mysql4-upgrade-0.1.5-0.1.6.php" hash="2e5071273633e63d487fa573dc2a33d9"/><file name="mysql4-upgrade-0.1.6-0.1.7.php" hash="2e5071273633e63d487fa573dc2a33d9"/><file name="mysql4-upgrade-0.1.9-0.1.10.php" hash="785667de6dde9f943af7a11ef410e00d"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ecloud_Andreani.xml" hash="9feb8e71afd5c51f668787be514adcdd"/></dir></target><target name="magelib"><dir name="Andreani"><file name="wsseAuth.php" hash="7f7c0dcac241e7422a6bc657638fc5df"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="checkout"><dir name="onepage"><file name="shipping.phtml" hash="dd07d8ad6a22cd9e2553109498057439"/></dir></dir><dir name="customer"><dir name="address"><file name="edit.phtml" hash="c6a693c55bec274da69b12839a5f4ef1"/></dir></dir><dir name="persistent"><dir name="checkout"><dir name="onepage"><file name="billing.phtml" hash="c4c0a62c21e9e1a6d2b1b872d0f8bdfc"/></dir></dir></dir><dir name="shipping"><dir name="tracking"><file name="popup.phtml" hash="cab9a1b01c732d7553be9b47e1e1b542"/></dir></dir></dir></dir></dir></dir></target></contents>
50
  <compatible/>
51
  <dependencies><required><php><min>5.2.0</min><max>5.5.15</max></php><extension><name>Core</name><min></min><max></max></extension><extension><name>soap</name><min></min><max></max></extension></required></dependencies>
52
  </package>