This commit is contained in:
Seth Call 2015-03-17 10:15:00 -05:00
parent 97d469cc85
commit 137c6faedc
4 changed files with 17 additions and 7 deletions

View File

@ -34,9 +34,10 @@
function renderAccountInfo() {
rest.getUserDetail()
.done(populateAccountInfo)
.error(app.ajaxError);
var user = rest.getUserDetail()
if(user) {
user.done(populateAccountInfo).error(app.ajaxError);
}
}
function populateAccountInfo(user) {

View File

@ -30,10 +30,19 @@
e.preventDefault();
if (!context.JK.currentUserId) {
window.location = '/client#/signin';
window.location = '/client#/checkout_signin';
}
else {
window.location = '/client#/order';
app.user().done(function(user) {
if(user.reuse_card) {
window.location = '/client#/checkout_order';
}
else {
window.location = '/client#/checkout_payment';
}
})
}
}

View File

@ -23,7 +23,7 @@ class ApiRecurlyController < ApiController
terms_of_service: params[:terms_of_service],
instruments: [{ :instrument_id => 'other', :proficiency_level => 3, :priority => 1 }],
birth_date: nil,
location: { :country => billing_info.country, :state => billing_info.state, :city => billing_info.city},
location: { :country => billing_info[:country], :state => billing_info[:state], :city => billing_info[:city]},
musician: true,
recaptcha_failed: false,
invited_user: nil,

View File

@ -1,4 +1,4 @@
%div{ layout: 'screen', :'layout-id' => 'shoppingCart', id: 'shoppingCartScreen', :class => 'screen secondary'}
%div{ layout: 'screen', :'layout-id' => 'shoppingCart', id: 'shoppingCartScreen', :class => 'screen secondary no-login-required'}
.content
.content-head
.content-icon= image_tag("content/icon_shopping_cart.png", {:height => 19, :width => 19})