Previously working, but on latest update the checkout payment information form does not display any information when it should display the credit card fields and paypal option.
In the admin panel I have all the Spree and Paypal express information included. I use a custom view file for the checkout edit form (see below).
I can't find any issues in the error log.
UPDATE: The javascript error is as follows:
Gemfile
source 'https://rubygems.org'
#ruby=ruby-2.1.0
ruby '2.1.0'
gem 'rails', '4.0.5'
group :development, :test do
gem 'sqlite3'
gem 'better_errors'
gem 'binding_of_caller'
end
# Use sqlite3 as the database for Active Record
# gem 'pg'
# gem 'mysql'
gem 'mysql'
gem "font-awesome-rails"
gem 'money', '5.1.1'
gem 'sass-rails', '4.0.3'
gem 'bootstrap-sass', '3.1.1.0'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.1.0'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'
gem 'aws-sdk'
gem 'highline', '1.6.21'
gem 'paperclip'
gem 'fog'
gem 'deface'
group :doc do
gem 'sdoc', '0.3.20', require: false
end
group :production do
gem 'unicorn'
gem 'unicorn-worker-killer'
gem 'rails_12factor', '0.0.2'
end
gem 'spree', github: 'spree/spree', branch: '2-2-stable'
gem 'spree_gateway', :git => 'https://github.com/spree/spree_gateway.git', :branch => '2-2-stable'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-2-stable'
gem 'spree_paypal_express', :github => "radar/better_spree_paypal_express", :branch => "2-2-stable"
gem 'spree_static_content', github: 'spree/spree_static_content', branch: '2-2-stable'
gem 'spree_i18n', github: 'spree/spree_i18n', branch: '2-2-stable'
gem 'spree_active_shipping', :git => "git://github.com/spree/spree_active_shipping", :branch => "2-2-stable"
gem 'spree_contact_us', :git => 'https://github.com/jdutil/spree_contact_us', :branch => '2-2-stable'
gem 'spree_chimpy', github: 'DynamoMTL/spree_chimpy'
app/views/spree/checkout/edit.html.erb
<script>
$(document).ready(function () {
$('.payment-options label:nth-child(1)').on('click', function () {
$('#payment-methods li:nth-child(1)').show();
$('#payment-methods li:nth-child(2)').hide();
});
$('.payment-options li:nth-child(2) label').on('click', function () {
$('#payment-methods li:nth-child(1)').hide();
$('#payment-methods li:nth-child(2)').show();
});
$('.payment-options li:nth-child(2) label').click();
$('#payment-methods li:nth-child(2)').show();
$('#use_existing_card_yes').on('click', function () {
$("div[data-hook='checkout_payment_step']").hide();
$("table[data-hook='existing_cards']").show();
});
$('#use_existing_card_no').on('click', function () {
$("div[data-hook='checkout_payment_step']").show();
$("table[data-hook='existing_cards']").hide();
});
$('#use_existing_card_yes').click();
$("div[data-hook='checkout_payment_step']").hide();
});
</script>
<div id="checkout" data-hook>
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @order } %>
<div class="row" data-hook="checkout_header">
<div class="checkout-header" class="col-sm-3">
<h2 class="columns three alpha" data-hook="checkout_title"><%= Spree.t(:checkout) %></h2>
</div>
<%= render :partial => 'spree/layouts/shared/wizard', :locals => { :target => @order } %>
</div>
<div class="row" data-hook="checkout_content">
<div class="<%= if @order.state != 'confirm' then 'col-md-9' else 'col-md-12' end %>" data-hook="checkout_form_wrapper">
<%= form_for @order, :url => update_checkout_path(@order.state), :html => { :id => "checkout_form_#{@order.state}" } do |form| %>
<% unless @order.email? %>
<p class="field" style='clear: both'>
<%= form.label :email %><br />
<%= form.text_field :email %>
</p>
<% end %>
<%= render @order.state, :form => form %>
<% end %>
</div>
<% if @order.state != 'confirm' %>
<div id="checkout-summary" data-hook="checkout_summary_box" class="col-md-3">
<%= render :partial => 'summary', :locals => { :order => @order } %>
</div>
<% end %>
</div>
</div>
<script>
Spree.current_order_id = "<%= @order.number %>"
Spree.current_order_token = "<%= @order.token %>"
</script>
<% if I18n.locale != :en %>
<script src="<%= assets_prefix %>/jquery.validate/localization/messages_<%= I18n.locale %>.js"></script>
<% end %>