99minutos - Version 1.3.0

Version Notes

Completar el registro contactando a los telefonos +52 (55) 6363 1559 o enviando un correo a hola@99minutos.com.

Download this release

Release Info

Developer 99 minutos
Extension 99minutos
Version 1.3.0
Comparing to
See all releases


Code changes from version 1.2.0 to 1.3.0

app/code/community/Godoparsa/Shipping/.DS_Store CHANGED
Binary file
app/code/community/Godoparsa/Shipping/Model/Carrier.php CHANGED
@@ -10,7 +10,7 @@ class Godoparsa_Shipping_Model_Carrier
10
  public function collectRates(Mage_Shipping_Model_Rate_Request $request)
11
  {
12
  $shop= Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
13
- $db = new mysqli("store.99minutos.com", "minutos_magento", "g9e1BqgAQtni", "minutos_api");
14
  $consult_set= $db->query("SELECT settings FROM tbl_usersmagento WHERE store_name = '$shop'");
15
  $resutl_set= mysqli_fetch_array($consult_set);
16
  $setting= $resutl_set['settings'];
10
  public function collectRates(Mage_Shipping_Model_Rate_Request $request)
11
  {
12
  $shop= Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
13
+ $db = new mysqli("54.172.87.163", "minutos", "00Minutos+01", "minutos");
14
  $consult_set= $db->query("SELECT settings FROM tbl_usersmagento WHERE store_name = '$shop'");
15
  $resutl_set= mysqli_fetch_array($consult_set);
16
  $setting= $resutl_set['settings'];
app/code/community/Godoparsa/Shipping/Model/Observer.php CHANGED
@@ -88,9 +88,9 @@ class Godoparsa_Shipping_Model_Observer extends Mage_Core_Helper_Abstract
88
  $shipping_method= $order->getShippingDescription();
89
  if(($shipping_method == $express) or ($shipping_method == $programado))
90
  {
91
- Mage::log(var_export($shipment->debug(), TRUE));
92
  $shop= Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
93
- $db = new mysqli("store.99minutos.com", "minutos_magento", "g9e1BqgAQtni", "minutos_api");
94
  $consult_set= $db->query("SELECT * FROM tbl_usersmagento WHERE store_name = '$shop'");
95
  $resutl_set= mysqli_fetch_array($consult_set);
96
  $address= $shippingAddress->getstreet();
@@ -125,8 +125,8 @@ class Godoparsa_Shipping_Model_Observer extends Mage_Core_Helper_Abstract
125
  $longitude = $decoded_data['results']['0']['geometry']['location']['lng'];
126
 
127
  // variables
128
- $db = new mysqli("store.99minutos.com", "minutos_magento", "g9e1BqgAQtni", "minutos_api");
129
  $api_key= '23894thfpoiq10fapo93fmapo';
 
130
  $route= urlencode($resutl_set['route']);
131
  $street_number= urlencode($resutl_set['street_number']);
132
  $neighborhood= urlencode($resutl_set['neighborhood']);
@@ -170,14 +170,48 @@ class Godoparsa_Shipping_Model_Observer extends Mage_Core_Helper_Abstract
170
  $request_ship.= "customer_phone=".$customer_phone."&";
171
  $request_ship.= "notification_email=&notes=".$notes."&dispatch=True";
172
  //funcion curl para enviar la peticion de envio al sistema de 99minutos
173
- /*$chr=curl_init();
174
  curl_setopt($chr, CURLOPT_URL, $request_ship);
175
  curl_setopt($chr, CURLOPT_SSL_VERIFYPEER, false);
176
  curl_setopt($chr, CURLOPT_HEADER, false);
177
  curl_setopt($chr, CURLOPT_RETURNTRANSFER, true);
178
  curl_setopt($chr, CURLOPT_TIMEOUT, 1);
179
  $url_request = curl_exec($chr);
180
- curl_close($chr);*/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
 
182
  }
183
  }
88
  $shipping_method= $order->getShippingDescription();
89
  if(($shipping_method == $express) or ($shipping_method == $programado))
90
  {
91
+ //Mage::log(var_export($shipment->debug(), TRUE));
92
  $shop= Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
93
+ $db = new mysqli("54.172.87.163", "minutos", "00Minutos+01", "minutos");
94
  $consult_set= $db->query("SELECT * FROM tbl_usersmagento WHERE store_name = '$shop'");
95
  $resutl_set= mysqli_fetch_array($consult_set);
96
  $address= $shippingAddress->getstreet();
125
  $longitude = $decoded_data['results']['0']['geometry']['location']['lng'];
126
 
127
  // variables
 
128
  $api_key= '23894thfpoiq10fapo93fmapo';
129
+ $user_id= urlencode($result_set['user_id']);
130
  $route= urlencode($resutl_set['route']);
131
  $street_number= urlencode($resutl_set['street_number']);
132
  $neighborhood= urlencode($resutl_set['neighborhood']);
170
  $request_ship.= "customer_phone=".$customer_phone."&";
171
  $request_ship.= "notification_email=&notes=".$notes."&dispatch=True";
172
  //funcion curl para enviar la peticion de envio al sistema de 99minutos
173
+ $chr=curl_init();
174
  curl_setopt($chr, CURLOPT_URL, $request_ship);
175
  curl_setopt($chr, CURLOPT_SSL_VERIFYPEER, false);
176
  curl_setopt($chr, CURLOPT_HEADER, false);
177
  curl_setopt($chr, CURLOPT_RETURNTRANSFER, true);
178
  curl_setopt($chr, CURLOPT_TIMEOUT, 1);
179
  $url_request = curl_exec($chr);
180
+ curl_close($chr);
181
+
182
+ //url que sirve para hacer la peticion de envion al nuevo sistema de 99minutos
183
+ $request_n= "https://precise-line-76299minutos.appspot.com/2/delivery/request?";
184
+ $request_n.= "api_key=".$api_key."&";
185
+ $request_n.= "user_id=".$user_id."&";
186
+ $request_n.= "route=".$route."&";
187
+ $request_n.= "street_number=".$street_number."&";
188
+ $request_n.= "neighborhood=".$neighborhood."&";
189
+ $request_n.= "locality=".$locality."&";
190
+ $request_n.= "administrative_area_level_1=".$administrative_area_level_1."&";
191
+ $request_n.= "postal_code=".$postal_code."&";
192
+ $request_n.= "country=".$country."&";
193
+ $request_n.= "latlng=".$d_latlng."&";
194
+ $request_n.= "destination-route=".$destination_route."&";
195
+ $request_n.= "destination-street_number=&";
196
+ $request_n.= "destination-neighborhood=".$destination_locality."&";
197
+ $request_n.= "destination-locality=".$destination_locality."&";
198
+ $request_n.= "destination-administrative_area_level=".$destination_administrative_area_level."&";
199
+ $request_n.= "destination-postal_code=".$destination_postal_code."&";
200
+ $request_n.= "destination-country=".$destination_country."&";
201
+ $request_n.= "destination-latlng=".$d_latlng."&";
202
+ $request_n.= "customer_email=".$email."&";
203
+ $request_n.= "customer_phone=".$customer_phone."&";
204
+ $request_n.= "notification_email=&notes=".$notes."&dispatch=True";
205
+ //funcion curl para enviar la peticion de envio al sistema de 99minutos
206
+ $chn=curl_init();
207
+ curl_setopt($chn, CURLOPT_URL, $request_n);
208
+ curl_setopt($chn, CURLOPT_SSL_VERIFYPEER, false);
209
+ curl_setopt($chn, CURLOPT_HEADER, false);
210
+ curl_setopt($chn, CURLOPT_RETURNTRANSFER, true);
211
+ curl_setopt($chn, CURLOPT_TIMEOUT, 1);
212
+ $url_n = curl_exec($chn);
213
+ curl_close($chn);
214
+
215
 
216
  }
217
  }
