diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-11-30 23:58:19 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-11-30 23:58:19 -0500 |
| commit | 881c5de5b7709d06e88fdf554a021b8f1eddb9ed (patch) | |
| tree | 252676e443822412a624ac5125d7c82f7b50db18 /StoneIsland/www/js/lib/cart/CartPayment.js | |
| parent | 848730bdbc1e1b2c81274385d85fd385422323d8 (diff) | |
more cart
Diffstat (limited to 'StoneIsland/www/js/lib/cart/CartPayment.js')
| -rw-r--r-- | StoneIsland/www/js/lib/cart/CartPayment.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/StoneIsland/www/js/lib/cart/CartPayment.js b/StoneIsland/www/js/lib/cart/CartPayment.js index 222e2ac9..e65c7e8e 100644 --- a/StoneIsland/www/js/lib/cart/CartPayment.js +++ b/StoneIsland/www/js/lib/cart/CartPayment.js @@ -52,6 +52,7 @@ var CartPayment = FormView.extend({ setTimeout(function(){ var state = this.$same_as_shipping.prop("checked") this.$billing_address_rapper.toggle( ! state ) + this.address.disabled = state }.bind(this)) }, @@ -113,7 +114,10 @@ var CartPayment = FormView.extend({ var shipping_info = {}, address_data, address_id, cc_info = {}, cc_data, cc_id var shipping_type = $("[name=ShippingType]").filter(function(){ return $(this).prop("checked") }).val() - if (this.address_list_mode) { + if (this.$same_as_shipping.prop("checked")) { + address_data = app.cart.shipping.data + } + else if (this.address_list_mode) { address_id = this.$("[name=AddressId]").filter(function(){ return $(this).prop("checked") }).val() address_data = app.account.addressLookup[ address_id ] } @@ -129,6 +133,9 @@ var CartPayment = FormView.extend({ "guid": cc_data.Guid, "cvv": this.$("[name=CvvConfirm]"), } + + console.log("got card on file") + app.curtain.show("loading") promise(sdk.cart.use_stored_credit_card, { data: card_on_file }).then(function(data){ app.curtain.hide("loading") |
