Version Notes
- Weight problems solved and creating just one volume per cart.
Download this release
Release Info
Developer | Intelipost |
Extension | Intelipost |
Version | 1.1.0.4 |
Comparing to | |
See all releases |
Code changes from version 1.1.0.3 to 1.1.0.4
app/code/local/Intelipost/Shipping/Model/Carrier/Intelipost.php
CHANGED
@@ -25,7 +25,7 @@ class Intelipost_Shipping_Model_Carrier_Intelipost
|
|
25 |
return false;
|
26 |
}
|
27 |
|
28 |
-
$originZipCode = $this->getConfigData('zipcode');
|
29 |
$destinationZipCode = $request->getDestPostcode();
|
30 |
|
31 |
if (!preg_match($this->_zipCodeRegex, $originZipCode) || !preg_match($this->_zipCodeRegex, $destinationZipCode)) {
|
@@ -52,9 +52,9 @@ class Intelipost_Shipping_Model_Carrier_Intelipost
|
|
52 |
|
53 |
$price = $request->getPackageValue();
|
54 |
|
55 |
-
|
56 |
-
$api_key =
|
57 |
-
$api_url =
|
58 |
|
59 |
if(!isset($api_key) || !is_string($api_key)) {
|
60 |
Mage::log('Intelipost not configured', null, 'intelipost.log', true);
|
@@ -77,7 +77,8 @@ class Intelipost_Shipping_Model_Carrier_Intelipost
|
|
77 |
$dimension_check = $this->getConfigData('notification');
|
78 |
|
79 |
$i = 0;
|
80 |
-
|
|
|
81 |
// Volume calculation for a package
|
82 |
foreach ( $request->getAllItems() as $item) {
|
83 |
|
25 |
return false;
|
26 |
}
|
27 |
|
28 |
+
$originZipCode = trim($this->getConfigData('zipcode'));
|
29 |
$destinationZipCode = $request->getDestPostcode();
|
30 |
|
31 |
if (!preg_match($this->_zipCodeRegex, $originZipCode) || !preg_match($this->_zipCodeRegex, $destinationZipCode)) {
|
52 |
|
53 |
$price = $request->getPackageValue();
|
54 |
|
55 |
+
//$encryption = Mage::getSingleton('core/encryption');
|
56 |
+
$api_key = Mage::helper('core')->decrypt($this->getConfigData('apikey'));
|
57 |
+
$api_url = Mage::helper('core')->decrypt($this->getConfigData('apiurl'));
|
58 |
|
59 |
if(!isset($api_key) || !is_string($api_key)) {
|
60 |
Mage::log('Intelipost not configured', null, 'intelipost.log', true);
|
77 |
$dimension_check = $this->getConfigData('notification');
|
78 |
|
79 |
$i = 0;
|
80 |
+
$total_weight = 0;
|
81 |
+
$total_volume = 0;
|
82 |
// Volume calculation for a package
|
83 |
foreach ( $request->getAllItems() as $item) {
|
84 |
|
app/code/local/Intelipost/Shipping/Model/Config/Apikey.php
CHANGED
@@ -16,7 +16,7 @@ class Intelipost_Shipping_Model_Config_Apikey
|
|
16 |
|
17 |
$responseJson = $this->testQuote($api_key);
|
18 |
|
19 |
-
if (
|
20 |
$helper = Mage::helper('intelipost');
|
21 |
|
22 |
// Mage::getSingleton('core/session')->addWarning($helper->__('Invalid ApiUrl/ApiKey combination'));
|
@@ -64,7 +64,7 @@ class Intelipost_Shipping_Model_Config_Apikey
|
|
64 |
*/
|
65 |
private function intelipostRequest($api_url, $api_key, $entity_action, $request=false)
|
66 |
{
|
67 |
-
|
68 |
$s = curl_init();
|
69 |
|
70 |
curl_setopt($s, CURLOPT_TIMEOUT, 5000);
|
16 |
|
17 |
$responseJson = $this->testQuote($api_key);
|
18 |
|
19 |
+
if ($responseJson->status == 'ERROR') {
|
20 |
$helper = Mage::helper('intelipost');
|
21 |
|
22 |
// Mage::getSingleton('core/session')->addWarning($helper->__('Invalid ApiUrl/ApiKey combination'));
|
64 |
*/
|
65 |
private function intelipostRequest($api_url, $api_key, $entity_action, $request=false)
|
66 |
{
|
67 |
+
$mgversion = Mage::getEdition()." ".Mage::getVersion();
|
68 |
$s = curl_init();
|
69 |
|
70 |
curl_setopt($s, CURLOPT_TIMEOUT, 5000);
|
app/code/local/Intelipost/Shipping/etc/config.xml
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<config>
|
4 |
<modules>
|
5 |
<Intelipost_Shipping>
|
6 |
-
<version>
|
7 |
</Intelipost_Shipping>
|
8 |
</modules>
|
9 |
|
3 |
<config>
|
4 |
<modules>
|
5 |
<Intelipost_Shipping>
|
6 |
+
<version>1.1.0.4</version>
|
7 |
</Intelipost_Shipping>
|
8 |
</modules>
|
9 |
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Intelipost</name>
|
4 |
-
<version>1.1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU General Public License Version 2 (GPLv2)</license>
|
7 |
<channel>community</channel>
|
@@ -11,9 +11,9 @@
|
|
11 |
<notes>- Weight problems solved and creating just one volume per cart.
|
12 |
</notes>
|
13 |
<authors><author><name>Intelipost</name><user>intelipost</user><email>it@intelipost.com.br</email></author></authors>
|
14 |
-
<date>2014-
|
15 |
-
<time>
|
16 |
-
<contents><target name="magelocal"><dir name="Intelipost"><dir name="Shipping"><dir name="Block"><file name="Import.php" hash="e0d0f1df8063c8e29e81c6ad7838f049"/></dir><dir name="Helper"><file name="Data.php" hash="7523e254d75d8ec6413164bdfc9484ce"/></dir><dir name="Model"><dir name="Carrier"><file name="Category.php" hash="9e3f8a5013f819dc65c9b84848182c8a"/><file name="Intelipost.php" hash="
|
17 |
<compatible/>
|
18 |
<dependencies><required><php><min>5.3.0</min><max>5.5.0</max></php></required></dependencies>
|
19 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Intelipost</name>
|
4 |
+
<version>1.1.0.4</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU General Public License Version 2 (GPLv2)</license>
|
7 |
<channel>community</channel>
|
11 |
<notes>- Weight problems solved and creating just one volume per cart.
|
12 |
</notes>
|
13 |
<authors><author><name>Intelipost</name><user>intelipost</user><email>it@intelipost.com.br</email></author></authors>
|
14 |
+
<date>2014-09-03</date>
|
15 |
+
<time>21:52:25</time>
|
16 |
+
<contents><target name="magelocal"><dir name="Intelipost"><dir name="Shipping"><dir name="Block"><file name="Import.php" hash="e0d0f1df8063c8e29e81c6ad7838f049"/></dir><dir name="Helper"><file name="Data.php" hash="7523e254d75d8ec6413164bdfc9484ce"/></dir><dir name="Model"><dir name="Carrier"><file name="Category.php" hash="9e3f8a5013f819dc65c9b84848182c8a"/><file name="Intelipost.php" hash="f0cc2f84f4cdd6ce9507775fd4d185fb"/></dir><dir name="Config"><file name="Apikey.php" hash="80e50529794dbf22812da2505596b609"/><file name="Apiurl.php" hash="4517960e32a1f0a92a84ce96ff40c6dd"/><file name="Password.php" hash="a3b0f867850520e637ed6d1561047093"/><file name="Token.php" hash="ae2ef4b4527f06c17061d6c984fa0a28"/><file name="Useraccount.php" hash="89a67edacda5169a4f58590e6ac24006"/></dir><dir name="Resource"><file name="EndCustomer.php" hash="a2109babc9b4fc994ccc8bbc3890efe5"/><file name="Invoice.php" hash="f1f792ed019964038769f4950f8c49e3"/><file name="Quote.php" hash="74f2826810d61c8d584ad02a8c12e82d"/><file name="Setup.php" hash="8f10c3277be3454dbf61abb1fb0b06f4"/><file name="ShipmentOrder.php" hash="83c0a94ecd8c9f913a89b3c81798f653"/><file name="Volume.php" hash="0fc8222182fde7557ac85166855a0c4d"/></dir></dir><dir name="etc"><file name="config.xml" hash="c921731999a948f7524aa89fbbec5ee1"/><file name="system.xml" hash="7a06e44375bac2a21bfc6efa9eb617c5"/></dir><dir name="sql"><dir name="intelipost_setup"><file name="mysql4-install-0.0.1.php" hash="7cbddb7bad3e35cba43d14d8e2308900"/></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="pt_BR"><file name="Intelipost_Shipping.csv" hash="686737bb3f684fc434bceeeb88ebaee9"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Intelipost_Shipping.xml" hash="285e60144ae15077910cb9200038adb9"/></dir></target></contents>
|
17 |
<compatible/>
|
18 |
<dependencies><required><php><min>5.3.0</min><max>5.5.0</max></php></required></dependencies>
|
19 |
</package>
|