app/code/community/Godoparsa/Shipping/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Godoparsa_Shipping>
5
- <version>1.2.0</version>
6
  </Godoparsa_Shipping>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <Godoparsa_Shipping>
5
+ <version>1.3</version>
6
  </Godoparsa_Shipping>
7
  </modules>
8
  <global>
app/code/community/Godoparsa/Shipping/sql/.DS_Store CHANGED
Binary file
app/code/community/Godoparsa/Shipping/sql/godoparsa_shipping_setup/{install-1.2.0.php → install-1.2.1.php} RENAMED
@@ -3,7 +3,7 @@ $installer = $this;
3
  $installer->startSetup();
4
 
5
  $shop= Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
6
- $db = new mysqli("store.99minutos.com", "minutos_magento", "g9e1BqgAQtni", "minutos_api");
7
  $db->query(" INSERT INTO tbl_usersmagento SET store_name = '$shop'");
8
  $inbox = Mage::getModel('adminnotification/inbox');
9
  $severity = Mage_AdminNotification_Model_Inbox::SEVERITY_NOTICE;
3
  $installer->startSetup();
4
 
5
  $shop= Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
6
+ $db = new mysqli("54.172.87.163", "minutos", "00Minutos+01", "minutos");
7
  $db->query(" INSERT INTO tbl_usersmagento SET store_name = '$shop'");
