Rvtech_Starshipit - Version 1.6.3.1

Version Notes

Fixed rates at checkout for DHL Express

Download this release

Release Info

Developer George Plummer
Extension Rvtech_Starshipit
Version 1.6.3.1
Comparing to
See all releases


Code changes from version 1.6.3.0 to 1.6.3.1

app/code/community/Rvtech/Starshipit/Model/Carrier/Courierpost.php CHANGED
@@ -105,7 +105,7 @@ implements Mage_Shipping_Model_Carrier_Interface {
105
  $status->setCarrierTitle($this->getConfigData('title'));
106
  $status->setTracking($tracking);
107
  $status->setPopup(1);
108
- $status->setUrl("http://trackandtrace.courierpost.co.nz/search/".$tracking);
109
  return $status;
110
  }
111
  }
105
  $status->setCarrierTitle($this->getConfigData('title'));
106
  $status->setTracking($tracking);
107
  $status->setPopup(1);
108
+ $status->setUrl("https://www.nzpost.co.nz/tools/tracking/item/".$tracking);
109
  return $status;
110
  }
111
  }
app/code/community/Rvtech/Starshipit/Model/Carrier/Dhlexpress.php CHANGED
@@ -8,11 +8,12 @@ implements Mage_Shipping_Model_Carrier_Interface {
8
  if (!Mage::getStoreConfig('carriers/'.$this->_code.'/active')) {
9
  return false;
10
  }
11
-
12
  $price = 0;
13
  $doCalulate = $this->getConfigData('calculate');
14
  if ($doCalulate==0)
15
  {
 
16
  $price = $this->getConfigData('price');
17
  }
18
  else{
@@ -72,12 +73,14 @@ implements Mage_Shipping_Model_Carrier_Interface {
72
  $result = $client->__soapCall("GetQuote", array($params));
73
  $quoteResponse = $result->GetQuoteResult;
74
  //Mage::log("Price web:".$quoteResponse->Price, null, ShipIt.log);
75
- $price = $quoteResponse->Price;
 
 
 
76
  }
77
 
78
  $handling = Mage::getStoreConfig('carriers/'.$this->_code.'/handling');
79
  $result = Mage::getModel('shipping/rate_result');
80
- $show = true;
81
  if($show){
82
 
83
  $method = Mage::getModel('shipping/rate_result_method');
8
  if (!Mage::getStoreConfig('carriers/'.$this->_code.'/active')) {
9
  return false;
10
  }
11
+ $show = false;
12
  $price = 0;
13
  $doCalulate = $this->getConfigData('calculate');
14
  if ($doCalulate==0)
15
  {
16
+ $show = true;
17
  $price = $this->getConfigData('price');
18
  }
19
  else{
73
  $result = $client->__soapCall("GetQuote", array($params));
74
  $quoteResponse = $result->GetQuoteResult;
75
  //Mage::log("Price web:".$quoteResponse->Price, null, ShipIt.log);
76
+ if($quoteResponse->ErrorMessage == "") {
77
+ $show = true;
78
+ $price = $quoteResponse->Price;
79
+ }
80
  }
81
 
82
  $handling = Mage::getStoreConfig('carriers/'.$this->_code.'/handling');
83
  $result = Mage::getModel('shipping/rate_result');
 
84
  if($show){
85
 
86
  $method = Mage::getModel('shipping/rate_result_method');
app/code/community/Rvtech/Starshipit/Model/Carrier/Fastway.php CHANGED
@@ -28,7 +28,7 @@ implements Mage_Shipping_Model_Carrier_Interface {
28
  $packageheight = $request->getPackageHeight();
29
  $packagewidth = $request->getPackageWidth();
30
  $packagedepth = $request->getPackageDepth();
31
-
32
  $params = array(
33
  "apiKey" => $shipItApiKey,
34
  "carrierid"=>3,
28
  $packageheight = $request->getPackageHeight();
29
  $packagewidth = $request->getPackageWidth();
30
  $packagedepth = $request->getPackageDepth();
31
+
32
  $params = array(
33
  "apiKey" => $shipItApiKey,
34
  "carrierid"=>3,
app/code/community/Rvtech/Starshipit/Model/Carrier/Nzpost.php CHANGED
@@ -106,7 +106,7 @@ implements Mage_Shipping_Model_Carrier_Interface {
106
  $status->setCarrierTitle($this->getConfigData('title'));
107
  $status->setTracking($tracking);
108
  $status->setPopup(1);
109
- $status->setUrl("http://www.nzpost.co.nz/tools/tracking-new?trackid=".$tracking);
110
  return $status;
111
  }
112
  }
106
  $status->setCarrierTitle($this->getConfigData('title'));
107
  $status->setTracking($tracking);
108
  $status->setPopup(1);
109
+ $status->setUrl("https://www.nzpost.co.nz/tools/tracking/item/".$tracking);
110
  return $status;
111
  }
112
  }
app/code/community/Rvtech/Starshipit/Model/Carrier/Pace.php CHANGED
@@ -161,7 +161,7 @@ implements Mage_Shipping_Model_Carrier_Interface {
161
  $status->setCarrierTitle($this->getConfigData('title'));
162
  $status->setTracking($tracking);
163
  $status->setPopup(1);
164
- $status->setUrl("http://trackandtrace.courierpost.co.nz/search/".$tracking);
165
  return $status;
166
  }
167
  }
161
  $status->setCarrierTitle($this->getConfigData('title'));
162
  $status->setTracking($tracking);
163
  $status->setPopup(1);
164
+ $status->setUrl("https://www.nzpost.co.nz/tools/tracking/item/".$tracking);
165
  return $status;
166
  }
167
  }
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Rvtech_Starshipit</name>
4
- <version>1.6.3.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>
@@ -18,12 +18,11 @@ From ShipIT shipping labels can be produced, tracking of orders is supported, qu
18
  DHL Express Worldwide is supported as well &#xD;
19
  &#xD;
20
  Australia Post eParcel, CourierPost, Fastways, and more.</description>
21
- <notes>- Added Pace, StarTrack Express, CouriersPlease Shipping Methods.&#xD;
22
- - Added Rates at Checkout for Pace, StarTrack Express, CouriersPlease carriers.</notes>
23
  <authors><author><name>George Plummer</name><user>GeorgeSPlummer</user><email>george@shipit.click</email></author></authors>
24
- <date>2015-11-12</date>
25
- <time>04:52:49</time>
26
- <contents><target name="mageetc"><dir name="modules"><file name="Rvtech_Starshipit.xml" hash="5f957b335ffd3ef220188acc0a4261c2"/></dir></target><target name="magecommunity"><dir name="Rvtech"><dir name="Starshipit"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="Create"><file name="Shipnote.php" hash="e3978a998056ca01f2c1eecadad492f9"/></dir><file name="Note.php" hash="b176725ad1d11312fc9b2e6da10300a3"/></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="bef51209ace24c39e1d0933c4695665c"/><file name="Syncbutton.php" hash="1b90bc1d0ce6f8fd85783771ffc3720b"/></dir></dir></dir></dir><file name="Note.php" hash="d89159b063408b3496b5a7c1238b9f90"/><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="bcec9d256397a5c39879eba37520370e"/><file name="View.php" hash="bee1026715c9a99d4d0ab31c2cb58325"/></dir></dir><file name="Ship.php" hash="19080a45c06dc07b7991dd694d83708a"/><file name="Shiptracking.php" hash="a64dbb626cb60a3f62994564e0d3e288"/></dir><dir name="Helper"><file name="Data.php" hash="09a753bbbc36ce95a6222587d53cd1c1"/><file name="Starship.php" hash="ebc879a96df5c80ffae9744d11a6cac5"/></dir><dir name="Model"><dir name="Adminhtml"><file name="Observer.php" hash="2956099cbc3109242139fb0b8e07ba47"/></dir><file name="Api.php" hash="9c0c7ad4df68db05f5caf2970b91a542"/><dir name="Carrier"><file name="Auspost.php" hash="73507c7a8e26ec0cd7f6a2583b0e4a4e"/><file name="Courierpost.php" hash="7b750c7eadbdc40a26cc791bfce21ad5"/><file name="Couriersplease.php" hash="54f0f919582c8d83f6c60c1b895c685d"/><file name="Dhlexpress.php" hash="1927e72dfe8b8b21a3237d1ee60d26a9"/><file name="Fastway.php" hash="dd239c7f46e2af1d6ed567e9dc27c5f1"/><file name="Nzpost.php" hash="fae6c459c4c4354f3ecf6813b068b454"/><file name="Pace.php" hash="6c187cbeb207c53f3d1ec90fb076fd3d"/><file name="Shipit.php" hash="4885844bdc91ed748a1a458f7372f7eb"/><file name="Startrackexpress.php" hash="e0eb4ff34a0d56f8b099f48c833420b9"/></dir><file name="Note.php" hash="91fdbf3caa65797d8050e999a487c4ae"/><file name="Observer.php" hash="c21ae81b45649c886a30a2a9b6c99425"/><file name="Orders.php" hash="5e6d34681f4ffde9b8b0fcad9f898481"/><dir name="Resource"><dir name="Note"><file name="Collection.php" hash="2526c09006bf6a74b1ddcf2d94b85bd1"/></dir><file name="Note.php" hash="188639765c95bb03abf24785bbcfabbe"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="ShipItController.php" hash="7a82038aa1b2e9fd8bc543b402dcbf9a"/></dir><file name="IndexController.php" hash="20b9637c3eb1a5e7c6a97faa72a0a3fb"/></dir><dir name="etc"><file name="adminhtml.xml" hash="02121bfdaabeb4aa30733462d532b211"/><file name="api.xml" hash="03ba9d58ced7f06da747006e8ddf6861"/><file name="config.xml" hash="ad9e77aeaf4cdf99bceb85023cc0d7e7"/><file name="system.xml" hash="79c3ae8d2ba1a537e565466dcbe95e89"/></dir><dir name="sql"><dir name="shipnote_setup"><file name="install-1.6.2.0.php" hash="3440e960c4ae3a4036c797c02703f025"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="shipit.xml" hash="61408954f82f5ac2edcf77d859fd4591"/><file name="shipnote.xml" hash="b30f8ced0fa77550a09c3ab5ee03f28d"/></dir><dir name="template"><dir name="shipit"><dir name="system"><dir name="config"><file name="button.phtml" hash="064f053f67fc7b749d1aec40cd352ce1"/><file name="syncbutton.phtml" hash="3e67731254d4d0298891cd2598471dc9"/></dir></dir></dir><dir name="shipnote"><file name="note-create.phtml" hash="218318453338adb8a43d01dcf3aa74f3"/><file name="note.phtml" hash="dc72f98a11c955181a3d4706e9cfd297"/><dir name="sales"><dir name="order"><dir name="create"><file name="data.phtml" hash="63aa7c2343f1d801b92e61b8497b99cb"/><file name="shipnote.phtml" hash="101f8cbd09937b1c9b232a94592e72dd"/></dir><dir name="creditmemo"><dir name="create"><file name="form.phtml" hash="95b2ca2ff1b2d48519cc9f0302179804"/></dir><dir name="view"><file name="form.phtml" hash="0b851bb2da3a68d6b21195cc88d9c3a3"/></dir></dir><dir name="invoice"><dir name="create"><file name="form.phtml" hash="00a1d471675697ff345fb8744b337a54"/></dir><dir name="view"><file name="form.phtml" hash="eb85ea9873900429a859f31585ecb93b"/></dir></dir><dir name="shipment"><dir name="create"><file name="form.phtml" hash="6655a2814e346290ebefce2d45225127"/></dir><dir name="view"><file name="form.phtml" hash="1f5790819a38b162f76a32ec725a0b77"/></dir></dir><dir name="view"><dir name="tab"><file name="info.phtml" hash="66fd085aa3d4e985f914e61ef4ca6748"/></dir></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="shipnote.xml" hash="4662d0b069083e71689f79ad5ce0102e"/><file name="addressautocomplete.xml" hash="88a6cbeb5077d85cac0e98632b467b2a"/><file name="shiptracking.xml" hash="cd598d60854e00759d7e201a9b819a65"/></dir><dir name="template"><dir name="shipnote"><file name="note.phtml" hash="f6199bbe2739b4689cadd2a854a3d753"/></dir><dir name="shiptracking"><file name="shiptracking.phtml" hash="dc155a0bf7d2d83579492d432de1a6f9"/><file name="trackdetail.phtml" hash="1e6967f50a922088ec1aaf9d23910163"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="en_GB"><file name="Rvtech_StarshipitNote.csv" hash="45582b181cd95563d26e516d9dc5efe4"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="shipnote.css" hash="1cd880ba6ee2ae963fd8b6208d9e6fd8"/></dir><dir name="js"><dir name="shipit"><file name="jquery-1.10.2.min.js" hash="628072e7212db1e8cdacb22b21752cda"/><file name="noconflict.js" hash="3179f2255b046d5f2e9a71e365287bef"/><file name="onstepcheckout.js" hash="67f1b1d859c79bc9465ca33a7b9f2e5d"/><file name="onstepcheckout_shipping.js" hash="b63dda070bdc41f68623a3168b19c485"/></dir></dir><dir name="shiptracking"><dir name="css"><file name="shiptracking.css" hash="71583b99e56b8cc1ebd9b575e17e9414"/></dir><dir name="images"><file name="ajax-loader-tr.gif" hash="01a95f2b5387dfec28b58bab64aa32ae"/></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="shipit"><dir name="adminhtml"><file name="grid.js" hash="dbf45931948c6c611e1af954ae2430e5"/></dir></dir></dir></target></contents>
27
  <compatible/>
28
  <dependencies><required><php><min>5.1.0</min><max>5.6.15</max></php></required></dependencies>
29
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Rvtech_Starshipit</name>
4
+ <version>1.6.3.1</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>
18
  DHL Express Worldwide is supported as well &#xD;
19
  &#xD;
20
  Australia Post eParcel, CourierPost, Fastways, and more.</description>
21
+ <notes>Fixed rates at checkout for DHL Express</notes>
 
22
  <authors><author><name>George Plummer</name><user>GeorgeSPlummer</user><email>george@shipit.click</email></author></authors>
23
+ <date>2016-03-07</date>
24
+ <time>02:42:03</time>
25
+ <contents><target name="mageetc"><dir name="modules"><file name="Rvtech_Starshipit.xml" hash="5f957b335ffd3ef220188acc0a4261c2"/></dir></target><target name="magecommunity"><dir name="Rvtech"><dir name="Starshipit"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="Create"><file name="Shipnote.php" hash="e3978a998056ca01f2c1eecadad492f9"/></dir><file name="Note.php" hash="b176725ad1d11312fc9b2e6da10300a3"/></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="bef51209ace24c39e1d0933c4695665c"/><file name="Syncbutton.php" hash="1b90bc1d0ce6f8fd85783771ffc3720b"/></dir></dir></dir></dir><file name="Note.php" hash="d89159b063408b3496b5a7c1238b9f90"/><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="bcec9d256397a5c39879eba37520370e"/><file name="View.php" hash="bee1026715c9a99d4d0ab31c2cb58325"/></dir></dir><file name="Ship.php" hash="19080a45c06dc07b7991dd694d83708a"/><file name="Shiptracking.php" hash="a64dbb626cb60a3f62994564e0d3e288"/></dir><dir name="Helper"><file name="Data.php" hash="09a753bbbc36ce95a6222587d53cd1c1"/><file name="Starship.php" hash="ebc879a96df5c80ffae9744d11a6cac5"/></dir><dir name="Model"><dir name="Adminhtml"><file name="Observer.php" hash="2956099cbc3109242139fb0b8e07ba47"/></dir><file name="Api.php" hash="9c0c7ad4df68db05f5caf2970b91a542"/><dir name="Carrier"><file name="Auspost.php" hash="73507c7a8e26ec0cd7f6a2583b0e4a4e"/><file name="Courierpost.php" hash="f1c57b20698f9601cecbb25ed9c4eaaa"/><file name="Couriersplease.php" hash="54f0f919582c8d83f6c60c1b895c685d"/><file name="Dhlexpress.php" hash="f73b0270ce0a55db5450025f11d6064c"/><file name="Fastway.php" hash="b0e61f17efba0ac36790404ff179ff4e"/><file name="Nzpost.php" hash="4588176d3ace5354fdbcc492fcbb0b42"/><file name="Pace.php" hash="20f4c1fb597804ebcc5b8a2635b122d6"/><file name="Shipit.php" hash="4885844bdc91ed748a1a458f7372f7eb"/><file name="Startrackexpress.php" hash="e0eb4ff34a0d56f8b099f48c833420b9"/></dir><file name="Note.php" hash="91fdbf3caa65797d8050e999a487c4ae"/><file name="Observer.php" hash="c21ae81b45649c886a30a2a9b6c99425"/><file name="Orders.php" hash="5e6d34681f4ffde9b8b0fcad9f898481"/><dir name="Resource"><dir name="Note"><file name="Collection.php" hash="2526c09006bf6a74b1ddcf2d94b85bd1"/></dir><file name="Note.php" hash="188639765c95bb03abf24785bbcfabbe"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="ShipItController.php" hash="7a82038aa1b2e9fd8bc543b402dcbf9a"/></dir><file name="IndexController.php" hash="20b9637c3eb1a5e7c6a97faa72a0a3fb"/></dir><dir name="etc"><file name="adminhtml.xml" hash="02121bfdaabeb4aa30733462d532b211"/><file name="api.xml" hash="03ba9d58ced7f06da747006e8ddf6861"/><file name="config.xml" hash="ad9e77aeaf4cdf99bceb85023cc0d7e7"/><file name="system.xml" hash="79c3ae8d2ba1a537e565466dcbe95e89"/></dir><dir name="sql"><dir name="shipnote_setup"><file name="install-1.6.2.0.php" hash="3440e960c4ae3a4036c797c02703f025"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="shipit.xml" hash="61408954f82f5ac2edcf77d859fd4591"/><file name="shipnote.xml" hash="b30f8ced0fa77550a09c3ab5ee03f28d"/></dir><dir name="template"><dir name="shipit"><dir name="system"><dir name="config"><file name="button.phtml" hash="064f053f67fc7b749d1aec40cd352ce1"/><file name="syncbutton.phtml" hash="3e67731254d4d0298891cd2598471dc9"/></dir></dir></dir><dir name="shipnote"><file name="note-create.phtml" hash="218318453338adb8a43d01dcf3aa74f3"/><file name="note.phtml" hash="dc72f98a11c955181a3d4706e9cfd297"/><dir name="sales"><dir name="order"><dir name="create"><file name="data.phtml" hash="63aa7c2343f1d801b92e61b8497b99cb"/><file name="shipnote.phtml" hash="101f8cbd09937b1c9b232a94592e72dd"/></dir><dir name="creditmemo"><dir name="create"><file name="form.phtml" hash="95b2ca2ff1b2d48519cc9f0302179804"/></dir><dir name="view"><file name="form.phtml" hash="0b851bb2da3a68d6b21195cc88d9c3a3"/></dir></dir><dir name="invoice"><dir name="create"><file name="form.phtml" hash="00a1d471675697ff345fb8744b337a54"/></dir><dir name="view"><file name="form.phtml" hash="eb85ea9873900429a859f31585ecb93b"/></dir></dir><dir name="shipment"><dir name="create"><file name="form.phtml" hash="6655a2814e346290ebefce2d45225127"/></dir><dir name="view"><file name="form.phtml" hash="1f5790819a38b162f76a32ec725a0b77"/></dir></dir><dir name="view"><dir name="tab"><file name="info.phtml" hash="66fd085aa3d4e985f914e61ef4ca6748"/></dir></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="shipnote.xml" hash="4662d0b069083e71689f79ad5ce0102e"/><file name="addressautocomplete.xml" hash="88a6cbeb5077d85cac0e98632b467b2a"/><file name="shiptracking.xml" hash="cd598d60854e00759d7e201a9b819a65"/></dir><dir name="template"><dir name="shipnote"><file name="note.phtml" hash="f6199bbe2739b4689cadd2a854a3d753"/></dir><dir name="shiptracking"><file name="shiptracking.phtml" hash="dc155a0bf7d2d83579492d432de1a6f9"/><file name="trackdetail.phtml" hash="1e6967f50a922088ec1aaf9d23910163"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="en_GB"><file name="Rvtech_StarshipitNote.csv" hash="45582b181cd95563d26e516d9dc5efe4"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="shipnote.css" hash="1cd880ba6ee2ae963fd8b6208d9e6fd8"/></dir><dir name="js"><dir name="shipit"><file name="jquery-1.10.2.min.js" hash="628072e7212db1e8cdacb22b21752cda"/><file name="noconflict.js" hash="3179f2255b046d5f2e9a71e365287bef"/><file name="onstepcheckout.js" hash="f4f9abdb73f3f189ba10076737f972e4"/><file name="onstepcheckout_shipping.js" hash="9475844edc1c330c11b20cddb32de4f7"/></dir></dir><dir name="shiptracking"><dir name="css"><file name="shiptracking.css" hash="71583b99e56b8cc1ebd9b575e17e9414"/></dir><dir name="images"><file name="ajax-loader-tr.gif" hash="01a95f2b5387dfec28b58bab64aa32ae"/></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="shipit"><dir name="adminhtml"><file name="grid.js" hash="dbf45931948c6c611e1af954ae2430e5"/></dir></dir></dir></target></contents>
26
  <compatible/>
27
  <dependencies><required><php><min>5.1.0</min><max>5.6.15</max></php></required></dependencies>
28
  </package>
skin/frontend/base/default/js/shipit/onstepcheckout.js CHANGED
@@ -16,7 +16,7 @@ SHIPITAUTOCOMPLETE.method = {
16
  'street1': '',
17
  'street2': '',
18
  'city': '',
19
- //'region': '',
20
  'postcode': '',
21
  'region_id' : ''
22
  },
@@ -24,7 +24,7 @@ SHIPITAUTOCOMPLETE.method = {
24
  'street1': '',
25
  'street2': '',
26
  'city': '',
27
- //'region': '',
28
  'postcode': '',
29
  'region_id' : ''
30
  },
@@ -129,7 +129,7 @@ SHIPITAUTOCOMPLETE.method = {
129
  //'sublocality': ['street2', 'long_name'],
130
  //sublocality_level_1': ['street2', 'long_name'],
131
  'locality': ['city', 'long_name'],
132
- //'administrative_area_level_1': [formFields.region, 'long_name'],
133
  'administrative_area_level_1': ['region_id', 'long_name'],
134
  'postal_code': ['postcode', 'short_name']
135
  };
@@ -140,6 +140,13 @@ SHIPITAUTOCOMPLETE.method = {
140
  // Get the place details from the autocomplete object.
141
  var place = this.autocomplete.getPlace();
142
  this.resetForm();
 
 
 
 
 
 
 
143
  var type = '';
144
  for (var field in place.address_components) {
145
  for (var t in place.address_components[field].types)
16
  'street1': '',
17
  'street2': '',
18
  'city': '',
19
+ 'region': '',
20
  'postcode': '',
21
  'region_id' : ''
22
  },
24
  'street1': '',
25
  'street2': '',
26
  'city': '',
27
+ 'region': '',
28
  'postcode': '',
29
  'region_id' : ''
30
  },
129
  //'sublocality': ['street2', 'long_name'],
130
  //sublocality_level_1': ['street2', 'long_name'],
131
  'locality': ['city', 'long_name'],
132
+ //'administrative_area_level_1': ['region', 'long_name'],
133
  'administrative_area_level_1': ['region_id', 'long_name'],
134
  'postal_code': ['postcode', 'short_name']
135
  };
