Ydral_Yupick - Version 0.4.0

Version Notes

- En "Más opciones de búsqueda", añadida la Calle y Código Postal para permitir la búsqueda de Puntos Yupick! en direcciones diferentes de la de Facturación y Entrega.

- Se ha añadido el soporte para que en tiendas seguras (HTTPS), se muestre correctamente la ubicación del punto seleccionado.

Download this release

Release Info

Developer Ydral
Extension Ydral_Yupick
Version 0.4.0
Comparing to
See all releases


Code changes from version 0.3.0 to 0.4.0

app/code/local/Ydral/Yupick/Block/Checkout/Onepage/Shipping/Method/Available.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  class Ydral_Yupick_Block_Checkout_Onepage_Shipping_Method_Available extends Mage_Checkout_Block_Onepage_Shipping_Method_Available
4
  {
5
  public function verOficinas()
1
  <?php
 
2
  class Ydral_Yupick_Block_Checkout_Onepage_Shipping_Method_Available extends Mage_Checkout_Block_Onepage_Shipping_Method_Available
3
  {
4
  public function verOficinas()
app/code/local/Ydral/Yupick/Block/Yupick.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  class Ydral_Yupick_Block_Yupick extends Mage_Core_Block_Template
4
  {
5
  protected function _construct()
1
  <?php
 
2
  class Ydral_Yupick_Block_Yupick extends Mage_Core_Block_Template
3
  {
4
  protected function _construct()
app/code/local/Ydral/Yupick/Model/Mysql4/Yupick.php CHANGED
@@ -1,5 +1,4 @@
1
- <?php
2
-
3
  class Ydral_Yupick_Model_Mysql4_Yupick extends Mage_Core_Model_Mysql4_Abstract
4
  {
5
  protected function _construct()
1
+ <?php
 
2
  class Ydral_Yupick_Model_Mysql4_Yupick extends Mage_Core_Model_Mysql4_Abstract
3
  {
4
  protected function _construct()
app/code/local/Ydral/Yupick/Model/Ydral/Recogeroficina.php CHANGED
@@ -140,7 +140,7 @@ class Ydral_Yupick_Model_Ydral_Recogeroficina extends Mage_Shipping_Model_Carrie
140
 
141
 
142
  /**
143
- *
144
  */
145
  public function dataPunto($codOficina, $codPostal)
146
  {
@@ -170,27 +170,24 @@ class Ydral_Yupick_Model_Ydral_Recogeroficina extends Mage_Shipping_Model_Carrie
170
  */
171
  protected function pedirOficinas ($data)
172
  {
173
-
174
  if (!is_array($data)) { return false; }
175
  if (!Mage::getStoreConfig('yupick/general/active')) return false;
176
  if (!Mage::getStoreConfig('yupick/general/etiquetador')) return false;
177
 
178
-
179
  $URL=Mage::helper('yupick')->getUrlRequestCarrier();
 
180
  $client = new SoapClient($URL);
181
-
182
  // Realizamos la peticion
183
- $result = $client->getBuscarPuntos(Mage::getStoreConfig('yupick/general/etiquetador'),$data['codigoPostal'],'',$data['option_parking'],$data['option_wifi'],$data['option_alimentacion'],$data['option_prensa'],$data['option_tarjeta'],$data['option_mas20'],$data['option_sabados'],$data['option_domingos']);
184
-
185
-
186
  // reparamos los datos para sacar un xml bien formado
187
  $result = str_replace("<?xml version='1.0' encoding='ISO-8859-1'?><puntoentrega>", "<?xml version='1.0' encoding='ISO-8859-1'?><puntos><puntoentrega>", $result . '</puntos>');
188
  //$result = iconv("UTF-8", "ISO-8859-1//IGNORE", utf8_decode(trim($result)));
189
  $result = preg_replace('/<tarjetacredito>([A-Za-z]*)<tarjetacredito>/e', "'<tarjetacredito>'.strtolower('\\1').'</tarjetacredito>'",$result);
190
  $result = preg_replace('/<poslongitud>([A-Za-z0-9\.-]*)<poslongitud>/e', "'<poslongitud>' . strtolower('\\1') . '</poslongitud>'",$result);
191
  $result = str_replace('</puntos>', '', $result);
192
-
193
-
194
  if ($this->is_valid_xml($result))
195
  {
196
  $dataXml = simplexml_load_string($result, 'SimpleXMLElement', LIBXML_NOCDATA);
140
 
141
 
142
  /**
143
+ * OJO, creo que esta función no se una
144
  */
145
  public function dataPunto($codOficina, $codPostal)
146
  {
170
  */
171
  protected function pedirOficinas ($data)
172
  {
 
173
  if (!is_array($data)) { return false; }
174
  if (!Mage::getStoreConfig('yupick/general/active')) return false;
175
  if (!Mage::getStoreConfig('yupick/general/etiquetador')) return false;
176
 
177
+ Mage::log($data);
178
  $URL=Mage::helper('yupick')->getUrlRequestCarrier();
179
+ Mage::log($URL);
180
  $client = new SoapClient($URL);
 
181
  // Realizamos la peticion
182
+ $result = $client->getBuscarPuntos(Mage::getStoreConfig('yupick/general/etiquetador'),$data['codigoPostal'],$data['direccion'],$data['option_parking'],$data['option_wifi'],$data['option_alimentacion'],$data['option_prensa'],$data['option_tarjeta'],$data['option_mas20'],$data['option_sabados'],$data['option_domingos']);
183
+ //Mage::log($result);
 
184
  // reparamos los datos para sacar un xml bien formado
185
  $result = str_replace("<?xml version='1.0' encoding='ISO-8859-1'?><puntoentrega>", "<?xml version='1.0' encoding='ISO-8859-1'?><puntos><puntoentrega>", $result . '</puntos>');
186
  //$result = iconv("UTF-8", "ISO-8859-1//IGNORE", utf8_decode(trim($result)));
187
  $result = preg_replace('/<tarjetacredito>([A-Za-z]*)<tarjetacredito>/e', "'<tarjetacredito>'.strtolower('\\1').'</tarjetacredito>'",$result);
188
  $result = preg_replace('/<poslongitud>([A-Za-z0-9\.-]*)<poslongitud>/e', "'<poslongitud>' . strtolower('\\1') . '</poslongitud>'",$result);
189
  $result = str_replace('</puntos>', '', $result);
190
+
 
191
  if ($this->is_valid_xml($result))
192
  {
193
  $dataXml = simplexml_load_string($result, 'SimpleXMLElement', LIBXML_NOCDATA);
app/code/local/Ydral/Yupick/Model/Yupick.php CHANGED
@@ -1,5 +1,4 @@
1
- <?php
2
-
3
  class Ydral_Yupick_Model_Yupick extends Mage_Core_Model_Abstract
4
  {
5
  protected function _construct()
1
+ <?php
 
2
  class Ydral_Yupick_Model_Yupick extends Mage_Core_Model_Abstract
3
  {
4
  protected function _construct()
app/code/local/Ydral/Yupick/controllers/IndexController.php CHANGED
@@ -4,12 +4,14 @@ class Ydral_Yupick_IndexController extends Mage_Core_Controller_Front_Action
4
  {
5
  public function getdataAction()
6
  {
7
-
8
  if ($this->getRequest()->isPost())
9
  {
10
 
11
  $data['codigoPostal'] = $this->getRequest()->getPost('codigoPostal');
12
-
 
 
13
  $data['option_parking'] = $this->getRequest()->getPost('option_parking');
14
  $data['option_wifi'] = $this->getRequest()->getPost('option_wifi');
15
  $data['option_alimentacion'] = $this->getRequest()->getPost('option_alimentacion');
4
  {
5
  public function getdataAction()
6
  {
7
+ Mage::log($this->getRequest()->isPost());
8
  if ($this->getRequest()->isPost())
9
  {
10
 
11
  $data['codigoPostal'] = $this->getRequest()->getPost('codigoPostal');
12
+ //OJO cambiado
13
+ $data['direccion'] = $this->getRequest()->getPost('direccion');
14
+
15
  $data['option_parking'] = $this->getRequest()->getPost('option_parking');
16
  $data['option_wifi'] = $this->getRequest()->getPost('option_wifi');
17
  $data['option_alimentacion'] = $this->getRequest()->getPost('option_alimentacion');
app/code/local/Ydral/Yupick/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
  <config>
4
  <modules>
5
  <Ydral_Yupick>
6
- <version>0.3.0</version>
7
  </Ydral_Yupick>
8
  </modules>
9
  <global>
@@ -171,7 +171,7 @@
171
  <carriers>
172
  <yupick>
173
  <active>0</active>
174
- <title><![CDATA[Recoger paquete en tu punto Yupick! m&aacute;s cercana a su direcci&oacute;n de env&iacute;o]]></title>
175
  <model>yupick/ydral_recogeroficina</model>
176
  <gateway_url>http://www.yupick.es/yupick.clientes/webservice/WSpuntoentrega.php?wsdl</gateway_url>
177
  <gateway_url_pre>http://82.223.239.219/yupick.clientes/webservice/WSpuntoentrega.php?wsdl</gateway_url_pre>
3
  <config>
4
  <modules>
5
  <Ydral_Yupick>
6
+ <version>0.4.0</version>
7
  </Ydral_Yupick>
8
  </modules>
9
  <global>
171
  <carriers>
172
  <yupick>
173
  <active>0</active>
174
+ <title><![CDATA[Recoger paquete en tu punto Yupick!]]></title>
175
  <model>yupick/ydral_recogeroficina</model>
176
  <gateway_url>http://www.yupick.es/yupick.clientes/webservice/WSpuntoentrega.php?wsdl</gateway_url>
177
  <gateway_url_pre>http://82.223.239.219/yupick.clientes/webservice/WSpuntoentrega.php?wsdl</gateway_url_pre>
app/code/local/Ydral/Yupick/sql/yupick_setup/mysql4-upgrade-0.3.0-0.4.0.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ $installer = $this;
app/design/frontend/base/default/layout/yupick.xml CHANGED
@@ -4,7 +4,10 @@
4
  <reference name="head" ifconfig="carriers/yupick/active">
5
  <action method="addCss"><stylesheet>css/yupick.css</stylesheet></action>
6
  <action method="addItem"><type>skin_js</type><name>js/yupick.js</name></action>
7
- <block type="core/text" name="gmap.api.js"><action method="setText"><text><![CDATA[<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>]]></text></action></block>
 
 
 
8
  </reference>
9
  </checkout_onepage_index>
10
  <checkout_onepage_shippingmethod>
4
  <reference name="head" ifconfig="carriers/yupick/active">
5
  <action method="addCss"><stylesheet>css/yupick.css</stylesheet></action>
6
  <action method="addItem"><type>skin_js</type><name>js/yupick.js</name></action>
7
+ <!-- <block type="core/text" name="gmap.api.js"><action method="setText"><text><![CDATA[<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>]]></text></action></block>-->
8
+ <block type="core/template" name="maps">
9
+ <action method="setTemplate"><template>yupick/linksmaps.phtml</template></action>
10
+ </block>
11
  </reference>
12
  </checkout_onepage_index>
13
  <checkout_onepage_shippingmethod>
app/design/frontend/base/default/template/yupick/linksmaps.phtml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+ if (Mage::app()->getStore()->isCurrentlySecure()){
3
+ $url = 'https://maps-api-ssl.google.com/maps/api/js?sensor=false';
4
+ } else {
5
+ $url = 'http://maps.google.com/maps/api/js?sensor=false';
6
+ }
7
+ echo '<script type="text/javascript" src="' . $url . '"></script>';
app/design/frontend/base/default/template/yupick/shipping.phtml CHANGED
@@ -71,7 +71,7 @@
71
  </div>
72
  -->
73
  <img src="<?php echo($this->getSkinUrl('images/yupick/logo_small.gif')) ?>" alt="<?php echo Mage::helper('yupick')->__('Yupick') ?>" class="yupick-icon-checkout v-middle" />&nbsp;
74
- <a href="http://www.yupick.es/quees.html" target="_blank"><?php echo Mage::helper('yupick')->__('&iquest;Qu&eacute; es Yupick!?') ?></a>
75
  <?php endif; ?>
76
  <?php /* End Yupick! */ ?>
77
  </label>
@@ -93,25 +93,32 @@
93
  ?>
94
  <br />
95
  <?php /* <form id="yupick_options" name="yupick_options" action=""> */ ?>
96
- <input type="hidden" id="codigoPostal" name="codigoPostal" value="<?php echo $this->getQuote()->getShippingAddress()->getPostcode(); ?>" />
97
- <input type="hidden" id="checkUrl" name="checkUrl" value="<?php echo Mage::getUrl("yupick/index/getdata"); ?>" />
 
 
 
98
  <input type="hidden" id="skinPath" name="skinPath" value="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN); ?>" />
99
 
100
  <div id="yupick_carrier_principal" class="yupick_carrier_principal" style="display: none; ">
101
- <input id="option_mas20" name="option_mas20" type="checkbox" value="1" />&nbsp;<label><?php echo $this->__('Est&aacute; abierto m&aacute;s de las 20h.'); ?></label>
102
- <input id="option_sabados" name="option_sabados" type="checkbox" value="1" />&nbsp;<label><?php echo $this->__('Abierto los s&aacute;bados tarde.'); ?></label>
103
- <input id="option_domingos" name="option_domingos" type="checkbox" value="1" />&nbsp;<label><?php echo $this->__('Abierto los domingos.'); ?></label>
 
 
 
 
104
  </div>
105
  <div id="yupick_carrier_secundario" class="yupick_carrier_secundario" style="display: none; ">
106
- <input id="option_parking" name="option_parking" type="checkbox" value="1" />&nbsp;<label><?php echo $this->__('Parking.'); ?></label>
107
- <input id="option_wifi" name="option_wifi" type="checkbox" value="1" />&nbsp;<label><?php echo $this->__('Wi-Fi.'); ?></label>
108
- <input id="option_alimentacion" name="option_alimentacion" type="checkbox" value="1" />&nbsp;<label><?php echo $this->__('Alimentaci&oacute;n.'); ?></label>
109
- <input id="option_prensa" name="option_prensa" type="checkbox" value="1" />&nbsp;<label><?php echo $this->__('Prensa / Revistas.'); ?></label>
110
- <input id="option_tarjeta" name="option_tarjeta" type="checkbox" value="1" />&nbsp;<label><?php echo $this->__('Pagar con tarjeta de cr&eacute;dito.'); ?></label>
111
  </div>
112
 
113
  <div class="yupick_actions">
114
- <div class="yupick_button_search">
115
  <input type="button" value="Buscar" onclick="PuntosYupick.getPuntosYupick(); return false; " />
116
  </div>
117
  <div class="yupick_control_options">
71
  </div>
72
  -->
73
  <img src="<?php echo($this->getSkinUrl('images/yupick/logo_small.gif')) ?>" alt="<?php echo Mage::helper('yupick')->__('Yupick') ?>" class="yupick-icon-checkout v-middle" />&nbsp;
74
+ <a href="http://www.yupick.es/quees.html" target="_blank" onclick="nuevaVentana(this.href,'quees','400','480','yes');return false;"><?php echo Mage::helper('yupick')->__('&iquest;Qu&eacute; es Yupick!?') ?></a>
75
  <?php endif; ?>
76
  <?php /* End Yupick! */ ?>
77
  </label>
93
  ?>
94
  <br />
95
  <?php /* <form id="yupick_options" name="yupick_options" action=""> */ ?>
96
+ <!-- OJO cambios -->
97
+ <!-- <input type="hidden" id="codigoPostal" name="codigoPostal" value="<?php echo $this->getQuote()->getShippingAddress()->getPostcode(); ?>" />-->
98
+
99
+ <!-- no funciona en https <input type="hidden" id="checkUrl" name="checkUrl" value="<?php echo Mage::getUrl("yupick/index/getdata"); ?>" /> -->
100
+ <input type="hidden" id="checkUrl" name="checkUrl" value="<?php echo Mage::getUrl("yupick/index/getdata", array('_secure' => true)); ?>" />
101
  <input type="hidden" id="skinPath" name="skinPath" value="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN); ?>" />
102
 
103
  <div id="yupick_carrier_principal" class="yupick_carrier_principal" style="display: none; ">
104
+ <!-- OJO cambios -->
105
+ Calle: <input type="text" id="direccion" name="direccion" size="50" value="<?php echo $this->getQuote()->getShippingAddress()->getStreetFull() . ', ' . $this->getQuote()->getShippingAddress()->getCity() . ', ' . $this->getQuote()->getShippingAddress()->getRegion();?>" />
106
+ &nbsp;C&oacute;d.Postal:<input type="text" id="codigoPostal" name="codigoPostal" size="10" value="<?php echo $this->getQuote()->getShippingAddress()->getPostcode(); ?>" />
107
+ <br>
108
+ <input id="option_mas20" name="option_mas20" type="checkbox" value="on" />&nbsp;<label><?php echo $this->__('Est&aacute; abierto m&aacute;s de las 20h.'); ?></label>
109
+ <input id="option_sabados" name="option_sabados" type="checkbox" value="on" />&nbsp;<label><?php echo $this->__('Abierto los s&aacute;bados tarde.'); ?></label>
110
+ <input id="option_domingos" name="option_domingos" type="checkbox" value="on" />&nbsp;<label><?php echo $this->__('Abierto los domingos.'); ?></label>
111
  </div>
112
  <div id="yupick_carrier_secundario" class="yupick_carrier_secundario" style="display: none; ">
113
+ <input id="option_parking" name="option_parking" type="checkbox" value="on" />&nbsp;<label><?php echo $this->__('Parking.'); ?></label>
114
+ <input id="option_wifi" name="option_wifi" type="checkbox" value="on" />&nbsp;<label><?php echo $this->__('Wi-Fi.'); ?></label>
115
+ <input id="option_alimentacion" name="option_alimentacion" type="checkbox" value="on" />&nbsp;<label><?php echo $this->__('Alimentaci&oacute;n.'); ?></label>
116
+ <input id="option_prensa" name="option_prensa" type="checkbox" value="on" />&nbsp;<label><?php echo $this->__('Prensa / Revistas.'); ?></label>
117
+ <input id="option_tarjeta" name="option_tarjeta" type="checkbox" value="on" />&nbsp;<label><?php echo $this->__('Pagar con tarjeta de cr&eacute;dito.'); ?></label>
118
  </div>
119
 
120
  <div class="yupick_actions">
121
+ <div class="yupick_button_search">
122
  <input type="button" value="Buscar" onclick="PuntosYupick.getPuntosYupick(); return false; " />
123
  </div>
124
  <div class="yupick_control_options">
package.xml CHANGED
@@ -1,18 +1,20 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Ydral_Yupick</name>
4
- <version>0.3.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL 3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>M&#xF3;dulo para Magento para integrar los puntos de recogida de Yupick!</summary>
10
  <description>M&#xF3;dulo para Magento para integrar los puntos de recogida de Yupick!</description>
11
- <notes>Yupick!</notes>
12
- <authors><author><name>Ydral</name><user>Ydral</user><email>webmaster@ydral.com</email></author></authors>
13
- <date>2012-06-26</date>
14
- <time>22:10:55</time>
15
- <contents><target name="magelocal"><dir name="Ydral"><dir name="Yupick"><dir><dir name="Block"><dir name="Checkout"><dir name="Onepage"><dir name="Shipping"><dir name="Method"><file name="Available.php" hash="5d18425846fe38cbb6a89689f5028bc5"/></dir></dir></dir></dir><file name="Yupick.php" hash="9b339fe97818ccf1754dd673839c5132"/></dir><dir name="Helper"><file name="Data.php" hash="d161e76c5b5bc5509c29ea72c8018c9c"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Boyaca"><file name="Collection.php" hash="546fd69029d924657d7ce322dbd588c5"/></dir><file name="Yupick.php" hash="dea1b719163896ff47442cd02f3309b9"/></dir><file name="Observer.php" hash="881fb29024fee91bc6bf3ba800b1eeaf"/><dir name="Type"><file name="Onepage.php" hash="cd0009f236027e74c474d54f37429c97"/></dir><dir name="Ydral"><file name="Recogeroficina.php" hash="2ef6611d396f6938cab8b497607d1577"/><file name="Shipment.php" hash="59e8d255241f2261d65df8e6545b06ba"/><dir name="Source"><file name="Method.php" hash="99a702161e108c27f731626d8d1a32db"/></dir></dir><file name="Yupick.php" hash="72505d4ec8c0bf8b663e3e0a870bbc3f"/></dir><dir name="controllers"><file name="IndexController.php" hash="17c0df44b6c59f7dae750bcb7066080e"/></dir><dir name="etc"><file name="config.xml" hash="8fb23e615e4e7d2e6f1fc8e9b4c1340b"/><file name="system.xml" hash="52213ea9b1f0ea4f1ee1ac09ecda0965"/></dir><dir name="sql"><dir name="yupick_setup"><file name="mysql4-install-0.1.0.php" hash="ad2f5cd741181e0cd71fbab193a80094"/><file name="mysql4-upgrade-0.1.0-0.2.0.php" hash="a91ac4d35130ff6d11d876c711f810e2"/><file name="mysql4-upgrade-0.2.0-0.3.0.php" hash="a91ac4d35130ff6d11d876c711f810e2"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ydral_Yupick.xml" hash="f420cc41a8935a25faa4c0df7ef4c1db"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><file name="yupick.css" hash="8b41ae7949b8bde7ab6f0b0b31e48d13"/></dir><dir name="js"><file name="yupick.js" hash="74fabdd3553f4d4eab94484141c8e306"/></dir><dir name="images"><dir name="yupick"><file name="globo.png" hash="d8880a99065ebb3ab173df27613abf93"/><file name="globosombra.png" hash="1a50fd383f17fe25cc74da661ddd6b5a"/><file name="logo.gif" hash="21a6ab44b6300a61ac978284c7bb09ad"/><file name="logo_small.gif" hash="1ea5b75df0babbde827d4761c942a746"/><file name="opc-ajax-loader.gif" hash="e805ea7eca1f34c75ba0f93780d32d38"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="yupick.xml" hash="6cd118000269da3ef390d0c31ddea36d"/></dir><dir name="template"><dir name="yupick"><file name="tab_info.phtml" hash="494f48c9cf084fd08e2b7020513b88b5"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="yupick.xml" hash="198605392165576de98d5734ca777f60"/></dir><dir name="template"><dir name="yupick"><file name="info.phtml" hash="e0eb4891c623f2042a16ac2b3d0666d2"/><file name="shipping.phtml" hash="c7dc809f3d441faae942441807998de7"/></dir></dir></dir></dir></dir></target></contents>
 
 
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Ydral_Yupick</name>
4
+ <version>0.4.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL 3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>M&#xF3;dulo para Magento para integrar los puntos de recogida de Yupick!</summary>
10
  <description>M&#xF3;dulo para Magento para integrar los puntos de recogida de Yupick!</description>
11
+ <notes>- En "M&#xE1;s opciones de b&#xFA;squeda", a&#xF1;adida la Calle y C&#xF3;digo Postal para permitir la b&#xFA;squeda de Puntos Yupick! en direcciones diferentes de la de Facturaci&#xF3;n y Entrega.&#xD;
12
+ &#xD;
13
+ - Se ha a&#xF1;adido el soporte para que en tiendas seguras (HTTPS), se muestre correctamente la ubicaci&#xF3;n del punto seleccionado.</notes>
14
+ <authors><author><name>Ydral</name><user>Ydral</user><email>webmaster@ydral.com</email></author><author><name>Luis</name><user>Alvarez</user><email>lalvarez@boyaca.es</email></author></authors>
15
+ <date>2012-11-12</date>
16
+ <time>14:53:19</time>
17
+ <contents><target name="magelocal"><dir name="Ydral"><dir name="Yupick"><dir name="Block"><dir name="Checkout"><dir name="Onepage"><dir name="Shipping"><dir name="Method"><file name="Available.php" hash="0283b5f585e3899ee4893ac48ae4ed1b"/></dir></dir></dir></dir><file name="Yupick.php" hash="a44a88ca6668066be57617ef4bc59796"/></dir><dir name="Helper"><file name="Data.php" hash="d161e76c5b5bc5509c29ea72c8018c9c"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Boyaca"><file name="Collection.php" hash="546fd69029d924657d7ce322dbd588c5"/></dir><file name="Yupick.php" hash="3bbbd6befd30bfdf844011407fa4db1b"/></dir><file name="Observer.php" hash="881fb29024fee91bc6bf3ba800b1eeaf"/><dir name="Type"><file name="Onepage.php" hash="cd0009f236027e74c474d54f37429c97"/></dir><dir name="Ydral"><file name="Recogeroficina.php" hash="ba9104bbd564e9469048d11992fbf572"/><file name="Shipment.php" hash="59e8d255241f2261d65df8e6545b06ba"/><dir name="Source"><file name="Method.php" hash="99a702161e108c27f731626d8d1a32db"/></dir></dir><file name="Yupick.php" hash="d87f52757d55a01e5ed3de0952681234"/></dir><dir name="controllers"><file name="IndexController.php" hash="a16ef94be4cdc58957914d86b074f8a8"/></dir><dir name="etc"><file name="config.xml" hash="7a49397888b43af36e46f3b167b70bf9"/><file name="system.xml" hash="52213ea9b1f0ea4f1ee1ac09ecda0965"/></dir><dir name="sql"><dir name="yupick_setup"><file name="mysql4-install-0.1.0.php" hash="ad2f5cd741181e0cd71fbab193a80094"/><file name="mysql4-upgrade-0.1.0-0.2.0.php" hash="a91ac4d35130ff6d11d876c711f810e2"/><file name="mysql4-upgrade-0.2.0-0.3.0.php" hash="a91ac4d35130ff6d11d876c711f810e2"/><file name="mysql4-upgrade-0.3.0-0.4.0.php" hash="a91ac4d35130ff6d11d876c711f810e2"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="yupick.xml" hash="9314d2df7cf57c65074e18b5566b7c97"/></dir><dir name="template"><dir name="yupick"><file name="info.phtml" hash="e0eb4891c623f2042a16ac2b3d0666d2"/><file name="linksmaps.phtml" hash="33ec7673296ffff4418b2a15f676b2a8"/><file name="shipping.phtml" hash="2a335ddab7fa1d03469b7b6bbef3cfc4"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="yupick.xml" hash="6cd118000269da3ef390d0c31ddea36d"/></dir><dir name="template"><dir name="yupick"><file name="tab_info.phtml" hash="494f48c9cf084fd08e2b7020513b88b5"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ydral_Yupick.xml" hash="f420cc41a8935a25faa4c0df7ef4c1db"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><file name="yupick.css" hash="8b41ae7949b8bde7ab6f0b0b31e48d13"/></dir><dir name="images"><dir name="yupick"><file name="globo.png" hash="d8880a99065ebb3ab173df27613abf93"/><file name="globosombra.png" hash="1a50fd383f17fe25cc74da661ddd6b5a"/><file name="logo.gif" hash="21a6ab44b6300a61ac978284c7bb09ad"/><file name="logo_small.gif" hash="1ea5b75df0babbde827d4761c942a746"/><file name="opc-ajax-loader.gif" hash="e805ea7eca1f34c75ba0f93780d32d38"/></dir></dir><dir name="js"><file name="yupick.js" hash="82da2f5bbbe1a17b4a670b58a0857209"/></dir></dir></dir></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
20
  </package>
skin/frontend/default/default/js/yupick.js CHANGED
@@ -12,7 +12,8 @@ PuntosYupick.prototype = {
12
  $$('.main').invoke('observe', 'click', function(e)
13
  {
14
  var element = e.element();
15
- if (element.getValue())
 
16
  {
17
  if (element.getValue() == 'yupick_yupick')
18
  {
@@ -26,14 +27,69 @@ PuntosYupick.prototype = {
26
 
27
  getPuntosYupick:function()
28
  {
29
-
30
- this.reloadurl = $('checkUrl').value;
31
- Element.show('loadingmask');
32
- new Ajax.Request(this.reloadurl, {
33
- method: 'post',
34
- parameters: {codigoPostal: $('codigoPostal').value, option_parking: $('option_parking').value, option_wifi: $('option_wifi').value, option_alimentacion: $('option_alimentacion').value, option_prensa: $('option_prensa').value, option_tarjeta: $('option_tarjeta').value, option_mas20: $('option_mas20').value, option_sabados: $('option_sabados').value, option_domingos: $('option_domingos').value},
35
- onComplete: this.reloadChildren.bind(this)
36
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
  },
39
 
@@ -136,7 +192,17 @@ PuntosYupick.prototype = {
136
  $('yupick_info_time').update(tablaHorarios);
137
 
138
  }
139
-
140
  }
141
 
142
  var PuntosYupick = new PuntosYupick();
 
 
 
 
 
 
 
 
 
 
 
12
  $$('.main').invoke('observe', 'click', function(e)
13
  {
14
  var element = e.element();
15
+ //OJO: prueba error
16
+ if (element.getValue)
17
  {
18
  if (element.getValue() == 'yupick_yupick')
19
  {
27
 
28
  getPuntosYupick:function()
29
  {
30
+ if ($('direccion').value == '' && $('codigoPostal').value == '') {
31
+ alert('Debe introducir la Calle y/o el Código Postal');
32
+ $('direccion').focus();
33
+ } else {
34
+ this.reloadurl = $('checkUrl').value;
35
+ Element.show('loadingmask');
36
+ if (!$('option_parking').checked) {
37
+ $('option_parking').value = '';
38
+ } else {
39
+ $('option_parking').value = 'on';
40
+ }
41
+ if (!$('option_wifi').checked) {
42
+ $('option_wifi').value = '';
43
+ } else {
44
+ $('option_wifi').value = 'on';
45
+ }
46
+ if (!$('option_alimentacion').checked) {
47
+ $('option_alimentacion').value = '';
48
+ } else {
49
+ $('option_alimentacion').value = 'on';
50
+ }
51
+ if (!$('option_prensa').checked) {
52
+ $('option_prensa').value = '';
53
+ } else {
54
+ $('option_prensa').value = 'on';
55
+ }
56
+ if (!$('option_tarjeta').checked) {
57
+ $('option_tarjeta').value = '';
58
+ } else {
59
+ $('option_tarjeta').value = 'on';
60
+ }
61
+ if (!$('option_mas20').checked) {
62
+ $('option_mas20').value = '';
63
+ } else {
64
+ $('option_mas20').value = 'on';
65
+ }
66
+ if (!$('option_sabados').checked) {
67
+ $('option_sabados').value = '';
68
+ } else {
69
+ $('option_sabados').value = 'on';
70
+ }
71
+ if (!$('option_domingos').checked) {
72
+ $('option_domingos').value = '';
73
+ } else {
74
+ $('option_domingos').value = 'on';
75
+ }
76
+
77
+ new Ajax.Request(this.reloadurl, {
78
+ method: 'post',
79
+ //OJO Cambios
80
+ parameters: {direccion: $('direccion').value,
81
+ codigoPostal: $('codigoPostal').value,
82
+ option_parking: $('option_parking').value,
83
+ option_wifi: $('option_wifi').value,
84
+ option_alimentacion: $('option_alimentacion').value,
85
+ option_prensa: $('option_prensa').value,
86
+ option_tarjeta: $('option_tarjeta').value,
87
+ option_mas20: $('option_mas20').value,
88
+ option_sabados: $('option_sabados').value,
89
+ option_domingos: $('option_domingos').value},
90
+ onComplete: this.reloadChildren.bind(this)
91
+ });
92
+ }
93
 
94
  },
95
 
192
  $('yupick_info_time').update(tablaHorarios);
193
 
194
  }
 
195
  }
196
 
197
  var PuntosYupick = new PuntosYupick();
198
+
199
+ var win = null;
200
+
201
+ function nuevaVentana(mypage, myname, w, h, scroll)
202
+ {
203
+ lpos = (screen.width) ? (screen.width-w)/2 : 0;
204
+ tpos = (screen.height) ? (screen.height-h)/2 : 0;
205
+ settings = 'height=' + h + ',width=' + w + ',top=' + tpos + ',left=' + lpos + ',scrollbars=' + scroll + ',resizable';
206
+ //alert(settings);
207
+ win = window.open(mypage,myname,settings);
208
+ }