8
  $inbox = Mage::getModel('adminnotification/inbox');
9
  $severity = Mage_AdminNotification_Model_Inbox::SEVERITY_NOTICE;
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>99minutos</name>
4
- <version>1.2.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/mit-license.php">MIT License</license>
7
  <channel>community</channel>
@@ -23,9 +23,9 @@ Servicio de logistica para tiendas en linea donde compras y en tiempo record rec
23
  &#xD;
24
  </notes>
25
  <authors><author><name>99 minutos</name><user>99minutos</user><email>saul@99minutos.com</email></author></authors>
26
- <date>2015-03-17</date>
27
- <time>19:00:55</time>
28
- <contents><target name="magecommunity"><dir name="Godoparsa"><dir name="Shipping"><dir name="Helper"><file name="Data.php" hash="1c6839600686b48a7ce1d19b4d1350d7"/></dir><dir name="Model"><file name="Carrier.php" hash="96b915fbf88a35dbcea7f7d560570e21"/><file name="Observer.php" hash="48e9fb7449a35ced6c6558294164ddc7"/><file name=".DS_Store" hash="8e927e15d29c07b05d4dca1375302c38"/></dir><dir name="etc"><file name="config.xml" hash="2431e6a73f5e731d8dcc2b11025589a7"/><file name="system.xml" hash="9bceeef1dd7309e07ce93a5fec17ee7c"/></dir><dir name="sql"><dir name="godoparsa_shipping_setup"><file name="install-1.2.0.php" hash="b463e1a556b11ca8f98c2cf3de428b8d"/></dir><file name=".DS_Store" hash="aeb720350a702df53660ff1ddef173d6"/></dir><file name=".DS_Store" hash="512269f51409aad91e6a1758216226ab"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Godoparsa_Shipping.xml" hash="e3018fdc7c5f7f2db4a31313d275eb0e"/></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><file name="godoparsa_shipping.html" hash="be5fbe33f6fc64d02375bec27a10d77b"/></dir></dir></dir></target></contents>
29
  <compatible/>
30
  <dependencies><required><php><min>5.3.1</min><max>5.6.2</max></php></required></dependencies>
31
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>99minutos</name>
4
+ <version>1.3.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/mit-license.php">MIT License</license>
7
  <channel>community</channel>
23
  &#xD;
24
  </notes>
25
  <authors><author><name>99 minutos</name><user>99minutos</user><email>saul@99minutos.com</email></author></authors>
26
+ <date>2015-06-10</date>
27
+ <time>16:58:12</time>
28
+ <contents><target name="magecommunity"><dir name="Godoparsa"><dir name="Shipping"><dir name="Helper"><file name="Data.php" hash="1c6839600686b48a7ce1d19b4d1350d7"/></dir><dir name="Model"><file name="Carrier.php" hash="5ab8f683844a7a2d55a2ad350d35ad99"/><file name="Observer.php" hash="b5036b4cd94a967cd6483dcdbbc7c397"/><file name=".DS_Store" hash="8e927e15d29c07b05d4dca1375302c38"/></dir><dir name="etc"><file name="config.xml" hash="93ae83181dd151947b9afc0917fb9a54"/><file name="system.xml" hash="9bceeef1dd7309e07ce93a5fec17ee7c"/></dir><dir name="sql"><dir name="godoparsa_shipping_setup"><file name="install-1.2.1.php" hash="e31d6c6ea7c30cb4e1510f557959afd7"/></dir><file name=".DS_Store" hash="9f66d116a6227b13913ff4e8a714fccb"/></dir><file name=".DS_Store" hash="3d3020af98f774f83c17e05920f5244a"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Godoparsa_Shipping.xml" hash="e3018fdc7c5f7f2db4a31313d275eb0e"/></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><file name="godoparsa_shipping.html" hash="be5fbe33f6fc64d02375bec27a10d77b"/></dir></dir></dir></target></contents>
29
  <compatible/>
30
  <dependencies><required><php><min>5.3.1</min><max>5.6.2</max></php></required></dependencies>
31
  </package>