Version Notes
* Arregla el error "Undefined variable: region"
CHANGES:
->U /var/www/e-svn/html/perfume11/app/code/community/Nacex/Shipping/Model/Carrier/Spainpost.php
Download this release
Release Info
Developer | Magento Core Team |
Extension | Shipping_Nacex |
Version | 1.0.5 |
Comparing to | |
See all releases |
Code changes from version 1.0.4 to 1.0.5
app/code/community/Nacex/Shipping/Model/Carrier/Spainpost.php
CHANGED
@@ -54,8 +54,8 @@ class Nacex_Shipping_Model_Carrier_Spainpost extends Mage_Shipping_Model_Carrier
|
|
54 |
|
55 |
//check if cart order value falls between the minimum and maximum order amounts required
|
56 |
$packagevalue = $request->getBaseCurrency()->convert($request->getPackageValue(), $request->getPackageCurrency());
|
57 |
-
$minorderval = $this->getConfigData('min_order_value');
|
58 |
-
$maxorderval = $this->getConfigData('max_order_value');
|
59 |
if($packagevalue <= $minorderval || (($maxorderval != '0') && $packagevalue >= $maxorderval)){
|
60 |
return false;
|
61 |
}
|
@@ -108,6 +108,7 @@ class Nacex_Shipping_Model_Carrier_Spainpost extends Mage_Shipping_Model_Carrier
|
|
108 |
$shippingPrice += $handlingFee;
|
109 |
}
|
110 |
|
|
|
111 |
$this->_comment .= "TIENDA: {$this->_frompcode}\n";
|
112 |
$this->_comment .= "CLIENTE: {$this->_topcode}\n";
|
113 |
$this->_comment .= "SERVICIO: {$this->_servicio}\n";
|
@@ -115,6 +116,7 @@ class Nacex_Shipping_Model_Carrier_Spainpost extends Mage_Shipping_Model_Carrier
|
|
115 |
$this->_comment .= "PRECIO: {$old_price}\n";
|
116 |
$this->_comment .= "UNIDAD DE PESO: {$sweightunit}\n";
|
117 |
$this->_comment .= "PESO: {$this->_sweight}\n";
|
|
|
118 |
|
119 |
$method->setCarrier('spainpost');
|
120 |
$method->setCarrierTitle($this->getConfigData('title'));
|
@@ -130,10 +132,11 @@ class Nacex_Shipping_Model_Carrier_Spainpost extends Mage_Shipping_Model_Carrier
|
|
130 |
}
|
131 |
|
132 |
public function getRegion($topcode,$compare=null){
|
|
|
133 |
$ind=substr($topcode,0,2);
|
134 |
foreach($this->_regions as $id => $val){
|
135 |
if(in_array($ind,$val)){
|
136 |
-
$region
|
137 |
continue;
|
138 |
}
|
139 |
}
|
54 |
|
55 |
//check if cart order value falls between the minimum and maximum order amounts required
|
56 |
$packagevalue = $request->getBaseCurrency()->convert($request->getPackageValue(), $request->getPackageCurrency());
|
57 |
+
$minorderval = (int)$this->getConfigData('min_order_value');
|
58 |
+
$maxorderval = (int)$this->getConfigData('max_order_value');
|
59 |
if($packagevalue <= $minorderval || (($maxorderval != '0') && $packagevalue >= $maxorderval)){
|
60 |
return false;
|
61 |
}
|
108 |
$shippingPrice += $handlingFee;
|
109 |
}
|
110 |
|
111 |
+
/*
|
112 |
$this->_comment .= "TIENDA: {$this->_frompcode}\n";
|
113 |
$this->_comment .= "CLIENTE: {$this->_topcode}\n";
|
114 |
$this->_comment .= "SERVICIO: {$this->_servicio}\n";
|
116 |
$this->_comment .= "PRECIO: {$old_price}\n";
|
117 |
$this->_comment .= "UNIDAD DE PESO: {$sweightunit}\n";
|
118 |
$this->_comment .= "PESO: {$this->_sweight}\n";
|
119 |
+
*/
|
120 |
|
121 |
$method->setCarrier('spainpost');
|
122 |
$method->setCarrierTitle($this->getConfigData('title'));
|
132 |
}
|
133 |
|
134 |
public function getRegion($topcode,$compare=null){
|
135 |
+
$region = null;
|
136 |
$ind=substr($topcode,0,2);
|
137 |
foreach($this->_regions as $id => $val){
|
138 |
if(in_array($ind,$val)){
|
139 |
+
$region = $id;
|
140 |
continue;
|
141 |
}
|
142 |
}
|
app/code/community/Nacex/Shipping/etc/config.xml
CHANGED
@@ -51,7 +51,7 @@
|
|
51 |
<type>O</type>
|
52 |
<title>Nacex</title>
|
53 |
<min_order_value>0</min_order_value>
|
54 |
-
<max_order_value>
|
55 |
<weight_units>1</weight_units>
|
56 |
<handling_fee>0</handling_fee>
|
57 |
<specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg>
|
51 |
<type>O</type>
|
52 |
<title>Nacex</title>
|
53 |
<min_order_value>0</min_order_value>
|
54 |
+
<max_order_value>0</max_order_value>
|
55 |
<weight_units>1</weight_units>
|
56 |
<handling_fee>0</handling_fee>
|
57 |
<specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg>
|
package.xml
CHANGED
@@ -1,25 +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
|
12 |
-
* Permite configurar si toma el peso de los productos en gramos o en kilos.
|
13 |
|
14 |
-
CHANGES
|
15 |
-
->
|
16 |
-
->U /var/www/e-svn/html/perfume11/app/code/community/Nacex/Shipping/Model/Carrier/Spainpost.php
|
17 |
-
->U /var/www/e-svn/html/perfume11/app/code/community/Nacex/Shipping/etc/system.xml
|
18 |
-
->U /var/www/e-svn/html/perfume11/app/code/community/Nacex/Shipping/etc/config.xml</notes>
|
19 |
<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>
|
20 |
-
<date>2008-
|
21 |
-
<time>
|
22 |
-
<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="
|
23 |
<compatible/>
|
24 |
<dependencies/>
|
25 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Shipping_Nacex</name>
|
4 |
+
<version>1.0.5</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 "Undefined variable: region"
|
|
|
12 |
|
13 |
+
<b>CHANGES:</b>
|
14 |
+
->U /var/www/e-svn/html/perfume11/app/code/community/Nacex/Shipping/Model/Carrier/Spainpost.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-03</date>
|
17 |
+
<time>15:55:02</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="ea049f5d40de90455b7ae01ac8029ed5"/><file name="system.xml" hash="860524dafb1cb9ee911aa8dd9d05facf"/></dir><dir name="Helper"><file name="Data.php" hash="b5d80af85823935e1e91081f0b5989aa"/></dir><dir name="Model"><dir name="Carrier"><file name="Spainpost.php" hash="0cfae46c7e829467339bb982b6eee741"/></dir><file name="Weightunits.php" hash="77db09797e9828b7e107abbe2f282ee1"/></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>
|