Rvtech_Starshipit - Version 1.6.3.2

Version Notes

- Added support for recent PHP releases
- Fixed address lookup at checkout

Download this release

Release Info

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


Code changes from version 1.6.3.1 to 1.6.3.2

app/code/community/Rvtech/Starshipit/Model/Carrier/Dhlexpress.php CHANGED
@@ -62,20 +62,23 @@ implements Mage_Shipping_Model_Carrier_Interface {
62
  );
63
 
64
  // Call web service.
65
- $wsdl = 'https://app.shipit.click/shipment.svc?WSDL';
66
- $client = new SoapClient($wsdl, array(
67
- 'cache_wsdl' => WSDL_CACHE_NONE,
68
- 'cache_ttl' => 86400,
69
- 'trace' => true,
70
- 'exceptions' => true,
71
- ));
72
-
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
 
62
  );
63
 
64
  // Call web service.
65
+ try {
66
+ $wsdl = 'https://app.shipit.click/shipment.svc?WSDL';
67
+ $client = new SoapClient($wsdl, array(
68
+ 'cache_wsdl' => WSDL_CACHE_NONE,
69
+ 'cache_ttl' => 86400,
70
+ 'trace' => true,
71
+ 'exceptions' => true,
72
+ ));
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
+ } catch (Exception $rateError) {
81
+
82
  }
83
  }
84
 
app/code/community/Rvtech/Starshipit/Model/Carrier/Fastway.php CHANGED
@@ -44,7 +44,7 @@ implements Mage_Shipping_Model_Carrier_Interface {
44
  "width"=>$packagewidth,
45
  "depth"=>$packagedepth
46
  );
47
-
48
  // Call web service.
49
  $wsdl = 'https://app.shipit.click/shipment.svc?WSDL';
50
  $client = new SoapClient($wsdl, array(
@@ -103,4 +103,4 @@ implements Mage_Shipping_Model_Carrier_Interface {
103
  $status->setUrl("http://www.fastway.com.au/courier-services/track-your-parcel?l=".$tracking);
104
  return $status;
105
  }
106
- }
44
  "width"=>$packagewidth,
45
  "depth"=>$packagedepth
46
  );
47
+
48
  // Call web service.
49
  $wsdl = 'https://app.shipit.click/shipment.svc?WSDL';
50
  $client = new SoapClient($wsdl, array(
103
  $status->setUrl("http://www.fastway.com.au/courier-services/track-your-parcel?l=".$tracking);
104
  return $status;
105
  }
106
+ }
package.xml CHANGED
@@ -1,7 +1,7 @@
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,11 +18,12 @@ 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>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>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Rvtech_Starshipit</name>
4
+ <version>1.6.3.2</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>- Added support for recent PHP releases&#xD;
22
+ - Fixed address lookup at checkout</notes>
23
  <authors><author><name>George Plummer</name><user>GeorgeSPlummer</user><email>george@shipit.click</email></author></authors>
24
+ <date>2016-04-01</date>
25
+ <time>02:10:16</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="f1c57b20698f9601cecbb25ed9c4eaaa"/><file name="Couriersplease.php" hash="54f0f919582c8d83f6c60c1b895c685d"/><file name="Dhlexpress.php" hash="17b5b984bd27e024c09c6a3e781e411c"/><file name="Fastway.php" hash="db29d58c52e6d12727f43594387286b5"/><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="c58f76856d83f7a72dbc30b3295f015b"/><file name="onstepcheckout_shipping.js" hash="01ad944a649fff8f20537af9ca4d3faa"/></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>7.0.5</max></php></required></dependencies>
29
  </package>
