Version Notes
* Arregla el error cuando el envio era provincial bag no se mostraba el metodo
CHANGES:
->U app/code/community/Nacex/Shipping/Model/Standard/Data.php
Download this release
Release Info
Developer | Magento Core Team |
Extension | Shipping_Nacex |
Version | 1.0.11 |
Comparing to | |
See all releases |
Code changes from version 1.0.10 to 1.0.11
app/code/community/Nacex/Shipping/Model/Standard/Data.php
CHANGED
@@ -87,86 +87,89 @@ class Nacex_Shipping_Model_Standard_Data {
|
|
87 |
$sweight = $params['sweight'];
|
88 |
if(!$servicio) Mage::log(Mage::helper('nacex')->__('Servicio no disponible, alerta en linea: #%s de "%s"',__LINE__,__FILE__),Zend_Log::ALERT);
|
89 |
if(!$sweight) Mage::log(Mage::helper('nacex')->__('Peso no disponible. Se tomara el importe minimo del servicio, para una mayor precision por favor cargue el peso de los productos'),Zend_Log::ALERT);
|
90 |
-
|
91 |
$params = array('price'=>0);
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
$params['shipping_method'] = 'BAG';
|
97 |
$params['price'] = 6.01;
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
} else {
|
103 |
-
$params['price'] = 8.49;
|
104 |
-
$peso=$sweight - 10000;
|
105 |
-
$params['price'] += (ceil($peso / 5000)) * 1.91;
|
106 |
-
}
|
107 |
-
break;
|
108 |
-
case 'REGIONAL':
|
109 |
-
$params['shipping_method'] = 'PACK';
|
110 |
-
if($sweight <= '2000') {
|
111 |
-
$params['shipping_method'] = 'BAG';
|
112 |
-
$params['price'] = 7.11;
|
113 |
-
} elseif(($sweight > '2000') && ($sweight <='5000')){
|
114 |
-
$params['price'] = 18.88;
|
115 |
-
} elseif(($sweight > '5000') && ($sweight <='10000')){
|
116 |
-
$params['price'] = 25.84;
|
117 |
-
} else {
|
118 |
-
$params['price'] = 25.84;
|
119 |
-
$peso=$sweight - 10000;
|
120 |
-
$params['price'] += (ceil($peso / 5000)) * 3.62;
|
121 |
-
}
|
122 |
-
break;
|
123 |
-
case 'NACIONAL':
|
124 |
-
$params['shipping_method'] = 'PACK';
|
125 |
-
if($sweight <= '2000') {
|
126 |
-
$params['shipping_method'] = 'BAG';
|
127 |
-
$params['price'] = 7.58;
|
128 |
-
} elseif(($sweight > '2000') && ($sweight <='5000')){
|
129 |
-
$params['price'] = 9.57;
|
130 |
-
} elseif(($sweight > '5000') && ($sweight <='10000')){
|
131 |
-
$params['price'] = 13.54;
|
132 |
-
} else {
|
133 |
-
$params['price'] = 13.54;
|
134 |
-
$peso=$sweight - 10000;
|
135 |
-
$params['price'] += (ceil($peso / 5000)) * 3.96;
|
136 |
-
}
|
137 |
-
break;
|
138 |
-
case 'NACIONAL_BALEARES':
|
139 |
-
$params['shipping_method'] = 'PACK';
|
140 |
-
if($sweight <= '2000') {
|
141 |
-
$params['shipping_method'] = 'BAG';
|
142 |
-
$params['price'] = 10.56;
|
143 |
-
} elseif(($sweight > '2000') && ($sweight <='4000')){
|
144 |
-
$params['price'] = 16.48;
|
145 |
-
} else {
|
146 |
-
$params['price'] = 16.48;
|
147 |
-
$peso=$sweight - 4000;
|
148 |
-
$params['price'] += (ceil($peso / 2000)) * 4;
|
149 |
-
}
|
150 |
-
break;
|
151 |
-
case 'INTRAISLAS':
|
152 |
-
$params['shipping_method'] = 'PACK';
|
153 |
-
if($sweight <= '2000') {
|
154 |
-
$params['shipping_method'] = 'BAG';
|
155 |
-
$params['price'] = 6.18;
|
156 |
-
} elseif(($sweight <= '5000')){
|
157 |
-
$params['price'] = 6.95;
|
158 |
-
} elseif(($sweight <='10000')){
|
159 |
-
$params['price'] = 8.76;
|
160 |
-
} else {
|
161 |
-
$params['price'] = 8.76;
|
162 |
-
$peso=$sweight - 10000;
|
163 |
-
$params['price'] += (ceil($peso / 5000)) * 1.99;
|
164 |
-
}
|
165 |
-
break;
|
166 |
-
default:
|
167 |
-
$params['shipping_method'] = 'BAG';
|
168 |
-
$params['price'] = 6.01;
|
169 |
-
break;
|
170 |
}
|
171 |
// Agrega el iva mas un Euro
|
172 |
$params['price'] = ($params['price'] * 1.16) + 1;
|
87 |
$sweight = $params['sweight'];
|
88 |
if(!$servicio) Mage::log(Mage::helper('nacex')->__('Servicio no disponible, alerta en linea: #%s de "%s"',__LINE__,__FILE__),Zend_Log::ALERT);
|
89 |
if(!$sweight) Mage::log(Mage::helper('nacex')->__('Peso no disponible. Se tomara el importe minimo del servicio, para una mayor precision por favor cargue el peso de los productos'),Zend_Log::ALERT);
|
|
|
90 |
$params = array('price'=>0);
|
91 |
+
try {
|
92 |
+
switch($servicio){
|
93 |
+
case 'PROVINCIAL':
|
94 |
+
$params['shipping_method'] = 'PACK';
|
95 |
+
if($sweight <= '2000') {
|
96 |
+
$params['shipping_method'] = 'BAG';
|
97 |
+
$params['price'] = 6.01;
|
98 |
+
} elseif(($sweight > '2000') && ($sweight <='5000')){
|
99 |
+
$params['price'] = 6.74;
|
100 |
+
} elseif(($sweight > '5000') && ($sweight <='10000')){
|
101 |
+
$params['price'] = 8.49;
|
102 |
+
} else {
|
103 |
+
$params['price'] = 8.49;
|
104 |
+
$peso=$sweight - 10000;
|
105 |
+
$params['price'] += (ceil($peso / 5000)) * 1.91;
|
106 |
+
}
|
107 |
+
break;
|
108 |
+
case 'REGIONAL':
|
109 |
+
$params['shipping_method'] = 'PACK';
|
110 |
+
if($sweight <= '2000') {
|
111 |
+
$params['shipping_method'] = 'BAG';
|
112 |
+
$params['price'] = 7.11;
|
113 |
+
} elseif(($sweight > '2000') && ($sweight <='5000')){
|
114 |
+
$params['price'] = 18.88;
|
115 |
+
} elseif(($sweight > '5000') && ($sweight <='10000')){
|
116 |
+
$params['price'] = 25.84;
|
117 |
+
} else {
|
118 |
+
$params['price'] = 25.84;
|
119 |
+
$peso=$sweight - 10000;
|
120 |
+
$params['price'] += (ceil($peso / 5000)) * 3.62;
|
121 |
+
}
|
122 |
+
break;
|
123 |
+
case 'NACIONAL':
|
124 |
+
$params['shipping_method'] = 'PACK';
|
125 |
+
if($sweight <= '2000') {
|
126 |
+
$params['shipping_method'] = 'BAG';
|
127 |
+
$params['price'] = 7.58;
|
128 |
+
} elseif(($sweight > '2000') && ($sweight <='5000')){
|
129 |
+
$params['price'] = 9.57;
|
130 |
+
} elseif(($sweight > '5000') && ($sweight <='10000')){
|
131 |
+
$params['price'] = 13.54;
|
132 |
+
} else {
|
133 |
+
$params['price'] = 13.54;
|
134 |
+
$peso=$sweight - 10000;
|
135 |
+
$params['price'] += (ceil($peso / 5000)) * 3.96;
|
136 |
+
}
|
137 |
+
break;
|
138 |
+
case 'NACIONAL_BALEARES':
|
139 |
+
$params['shipping_method'] = 'PACK';
|
140 |
+
if($sweight <= '2000') {
|
141 |
+
$params['shipping_method'] = 'BAG';
|
142 |
+
$params['price'] = 10.56;
|
143 |
+
} elseif(($sweight > '2000') && ($sweight <='4000')){
|
144 |
+
$params['price'] = 16.48;
|
145 |
+
} else {
|
146 |
+
$params['price'] = 16.48;
|
147 |
+
$peso=$sweight - 4000;
|
148 |
+
$params['price'] += (ceil($peso / 2000)) * 4;
|
149 |
+
}
|
150 |
+
break;
|
151 |
+
case 'INTRAISLAS':
|
152 |
+
$params['shipping_method'] = 'PACK';
|
153 |
+
if($sweight <= '2000') {
|
154 |
+
$params['shipping_method'] = 'BAG';
|
155 |
+
$params['price'] = 6.18;
|
156 |
+
} elseif(($sweight <= '5000')){
|
157 |
+
$params['price'] = 6.95;
|
158 |
+
} elseif(($sweight <='10000')){
|
159 |
+
$params['price'] = 8.76;
|
160 |
+
} else {
|
161 |
+
$params['price'] = 8.76;
|
162 |
+
$peso=$sweight - 10000;
|
163 |
+
$params['price'] += (ceil($peso / 5000)) * 1.99;
|
164 |
+
}
|
165 |
+
break;
|
166 |
+
default:
|
167 |
$params['shipping_method'] = 'BAG';
|
168 |
$params['price'] = 6.01;
|
169 |
+
break;
|
170 |
+
}
|
171 |
+
} catch (Exception $e) {
|
172 |
+
Mage::logException($e);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
}
|
174 |
// Agrega el iva mas un Euro
|
175 |
$params['price'] = ($params['price'] * 1.16) + 1;
|
package.xml
CHANGED
@@ -1,21 +1,21 @@
|
|
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>* Arregla el error
|
12 |
|
13 |
<b>CHANGES:</b>
|
14 |
->U app/code/community/Nacex/Shipping/Model/Standard/Data.php</notes>
|
15 |
<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>
|
16 |
<date>2008-12-18</date>
|
17 |
-
<time>
|
18 |
-
<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="2c1e78bb05b68f7fd8f2d249d6c5015b"/><file name="system.xml" hash="3471e2c65a86e45f9ebad5cbf094777e"/></dir><dir name="Helper"><file name="Data.php" hash="8b06d6514b9924564f9078dd15cedc00"/></dir><dir name="Model"><dir name="Carrier"><file name="Naxgab.php" hash="6453eda945279aef44dc2ce120e64d1c"/><file name="Naxjow.php" hash="4237353036ecd090c6d31bc427280859"/></dir><dir name="Standard"><file name="Data.php" hash="
|
19 |
<compatible/>
|
20 |
<dependencies/>
|
21 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Shipping_Nacex</name>
|
4 |
+
<version>1.0.11</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>* Arregla el error cuando el envio era provincial bag no se mostraba el metodo
|
12 |
|
13 |
<b>CHANGES:</b>
|
14 |
->U app/code/community/Nacex/Shipping/Model/Standard/Data.php</notes>
|
15 |
<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>
|
16 |
<date>2008-12-18</date>
|
17 |
+
<time>13:37:39</time>
|
18 |
+
<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="2c1e78bb05b68f7fd8f2d249d6c5015b"/><file name="system.xml" hash="3471e2c65a86e45f9ebad5cbf094777e"/></dir><dir name="Helper"><file name="Data.php" hash="8b06d6514b9924564f9078dd15cedc00"/></dir><dir name="Model"><dir name="Carrier"><file name="Naxgab.php" hash="6453eda945279aef44dc2ce120e64d1c"/><file name="Naxjow.php" hash="4237353036ecd090c6d31bc427280859"/></dir><dir name="Standard"><file name="Data.php" hash="712f97b18018d2bc75a527b556ebd29e"/><file name="Weightunits.php" hash="3222717edd1948d4a793f7136d5f1868"/></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>
|
19 |
<compatible/>
|
20 |
<dependencies/>
|
21 |
</package>
|