summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/cart/CartShipping.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-11-30 12:58:41 -0500
committerJules Laplace <jules@okfoc.us>2015-11-30 12:58:41 -0500
commit40fbdbbef86b2b882765d6553fc357cd9a978706 (patch)
tree9322e520add30fcf74d5a80de3cfeca068d7a2de /StoneIsland/www/js/lib/cart/CartShipping.js
parent2df4da05937755e2835ee68777c957bce34fb1e3 (diff)
populate address
Diffstat (limited to 'StoneIsland/www/js/lib/cart/CartShipping.js')
-rw-r--r--StoneIsland/www/js/lib/cart/CartShipping.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/StoneIsland/www/js/lib/cart/CartShipping.js b/StoneIsland/www/js/lib/cart/CartShipping.js
index e52eec4c..1a9653e1 100644
--- a/StoneIsland/www/js/lib/cart/CartShipping.js
+++ b/StoneIsland/www/js/lib/cart/CartShipping.js
@@ -58,7 +58,7 @@ var CartShipping = FormView.extend({
state = false
}
this.list_mode = typeof state == "boolean" ? state : ! this.list_mode
- this.$dropdown_wrapper.toggle( ! app.account.addresses.length )
+ this.$dropdown_wrapper.toggle( !! app.account.addresses.length )
this.address.disabled = this.list_mode
this.$address_form.toggle(! this.list_mode)
this.$address_list.toggle(this.list_mode)
@@ -93,16 +93,17 @@ var CartShipping = FormView.extend({
shipping_info.Name = address_data.Name
shipping_info.Surname = address_data.Surname
- shipping_info.Email = address_data.Name
+ shipping_info.Email = auth.user.Email
shipping_info.Phone = address_data.Phone
shipping_info.Mobile = address_data.Phone
shipping_info.StreetWithNumber = address_data.Address
shipping_info.PostalCode = address_data.ZipCode
shipping_info.City = address_data.City
+ shipping_info.Province = address_data.Province
shipping_info.Region = address_data.Province
shipping_info.CountryCode = "US"
- return address_data
+ return shipping_info
},
success: function(){