skin/frontend/base/default/js/shipit/onstepcheckout.js CHANGED
@@ -12,6 +12,7 @@ SHIPITAUTOCOMPLETE.method = {
12
  autocomplete : "",
13
  autocompleteListener : "",
14
  streetNumber : "",
 
15
  formFields : {
16
  'street1': '',
17
  'street2': '',
@@ -123,7 +124,7 @@ SHIPITAUTOCOMPLETE.method = {
123
  {
124
  //'administrative_area_level_3': ['street1', 'long_name'],
125
  //'neighborhood': ['street1', 'long_name'],
126
- //'subpremise': ['street1', 'short_name'],
127
  'street_number': ['street1', 'short_name'],
128
  'route': ['street1', 'long_name'],
129
  //'sublocality': ['street2', 'long_name'],
@@ -148,6 +149,7 @@ SHIPITAUTOCOMPLETE.method = {
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)
153
  {
@@ -159,6 +161,10 @@ SHIPITAUTOCOMPLETE.method = {
159
  {
160
  this.streetNumber = place.address_components[field]['short_name'];
161
  }
 
 
 
 
162
 
163
  var prop = this.component_form[f][1];
164
  if(place.address_components[field].hasOwnProperty(prop)){
@@ -171,6 +177,7 @@ SHIPITAUTOCOMPLETE.method = {
171
  }
172
 
173
  this.appendStreetNumber();
 
174
  this.fillForm();
175
  },
176
  fillInAddressShipIt : function (addressId)
@@ -222,6 +229,14 @@ SHIPITAUTOCOMPLETE.method = {
222
  + this.formFieldsValue['street1'];
223
  }
224
  },
 
 
 
 
 
 
 
 
225
  fillForm : function()
226
  {
227
  for (var f in this.formFieldsValue) {
12
  autocomplete : "",
13
  autocompleteListener : "",
14
  streetNumber : "",
15
+ unitNumber : "",
16
  formFields : {
17
  'street1': '',
18
  'street2': '',
124
  {
125
  //'administrative_area_level_3': ['street1', 'long_name'],
126
  //'neighborhood': ['street1', 'long_name'],
127
+ 'subpremise': ['street1', 'short_name'],
128
  'street_number': ['street1', 'short_name'],
129
  'route': ['street1', 'long_name'],
130
  //'sublocality': ['street2', 'long_name'],
149
  this.component_form['administrative_area_level_1'] = ['region_id', 'long_name'];
150
  }
151
  var type = '';
152
+ this.unitNumber = "";
153
  for (var field in place.address_components) {
154
  for (var t in place.address_components[field].types)
155
  {
161
  {
162
  this.streetNumber = place.address_components[field]['short_name'];
163
  }
164
+ if(f == "subpremise")
165
+ {
166
+ this.unitNumber = place.address_components[field]['short_name'];
167
+ }
168
 
169
  var prop = this.component_form[f][1];
170
  if(place.address_components[field].hasOwnProperty(prop)){
177
  }
178
 
179
  this.appendStreetNumber();
180
+ this.appendUnitNumber();
181
  this.fillForm();
182
  },
183
  fillInAddressShipIt : function (addressId)
229
  + this.formFieldsValue['street1'];
230
  }
231
  },
232
+ appendUnitNumber : function ()
233
+ {
234
+ if(this.unitNumber != '')
235
+ {
236
+ this.formFieldsValue['street1'] = this.unitNumber + '/'
237
+ + this.formFieldsValue['street1'];
238
+ }
239
+ },
240
  fillForm : function()
241
  {
242
  for (var f in this.formFieldsValue) {
skin/frontend/base/default/js/shipit/onstepcheckout_shipping.js CHANGED
@@ -12,6 +12,7 @@ SHIPITAUTOCOMPLETE_SHIPPING.method = {
12
  autocomplete : "",
13
  autocompleteListener : "",
14
  streetNumber : "",
 
15
  formFields : {
16
  'street1': '',
17
  'street2': '',
@@ -123,7 +124,7 @@ SHIPITAUTOCOMPLETE_SHIPPING.method = {
123
  {
124
  //'administrative_area_level_3': ['street1', 'long_name'],
125
  //'neighborhood': ['street1', 'long_name'],
126
- //'subpremise': ['street1', 'short_name'],
127
  'street_number': ['street1', 'short_name'],
128
  'route': ['street1', 'long_name'],
129
  //'sublocality': ['street2', 'long_name'],
@@ -147,6 +148,7 @@ SHIPITAUTOCOMPLETE_SHIPPING.method = {
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)
152
  {
@@ -159,6 +161,11 @@ SHIPITAUTOCOMPLETE_SHIPPING.method = {
159
  this.streetNumber = place.address_components[field]['short_name'];
160
  }
161
 
 
 
 
 
 
162
  var prop = this.component_form[f][1];
163
  if(place.address_components[field].hasOwnProperty(prop)){
164
  this.formFieldsValue[this.component_form[f][0]] = place.address_components[field][prop];
@@ -170,6 +177,7 @@ SHIPITAUTOCOMPLETE_SHIPPING.method = {
170
  }
171
 
172
  this.appendStreetNumber();
 
173
  this.fillForm();
174
  },
175
  fillInAddressShipIt : function (addressId)
@@ -221,6 +229,14 @@ SHIPITAUTOCOMPLETE_SHIPPING.method = {
221
  + this.formFieldsValue['street1'];
222
  }
223
  },
 
 
 
 
 
 
 
 
224
  fillForm : function()
225
  {
226
  for (var f in this.formFieldsValue) {
12
  autocomplete : "",
13
  autocompleteListener : "",
14
  streetNumber : "",
15
+ unitNumber : "",
16
  formFields : {
17
  'street1': '',
18
  'street2': '',
124
  {
125
  //'administrative_area_level_3': ['street1', 'long_name'],
126
  //'neighborhood': ['street1', 'long_name'],
127
+ 'subpremise': ['street1', 'short_name'],
128
  'street_number': ['street1', 'short_name'],
129
  'route': ['street1', 'long_name'],
130
  //'sublocality': ['street2', 'long_name'],
148
  this.component_form['administrative_area_level_1'] = ['region_id', 'long_name'];
149
  }
150
  var type = '';
151
+ this.unitNumber = "";
152
  for (var field in place.address_components) {
153
  for (var t in place.address_components[field].types)
154
  {
161
  this.streetNumber = place.address_components[field]['short_name'];
162
  }
163
 
164
+ if(f == "subpremise")
165
+ {
166
+ this.unitNumber = place.address_components[field]['short_name'];
167
+ }
168
+
169
  var prop = this.component_form[f][1];
170
  if(place.address_components[field].hasOwnProperty(prop)){
171
  this.formFieldsValue[this.component_form[f][0]] = place.address_components[field][prop];
177
  }
178
 
179
  this.appendStreetNumber();
180
+ this.appendUnitNumber();
181
  this.fillForm();
182
  },
183
  fillInAddressShipIt : function (addressId)
229
  + this.formFieldsValue['street1'];
230
  }
231
  },
232
+ appendUnitNumber : function ()
233
+ {
234
+ if(this.unitNumber != '')
235
+ {
236
+ this.formFieldsValue['street1'] = this.unitNumber + '/'
237
+ + this.formFieldsValue['street1'];
238
+ }
239
+ },
240
  fillForm : function()
241
  {
242
  for (var f in this.formFieldsValue) {