140
  // Get the place details from the autocomplete object.
141
  var place = this.autocomplete.getPlace();
142
  this.resetForm();
143
+
144
+ if (this.countryCode == 'AU') {
145
+ this.component_form['administrative_area_level_1'] = ['region', 'long_name'];
146
+ }
147
+ else {
148
+ this.component_form['administrative_area_level_1'] = ['region_id', 'long_name'];
149
+ }
150
  var type = '';
151
  for (var field in place.address_components) {
152
  for (var t in place.address_components[field].types)
skin/frontend/base/default/js/shipit/onstepcheckout_shipping.js CHANGED
@@ -16,7 +16,7 @@ SHIPITAUTOCOMPLETE_SHIPPING.method = {
16
  'street1': '',
17
  'street2': '',
18
  'city': '',
19
- //'region': '',
20
  'postcode': '',
21
  'region_id' : ''
22
  },
@@ -24,7 +24,7 @@ SHIPITAUTOCOMPLETE_SHIPPING.method = {
24
  'street1': '',
25
  'street2': '',
26
  'city': '',
27
- //'region': '',
28
  'postcode': '',
29
  'region_id' : ''
30
  },
@@ -129,7 +129,7 @@ SHIPITAUTOCOMPLETE_SHIPPING.method = {
129
  //'sublocality': ['street2', 'long_name'],
130
  //sublocality_level_1': ['street2', 'long_name'],
131
  'locality': ['city', 'long_name'],
132
- //'administrative_area_level_1': [formFields.region, 'long_name'],
133
  'administrative_area_level_1': ['region_id', 'long_name'],
134
  'postal_code': ['postcode', 'short_name']
135
  };
@@ -140,6 +140,12 @@ SHIPITAUTOCOMPLETE_SHIPPING.method = {
140
  // Get the place details from the autocomplete object.
141
  var place = this.autocomplete.getPlace();
142
  this.resetForm();
 
 
 
 
 
 
143
  var type = '';
144
  for (var field in place.address_components) {
145
  for (var t in place.address_components[field].types)
16
  'street1': '',
17
  'street2': '',
18
  'city': '',
19
+ 'region': '',
20
  'postcode': '',
21
  'region_id' : ''
22
  },
24
  'street1': '',
25
  'street2': '',
26
  'city': '',
27
+ 'region': '',
28
  'postcode': '',
29
  'region_id' : ''
30
  },
129
  //'sublocality': ['street2', 'long_name'],
130
  //sublocality_level_1': ['street2', 'long_name'],
131
  'locality': ['city', 'long_name'],
132
+ //'administrative_area_level_1': ['region', 'long_name'],
133
  'administrative_area_level_1': ['region_id', 'long_name'],
134
  'postal_code': ['postcode', 'short_name']
135
  };
140
  // Get the place details from the autocomplete object.
141
  var place = this.autocomplete.getPlace();
142
  this.resetForm();
143
+ if (this.countryCode == 'AU') {
144
+ this.component_form['administrative_area_level_1'] = ['region', 'long_name'];
145
+ }
146
+ else {
147
+ this.component_form['administrative_area_level_1'] = ['region_id', 'long_name'];
148
+ }
149
  var type = '';
150
  for (var field in place.address_components) {
151
  for (var t in place.address_components[field].types)