Version Notes
- Updated rates at checkout API for all carriers
Download this release
Release Info
Developer | George Plummer |
Extension | Nzpost_Eship |
Version | 1.0.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.0.0 to 1.0.1.0
- app/code/community/Nzpost/Eship/Model/Carrier/Courierpost.php +2 -4
- app/code/community/Nzpost/Eship/Model/Carrier/Nzpost.php +2 -2
- app/code/community/Nzpost/Eship/Model/Carrier/Pace.php +2 -2
- package.xml +5 -6
- skin/frontend/base/default/js/eship/onstepcheckout.js +2 -2
- skin/frontend/base/default/js/eship/onstepcheckout_shipping.js +2 -2
app/code/community/Nzpost/Eship/Model/Carrier/Courierpost.php
CHANGED
@@ -47,7 +47,7 @@ implements Mage_Shipping_Model_Carrier_Interface {
|
|
47 |
$packageWeight = $request->getPackageWeight() * 1000; //Package Weight (grams)
|
48 |
$packageCurrency = $request->getPackageCurrency();
|
49 |
|
50 |
-
$url = 'https://
|
51 |
$post_data = '{
|
52 |
"rate": {
|
53 |
"origin": {
|
@@ -96,7 +96,6 @@ implements Mage_Shipping_Model_Carrier_Interface {
|
|
96 |
}
|
97 |
}';
|
98 |
$contentLength = strlen($post_data);
|
99 |
-
|
100 |
$ch = curl_init();
|
101 |
curl_setopt($ch, CURLOPT_URL, $url);
|
102 |
curl_setopt($ch, CURLOPT_HEADER, false);
|
@@ -106,7 +105,6 @@ implements Mage_Shipping_Model_Carrier_Interface {
|
|
106 |
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
|
107 |
$response = curl_exec($ch);
|
108 |
curl_close($ch);
|
109 |
-
|
110 |
$json_obj = json_decode($response);
|
111 |
$rates_obj = $json_obj->{'rates'};
|
112 |
|
@@ -164,4 +162,4 @@ implements Mage_Shipping_Model_Carrier_Interface {
|
|
164 |
$status->setUrl("https://www.nzpost.co.nz/tools/tracking/item/".$tracking);
|
165 |
return $status;
|
166 |
}
|
167 |
-
}
|
47 |
$packageWeight = $request->getPackageWeight() * 1000; //Package Weight (grams)
|
48 |
$packageCurrency = $request->getPackageCurrency();
|
49 |
|
50 |
+
$url = 'https://api2.starshipit.com/rate?apiKey=' . $eShipApiKey . '&integration=magento&format=json&pickups=true';
|
51 |
$post_data = '{
|
52 |
"rate": {
|
53 |
"origin": {
|
96 |
}
|
97 |
}';
|
98 |
$contentLength = strlen($post_data);
|
|
|
99 |
$ch = curl_init();
|
100 |
curl_setopt($ch, CURLOPT_URL, $url);
|
101 |
curl_setopt($ch, CURLOPT_HEADER, false);
|
105 |
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
|
106 |
$response = curl_exec($ch);
|
107 |
curl_close($ch);
|
|
|
108 |
$json_obj = json_decode($response);
|
109 |
$rates_obj = $json_obj->{'rates'};
|
110 |
|
162 |
$status->setUrl("https://www.nzpost.co.nz/tools/tracking/item/".$tracking);
|
163 |
return $status;
|
164 |
}
|
165 |
+
}
|
app/code/community/Nzpost/Eship/Model/Carrier/Nzpost.php
CHANGED
@@ -47,7 +47,7 @@ implements Mage_Shipping_Model_Carrier_Interface {
|
|
47 |
$packageWeight = $request->getPackageWeight() * 1000; //Package Weight (grams)
|
48 |
$packageCurrency = $request->getPackageCurrency();
|
49 |
|
50 |
-
$url = 'https://
|
51 |
$post_data = '{
|
52 |
"rate": {
|
53 |
"origin": {
|
@@ -164,4 +164,4 @@ implements Mage_Shipping_Model_Carrier_Interface {
|
|
164 |
$status->setUrl("https://www.nzpost.co.nz/tools/tracking/item/".$tracking);
|
165 |
return $status;
|
166 |
}
|
167 |
-
}
|
47 |
$packageWeight = $request->getPackageWeight() * 1000; //Package Weight (grams)
|
48 |
$packageCurrency = $request->getPackageCurrency();
|
49 |
|
50 |
+
$url = 'https://api2.starshipit.com/rate?apiKey=' . $eShipApiKey . '&integration=magento&format=json';
|
51 |
$post_data = '{
|
52 |
"rate": {
|
53 |
"origin": {
|
164 |
$status->setUrl("https://www.nzpost.co.nz/tools/tracking/item/".$tracking);
|
165 |
return $status;
|
166 |
}
|
167 |
+
}
|
app/code/community/Nzpost/Eship/Model/Carrier/Pace.php
CHANGED
@@ -47,7 +47,7 @@ implements Mage_Shipping_Model_Carrier_Interface {
|
|
47 |
$packageWeight = $request->getPackageWeight() * 1000; //Package Weight (grams)
|
48 |
$packageCurrency = $request->getPackageCurrency();
|
49 |
|
50 |
-
$url = 'https://
|
51 |
$post_data = '{
|
52 |
"rate": {
|
53 |
"origin": {
|
@@ -164,4 +164,4 @@ implements Mage_Shipping_Model_Carrier_Interface {
|
|
164 |
$status->setUrl("https://www.nzpost.co.nz/tools/tracking/item/".$tracking);
|
165 |
return $status;
|
166 |
}
|
167 |
-
}
|
47 |
$packageWeight = $request->getPackageWeight() * 1000; //Package Weight (grams)
|
48 |
$packageCurrency = $request->getPackageCurrency();
|
49 |
|
50 |
+
$url = 'https://api2.starshipit.com/rate?apiKey=' . $eShipApiKey . '&integration=magento&format=json';
|
51 |
$post_data = '{
|
52 |
"rate": {
|
53 |
"origin": {
|
164 |
$status->setUrl("https://www.nzpost.co.nz/tools/tracking/item/".$tracking);
|
165 |
return $status;
|
166 |
}
|
167 |
+
}
|
package.xml
CHANGED
@@ -1,19 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Nzpost_Eship</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>This extension allows for rate quotes as well as automated shipping.</summary>
|
10 |
<description>The eShip Magento Extension enables rates at checkout from NZ Post, CourierPost and Pace carriers.</description>
|
11 |
-
<notes>-
|
12 |
-
- Added rates at checkout for NZ Post, CourierPost and Pace</notes>
|
13 |
<authors><author><name>George Plummer</name><user>GeorgeSPlummer</user><email>george@shipit.click</email></author></authors>
|
14 |
-
<date>
|
15 |
-
<time>
|
16 |
-
<contents><target name="mageetc"><dir name="modules"><file name="Nzpost_Eship.xml" hash="ff808ab78382d213031d2500e2c112b1"/></dir></target><target name="magecommunity"><dir name="Nzpost"><dir name="Eship"><dir name="Helper"><file name="Data.php" hash="17eeb733d16bed6271650f5c6b6fc843"/></dir><dir name="Model"><dir name="Carrier"><file name="Courierpost.php" hash="
|
17 |
<compatible/>
|
18 |
<dependencies><required><php><min>5.1.0</min><max>5.6.15</max></php></required></dependencies>
|
19 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Nzpost_Eship</name>
|
4 |
+
<version>1.0.1.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>This extension allows for rate quotes as well as automated shipping.</summary>
|
10 |
<description>The eShip Magento Extension enables rates at checkout from NZ Post, CourierPost and Pace carriers.</description>
|
11 |
+
<notes>- Updated rates at checkout API for all carriers</notes>
|
|
|
12 |
<authors><author><name>George Plummer</name><user>GeorgeSPlummer</user><email>george@shipit.click</email></author></authors>
|
13 |
+
<date>2017-07-12</date>
|
14 |
+
<time>00:17:33</time>
|
15 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Nzpost_Eship.xml" hash="ff808ab78382d213031d2500e2c112b1"/></dir></target><target name="magecommunity"><dir name="Nzpost"><dir name="Eship"><dir name="Helper"><file name="Data.php" hash="17eeb733d16bed6271650f5c6b6fc843"/></dir><dir name="Model"><dir name="Carrier"><file name="Courierpost.php" hash="0e6c15c09de9040b0ac85956941c906b"/><file name="Nzpost.php" hash="ce0cea45d174f29a3dd51e7696d343e9"/><file name="Pace.php" hash="c298d6b9b3219a9f705577fa82f97a3f"/></dir></dir><dir name="etc"><file name="config.xml" hash="13cd082bb1c368ae648e9ca0badef2d2"/><file name="system.xml" hash="83a9fff946733711d2fad7bc20849dce"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="addressautocomplete.xml" hash="adc98852dff80e361a18424b13c4fa19"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><dir name="eship"><file name="jquery-1.10.2.min.js" hash="628072e7212db1e8cdacb22b21752cda"/><file name="noconflict.js" hash="3179f2255b046d5f2e9a71e365287bef"/><file name="onstepcheckout.js" hash="a1245d98b2ceebcd0aeaae1c4358f7d7"/><file name="onstepcheckout_shipping.js" hash="e00519dd6a65f502286d658bb3999894"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.1.0</min><max>5.6.15</max></php></required></dependencies>
|
18 |
</package>
|
skin/frontend/base/default/js/eship/onstepcheckout.js
CHANGED
@@ -35,7 +35,7 @@ SHIPITAUTOCOMPLETE.method = {
|
|
35 |
autoFocus: true,
|
36 |
source: function( request, response ) {
|
37 |
jQuery.ajax({
|
38 |
-
url: "https://
|
39 |
dataType: "json",
|
40 |
data: {
|
41 |
apiKey: "shipit-apikey",
|
@@ -175,7 +175,7 @@ SHIPITAUTOCOMPLETE.method = {
|
|
175 |
},
|
176 |
fillInAddressShipIt : function (addressId)
|
177 |
{
|
178 |
-
jQuery.post("https://
|
179 |
{
|
180 |
apiKey: "shipit-apikey",
|
181 |
light: "true",
|
35 |
autoFocus: true,
|
36 |
source: function( request, response ) {
|
37 |
jQuery.ajax({
|
38 |
+
url: "https://api2.starshipit.com/location?integration=magento&format=json",
|
39 |
dataType: "json",
|
40 |
data: {
|
41 |
apiKey: "shipit-apikey",
|
175 |
},
|
176 |
fillInAddressShipIt : function (addressId)
|
177 |
{
|
178 |
+
jQuery.post("https://api2.starshipit.com/location?integration=magento&format=json",
|
179 |
{
|
180 |
apiKey: "shipit-apikey",
|
181 |
light: "true",
|
skin/frontend/base/default/js/eship/onstepcheckout_shipping.js
CHANGED
@@ -35,7 +35,7 @@ SHIPITAUTOCOMPLETE_SHIPPING.method = {
|
|
35 |
autoFocus: true,
|
36 |
source: function( request, response ) {
|
37 |
jQuery.ajax({
|
38 |
-
url: "https://
|
39 |
dataType: "json",
|
40 |
data: {
|
41 |
apiKey: "shipit-apikey",
|
@@ -175,7 +175,7 @@ SHIPITAUTOCOMPLETE_SHIPPING.method = {
|
|
175 |
},
|
176 |
fillInAddressShipIt : function (addressId)
|
177 |
{
|
178 |
-
jQuery.post("https://
|
179 |
{
|
180 |
apiKey: "shipit-apikey",
|
181 |
light: "true",
|
35 |
autoFocus: true,
|
36 |
source: function( request, response ) {
|
37 |
jQuery.ajax({
|
38 |
+
url: "https://api2.starshipit.com/location?integration=magento&format=json",
|
39 |
dataType: "json",
|
40 |
data: {
|
41 |
apiKey: "shipit-apikey",
|
175 |
},
|
176 |
fillInAddressShipIt : function (addressId)
|
177 |
{
|
178 |
+
jQuery.post("https://api2.starshipit.com/location?integration=magento&format=json",
|
179 |
{
|
180 |
apiKey: "shipit-apikey",
|
181 |
light: "true",
|