Version Notes
1.0.2
* Correccion en las funciones.
* Agregado de comentarios para verificar que los datos vayan bien.
CHANGES:
->U app/code/community/Nacex/Shipping/Model/Carrier/Spainpost.php
Download this release
Release Info
Developer | Magento Core Team |
Extension | Shipping_Nacex |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
app/code/community/Nacex/Shipping/Model/Carrier/Spainpost.php
CHANGED
@@ -83,7 +83,7 @@ class Nacex_Shipping_Model_Carrier_Spainpost extends Mage_Shipping_Model_Carrier
|
|
83 |
$price=($this->getPrecio() * 1.16) + 1;
|
84 |
|
85 |
$method = Mage::getModel('shipping/rate_result_method');
|
86 |
-
|
87 |
$type = $this->getConfigData('type');
|
88 |
$qty = $request->getPackageQty();
|
89 |
|
@@ -122,7 +122,6 @@ class Nacex_Shipping_Model_Carrier_Spainpost extends Mage_Shipping_Model_Carrier
|
|
122 |
|
123 |
public function getRegion($topcode,$compare=null){
|
124 |
$ind=substr($topcode,0,2);
|
125 |
-
$prov=$this->_prov[$ind];
|
126 |
foreach($this->_regions as $id => $val){
|
127 |
if(in_array($ind,$val)){
|
128 |
$region=$id;
|
@@ -136,6 +135,7 @@ class Nacex_Shipping_Model_Carrier_Spainpost extends Mage_Shipping_Model_Carrier
|
|
136 |
else
|
137 |
return false;
|
138 |
}
|
|
|
139 |
return $region;
|
140 |
}
|
141 |
|
@@ -195,7 +195,7 @@ class Nacex_Shipping_Model_Carrier_Spainpost extends Mage_Shipping_Model_Carrier
|
|
195 |
$price += (ceil($peso / 5000)) * 3.96;
|
196 |
}
|
197 |
break;
|
198 |
-
case '
|
199 |
$this->_shipping_method = 'PACK';
|
200 |
if($this->_sweight <= '2000') {
|
201 |
$this->_shipping_method = 'BAG';
|
@@ -225,6 +225,8 @@ class Nacex_Shipping_Model_Carrier_Spainpost extends Mage_Shipping_Model_Carrier
|
|
225 |
break;
|
226 |
|
227 |
}
|
|
|
|
|
228 |
return $price;
|
229 |
}
|
230 |
|
@@ -234,15 +236,16 @@ class Nacex_Shipping_Model_Carrier_Spainpost extends Mage_Shipping_Model_Carrier
|
|
234 |
* con respecto a la tienda
|
235 |
*/
|
236 |
public function setServicio(){
|
237 |
-
|
|
|
238 |
// PARA LA TIENDA EN BALEARES
|
239 |
case '07':
|
240 |
-
if($this->
|
241 |
// PRECIO INTRAISLAS
|
242 |
$this->_servicio='INTRAISLAS';
|
243 |
-
} else
|
244 |
// PRECIO NACIONAL PARA TODA ESPA�A
|
245 |
-
$this->_servicio='
|
246 |
}
|
247 |
break;
|
248 |
// PARA LA TIENDA EN EL RESTO DE ESPA�A
|
@@ -262,5 +265,6 @@ class Nacex_Shipping_Model_Carrier_Spainpost extends Mage_Shipping_Model_Carrier
|
|
262 |
}
|
263 |
break;
|
264 |
}
|
|
|
265 |
}
|
266 |
}
|
83 |
$price=($this->getPrecio() * 1.16) + 1;
|
84 |
|
85 |
$method = Mage::getModel('shipping/rate_result_method');
|
86 |
+
|
87 |
$type = $this->getConfigData('type');
|
88 |
$qty = $request->getPackageQty();
|
89 |
|
122 |
|
123 |
public function getRegion($topcode,$compare=null){
|
124 |
$ind=substr($topcode,0,2);
|
|
|
125 |
foreach($this->_regions as $id => $val){
|
126 |
if(in_array($ind,$val)){
|
127 |
$region=$id;
|
135 |
else
|
136 |
return false;
|
137 |
}
|
138 |
+
echo "<!--REGION: {$region}-->";
|
139 |
return $region;
|
140 |
}
|
141 |
|
195 |
$price += (ceil($peso / 5000)) * 3.96;
|
196 |
}
|
197 |
break;
|
198 |
+
case 'NACIONAL_BALEARES':
|
199 |
$this->_shipping_method = 'PACK';
|
200 |
if($this->_sweight <= '2000') {
|
201 |
$this->_shipping_method = 'BAG';
|
225 |
break;
|
226 |
|
227 |
}
|
228 |
+
echo "<!--METODO: {$this->_shipping_method}-->";
|
229 |
+
echo "<!--PRECIO: {$price}-->";
|
230 |
return $price;
|
231 |
}
|
232 |
|
236 |
* con respecto a la tienda
|
237 |
*/
|
238 |
public function setServicio(){
|
239 |
+
$code_store = substr($this->_frompcode,0,2);
|
240 |
+
switch($code_store){
|
241 |
// PARA LA TIENDA EN BALEARES
|
242 |
case '07':
|
243 |
+
if(getRegion($code_store,$this->_topcode)){
|
244 |
// PRECIO INTRAISLAS
|
245 |
$this->_servicio='INTRAISLAS';
|
246 |
+
} else {
|
247 |
// PRECIO NACIONAL PARA TODA ESPA�A
|
248 |
+
$this->_servicio='NACIONAL_BALEARES';
|
249 |
}
|
250 |
break;
|
251 |
// PARA LA TIENDA EN EL RESTO DE ESPA�A
|
265 |
}
|
266 |
break;
|
267 |
}
|
268 |
+
echo "<!--SERVICIO: {$this->_servicio}-->";
|
269 |
}
|
270 |
}
|
package.xml
CHANGED
@@ -1,23 +1,23 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Shipping_Nacex</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Metodo de envio para nacex</summary>
|
10 |
<description>Metodo de envio para nacex</description>
|
11 |
-
<notes>1.0.
|
12 |
-
* Correccion
|
13 |
-
* Agregado de
|
14 |
|
15 |
CHANGES:
|
16 |
->U app/code/community/Nacex/Shipping/Model/Carrier/Spainpost.php</notes>
|
17 |
<authors><author><name>Manuel</name><user>auto-converted</user><email>manuelcanepa@gmail.com</email></author><author><name>Sophie</name><user>auto-converted</user><email>lalyostres@gmail.com</email></author></authors>
|
18 |
-
<date>2008-10-
|
19 |
-
<time>
|
20 |
-
<contents><target name="mageetc"><dir name="modules"><file name="Nacex_Shipping.xml" hash="74bdf7f9847df2280af2666d8123d95b"/></dir></target><target name="magecommunity"><dir name="Nacex"><dir name="Shipping"><dir name="etc"><file name="config.xml" hash="da635493540be9ff524d891f76d752f1"/><file name="system.xml" hash="36b62fc3eeb18084f6c4626373f4bbd4"/></dir><dir name="Helper"><file name="Data.php" hash="b5d80af85823935e1e91081f0b5989aa"/></dir><dir name="Model"><dir name="Carrier"><file name="Spainpost.php" hash="
|
21 |
<compatible/>
|
22 |
<dependencies/>
|
23 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Shipping_Nacex</name>
|
4 |
+
<version>1.0.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Metodo de envio para nacex</summary>
|
10 |
<description>Metodo de envio para nacex</description>
|
11 |
+
<notes>1.0.2
|
12 |
+
* Correccion en las funciones.
|
13 |
+
* Agregado de comentarios para verificar que los datos vayan bien.
|
14 |
|
15 |
CHANGES:
|
16 |
->U app/code/community/Nacex/Shipping/Model/Carrier/Spainpost.php</notes>
|
17 |
<authors><author><name>Manuel</name><user>auto-converted</user><email>manuelcanepa@gmail.com</email></author><author><name>Sophie</name><user>auto-converted</user><email>lalyostres@gmail.com</email></author></authors>
|
18 |
+
<date>2008-10-17</date>
|
19 |
+
<time>11:50:14</time>
|
20 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Nacex_Shipping.xml" hash="74bdf7f9847df2280af2666d8123d95b"/></dir></target><target name="magecommunity"><dir name="Nacex"><dir name="Shipping"><dir name="etc"><file name="config.xml" hash="da635493540be9ff524d891f76d752f1"/><file name="system.xml" hash="36b62fc3eeb18084f6c4626373f4bbd4"/></dir><dir name="Helper"><file name="Data.php" hash="b5d80af85823935e1e91081f0b5989aa"/></dir><dir name="Model"><dir name="Carrier"><file name="Spainpost.php" hash="1cc5da890adbea2260bde35a65820c61"/></dir></dir><dir name="sql"><dir name="shipping_setup"><file name="mysql4-install-0.1.0.php" hash="d614fdc964125e1ff642933cc8014583"/></dir></dir></dir></dir></target></contents>
|
21 |
<compatible/>
|
22 |
<dependencies/>
|
23 |
</package>
|