solidus_frontend 2.4.2 → 2.5.0.beta1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of solidus_frontend might be problematic. Click here for more details.

Files changed (132) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +1 -5
  3. data/Rakefile +7 -7
  4. data/app/assets/config/solidus_frontend_manifest.js +0 -2
  5. data/app/assets/javascripts/spree/frontend.js +0 -1
  6. data/app/assets/javascripts/spree/frontend/cart.js +30 -0
  7. data/app/assets/javascripts/spree/frontend/checkout.js +24 -0
  8. data/app/assets/javascripts/spree/frontend/checkout/address.js +128 -0
  9. data/app/assets/javascripts/spree/frontend/checkout/coupon-code.js +40 -0
  10. data/app/assets/javascripts/spree/frontend/checkout/payment.js +55 -0
  11. data/app/assets/javascripts/spree/frontend/product.js +81 -0
  12. data/app/assets/stylesheets/spree/frontend/_variables.scss +3 -0
  13. data/app/assets/stylesheets/spree/frontend/screen.css.scss +2 -2
  14. data/app/controllers/spree/checkout_controller.rb +3 -3
  15. data/app/controllers/spree/locale_controller.rb +2 -2
  16. data/app/controllers/spree/orders_controller.rb +5 -6
  17. data/app/controllers/spree/products_controller.rb +0 -1
  18. data/app/controllers/spree/store_controller.rb +1 -1
  19. data/app/controllers/spree/taxons_controller.rb +0 -1
  20. data/app/views/spree/address/_form.html.erb +23 -21
  21. data/app/views/spree/checkout/_address.html.erb +5 -5
  22. data/app/views/spree/checkout/_confirm.html.erb +3 -3
  23. data/app/views/spree/checkout/_delivery.html.erb +18 -14
  24. data/app/views/spree/checkout/_payment.html.erb +6 -6
  25. data/app/views/spree/checkout/_summary.html.erb +5 -5
  26. data/app/views/spree/checkout/edit.html.erb +2 -6
  27. data/app/views/spree/checkout/payment/_gateway.html.erb +9 -9
  28. data/app/views/spree/content/cvv.html.erb +1 -1
  29. data/app/views/spree/orders/_adjustments.html.erb +4 -4
  30. data/app/views/spree/orders/_form.html.erb +6 -6
  31. data/app/views/spree/orders/_line_item.html.erb +4 -4
  32. data/app/views/spree/orders/edit.html.erb +9 -9
  33. data/app/views/spree/orders/show.html.erb +4 -4
  34. data/app/views/spree/payments/_payment.html.erb +1 -1
  35. data/app/views/spree/products/_cart_form.html.erb +7 -7
  36. data/app/views/spree/products/_image.html.erb +2 -2
  37. data/app/views/spree/products/_promotions.html.erb +1 -1
  38. data/app/views/spree/products/_properties.html.erb +1 -1
  39. data/app/views/spree/products/_taxons.html.erb +1 -1
  40. data/app/views/spree/products/index.html.erb +1 -1
  41. data/app/views/spree/products/show.html.erb +1 -1
  42. data/app/views/spree/shared/_address.html.erb +2 -2
  43. data/app/views/spree/shared/_filters.html.erb +2 -2
  44. data/app/views/spree/shared/_footer.html.erb +1 -1
  45. data/app/views/spree/shared/_image.html.erb +12 -0
  46. data/app/views/spree/shared/_login_bar_items.html.erb +1 -0
  47. data/app/views/spree/shared/_main_nav_bar.html.erb +2 -2
  48. data/app/views/spree/shared/_nav_bar.html.erb +1 -0
  49. data/app/views/spree/shared/_order_details.html.erb +20 -20
  50. data/app/views/spree/shared/_products.html.erb +3 -3
  51. data/app/views/spree/shared/_search.html.erb +3 -3
  52. data/app/views/spree/shared/_shipment_tracking.html.erb +1 -1
  53. data/app/views/spree/shared/_taxonomies.html.erb +2 -2
  54. data/lib/generators/solidus/views/override_generator.rb +1 -0
  55. data/lib/spree/frontend.rb +4 -2
  56. data/solidus_frontend.gemspec +1 -2
  57. data/spec/controllers/spree/checkout_controller_spec.rb +12 -12
  58. data/spec/controllers/spree/current_order_tracking_spec.rb +1 -1
  59. data/spec/controllers/spree/orders_controller_ability_spec.rb +6 -4
  60. data/spec/controllers/spree/orders_controller_spec.rb +4 -3
  61. data/spec/controllers/spree/orders_controller_transitions_spec.rb +1 -1
  62. data/spec/controllers/spree/products_controller_spec.rb +3 -2
  63. data/spec/features/caching/products_spec.rb +7 -7
  64. data/spec/features/cart_spec.rb +1 -1
  65. data/spec/features/checkout_spec.rb +10 -9
  66. data/spec/features/coupon_code_spec.rb +12 -13
  67. data/spec/features/locale_spec.rb +0 -38
  68. data/spec/features/order_spec.rb +1 -1
  69. data/spec/features/products_spec.rb +4 -4
  70. data/spec/features/promotion_code_invalidation_spec.rb +3 -3
  71. data/spec/features/quantity_promotions_spec.rb +5 -5
  72. data/spec/generators/solidus/views/override_generator_spec.rb +2 -1
  73. data/spec/spec_helper.rb +19 -41
  74. data/spec/support/shared_contexts/custom_products.rb +17 -17
  75. metadata +19 -88
  76. data/Gemfile +0 -7
  77. data/app/assets/javascripts/spree/frontend/cart.js.coffee +0 -15
  78. data/app/assets/javascripts/spree/frontend/checkout.js.coffee +0 -17
  79. data/app/assets/javascripts/spree/frontend/checkout/address.js.coffee +0 -91
  80. data/app/assets/javascripts/spree/frontend/checkout/coupon-code.js.coffee +0 -34
  81. data/app/assets/javascripts/spree/frontend/checkout/payment.js.coffee +0 -42
  82. data/app/assets/javascripts/spree/frontend/product.js.coffee +0 -47
  83. data/vendor/assets/javascripts/jquery.validate/additional-methods.min.js +0 -12
  84. data/vendor/assets/javascripts/jquery.validate/jquery.validate.min.js +0 -12
  85. data/vendor/assets/javascripts/jquery.validate/localization/messages_ar.js +0 -25
  86. data/vendor/assets/javascripts/jquery.validate/localization/messages_bg.js +0 -25
  87. data/vendor/assets/javascripts/jquery.validate/localization/messages_ca.js +0 -25
  88. data/vendor/assets/javascripts/jquery.validate/localization/messages_cs.js +0 -25
  89. data/vendor/assets/javascripts/jquery.validate/localization/messages_da.js +0 -22
  90. data/vendor/assets/javascripts/jquery.validate/localization/messages_de.js +0 -22
  91. data/vendor/assets/javascripts/jquery.validate/localization/messages_el.js +0 -25
  92. data/vendor/assets/javascripts/jquery.validate/localization/messages_es.js +0 -25
  93. data/vendor/assets/javascripts/jquery.validate/localization/messages_et.js +0 -23
  94. data/vendor/assets/javascripts/jquery.validate/localization/messages_eu.js +0 -25
  95. data/vendor/assets/javascripts/jquery.validate/localization/messages_fa.js +0 -25
  96. data/vendor/assets/javascripts/jquery.validate/localization/messages_fi.js +0 -23
  97. data/vendor/assets/javascripts/jquery.validate/localization/messages_fr.js +0 -47
  98. data/vendor/assets/javascripts/jquery.validate/localization/messages_ge.js +0 -23
  99. data/vendor/assets/javascripts/jquery.validate/localization/messages_he.js +0 -25
  100. data/vendor/assets/javascripts/jquery.validate/localization/messages_hr.js +0 -25
  101. data/vendor/assets/javascripts/jquery.validate/localization/messages_hu.js +0 -24
  102. data/vendor/assets/javascripts/jquery.validate/localization/messages_it.js +0 -25
  103. data/vendor/assets/javascripts/jquery.validate/localization/messages_ja.js +0 -25
  104. data/vendor/assets/javascripts/jquery.validate/localization/messages_ka.js +0 -25
  105. data/vendor/assets/javascripts/jquery.validate/localization/messages_kk.js +0 -25
  106. data/vendor/assets/javascripts/jquery.validate/localization/messages_ko.js +0 -25
  107. data/vendor/assets/javascripts/jquery.validate/localization/messages_lt.js +0 -25
  108. data/vendor/assets/javascripts/jquery.validate/localization/messages_lv.js +0 -25
  109. data/vendor/assets/javascripts/jquery.validate/localization/messages_ms.js +0 -25
  110. data/vendor/assets/javascripts/jquery.validate/localization/messages_nl.js +0 -35
  111. data/vendor/assets/javascripts/jquery.validate/localization/messages_no.js +0 -25
  112. data/vendor/assets/javascripts/jquery.validate/localization/messages_pl.js +0 -25
  113. data/vendor/assets/javascripts/jquery.validate/localization/messages_ptbr.js +0 -24
  114. data/vendor/assets/javascripts/jquery.validate/localization/messages_ptpt.js +0 -24
  115. data/vendor/assets/javascripts/jquery.validate/localization/messages_ro.js +0 -25
  116. data/vendor/assets/javascripts/jquery.validate/localization/messages_ru.js +0 -25
  117. data/vendor/assets/javascripts/jquery.validate/localization/messages_se.js +0 -23
  118. data/vendor/assets/javascripts/jquery.validate/localization/messages_si.js +0 -25
  119. data/vendor/assets/javascripts/jquery.validate/localization/messages_sk.js +0 -22
  120. data/vendor/assets/javascripts/jquery.validate/localization/messages_sl.js +0 -25
  121. data/vendor/assets/javascripts/jquery.validate/localization/messages_sr.js +0 -25
  122. data/vendor/assets/javascripts/jquery.validate/localization/messages_sv.js +0 -23
  123. data/vendor/assets/javascripts/jquery.validate/localization/messages_th.js +0 -25
  124. data/vendor/assets/javascripts/jquery.validate/localization/messages_tr.js +0 -25
  125. data/vendor/assets/javascripts/jquery.validate/localization/messages_tw.js +0 -24
  126. data/vendor/assets/javascripts/jquery.validate/localization/messages_uk.js +0 -25
  127. data/vendor/assets/javascripts/jquery.validate/localization/messages_vi.js +0 -25
  128. data/vendor/assets/javascripts/jquery.validate/localization/messages_zh.js +0 -25
  129. data/vendor/assets/javascripts/jquery.validate/localization/messages_zhtw.js +0 -26
  130. data/vendor/assets/javascripts/jquery.validate/localization/methods_de.js +0 -12
  131. data/vendor/assets/javascripts/jquery.validate/localization/methods_nl.js +0 -9
  132. data/vendor/assets/javascripts/jquery.validate/localization/methods_pt.js +0 -9
@@ -76,7 +76,7 @@ module Spree
76
76
  end
77
77
 
78
78
  def set_successful_flash_notice
79
- flash.notice = Spree.t(:order_processed_successfully)
79
+ flash.notice = t('spree.order_processed_successfully')
80
80
  flash['order_completed'] = true
81
81
  end
82
82
 
@@ -155,7 +155,7 @@ module Spree
155
155
  def ensure_sufficient_stock_lines
156
156
  if @order.insufficient_stock_lines.present?
157
157
  out_of_stock_items = @order.insufficient_stock_lines.collect(&:name).to_sentence
158
- flash[:error] = Spree.t(:inventory_error_flash_for_insufficient_quantity, names: out_of_stock_items)
158
+ flash[:error] = t('spree.inventory_error_flash_for_insufficient_quantity', names: out_of_stock_items)
159
159
  redirect_to spree.cart_path
160
160
  end
161
161
  end
@@ -206,7 +206,7 @@ module Spree
206
206
  end
207
207
 
208
208
  def rescue_from_spree_gateway_error(exception)
209
- flash.now[:error] = Spree.t(:spree_gateway_error_flash_for_checkout)
209
+ flash.now[:error] = t('spree.spree_gateway_error_flash_for_checkout')
210
210
  @order.errors.add(:base, exception.message)
211
211
  render :edit
212
212
  end
@@ -6,9 +6,9 @@ module Spree
6
6
  end
7
7
  if params[:locale] && I18n.available_locales.map(&:to_s).include?(params[:locale])
8
8
  session[:locale] = I18n.locale = params[:locale]
9
- flash.notice = Spree.t(:locale_changed)
9
+ flash.notice = t('spree.locale_changed')
10
10
  else
11
- flash[:error] = Spree.t(:locale_not_changed)
11
+ flash[:error] = t('spree.locale_not_changed')
12
12
  end
13
13
  redirect_back_or_default(spree.root_path)
14
14
  end
@@ -1,7 +1,6 @@
1
1
  module Spree
2
2
  class OrdersController < Spree::StoreController
3
3
  before_action :check_authorization
4
- rescue_from ActiveRecord::RecordNotFound, with: :render_404
5
4
  helper 'spree/products', 'spree/orders'
6
5
 
7
6
  respond_to :html
@@ -48,7 +47,7 @@ module Spree
48
47
 
49
48
  # 2,147,483,647 is crazy. See issue https://github.com/spree/spree/issues/2695.
50
49
  if !quantity.between?(1, 2_147_483_647)
51
- @order.errors.add(:base, Spree.t(:please_enter_reasonable_quantity))
50
+ @order.errors.add(:base, t('spree.please_enter_reasonable_quantity'))
52
51
  end
53
52
 
54
53
  begin
@@ -71,7 +70,7 @@ module Spree
71
70
  end
72
71
 
73
72
  def populate_redirect
74
- flash[:error] = Spree.t(:populate_get_error)
73
+ flash[:error] = t('spree.populate_get_error')
75
74
  redirect_to('/cart')
76
75
  end
77
76
 
@@ -85,9 +84,9 @@ module Spree
85
84
 
86
85
  def accurate_title
87
86
  if @order && @order.completed?
88
- Spree.t(:order_number, number: @order.number)
87
+ t('spree.order_number', number: @order.number)
89
88
  else
90
- Spree.t(:shopping_cart)
89
+ t('spree.shopping_cart')
91
90
  end
92
91
  end
93
92
 
@@ -115,7 +114,7 @@ module Spree
115
114
  def assign_order
116
115
  @order = current_order
117
116
  unless @order
118
- flash[:error] = Spree.t(:order_not_found)
117
+ flash[:error] = t('spree.order_not_found')
119
118
  redirect_to(root_path) && return
120
119
  end
121
120
  end
@@ -3,7 +3,6 @@ module Spree
3
3
  before_action :load_product, only: :show
4
4
  before_action :load_taxon, only: :index
5
5
 
6
- rescue_from ActiveRecord::RecordNotFound, with: :render_404
7
6
  helper 'spree/taxons'
8
7
 
9
8
  respond_to :html
@@ -39,7 +39,7 @@ module Spree
39
39
  def lock_order
40
40
  Spree::OrderMutex.with_lock!(@order) { yield }
41
41
  rescue Spree::OrderMutex::LockFailed
42
- flash[:error] = Spree.t(:order_mutex_error)
42
+ flash[:error] = t('spree.order_mutex_error')
43
43
  redirect_to spree.cart_path
44
44
  end
45
45
  end
@@ -1,6 +1,5 @@
1
1
  module Spree
2
2
  class TaxonsController < Spree::StoreController
3
- rescue_from ActiveRecord::RecordNotFound, with: :render_404
4
3
  helper 'spree/products'
5
4
 
6
5
  respond_to :html
@@ -1,43 +1,44 @@
1
1
  <% address_id = address_type.chars.first %>
2
2
  <div class="inner" data-hook=<%="#{address_type}_inner" %>>
3
3
  <p class="field" id=<%="#{address_id}firstname" %>>
4
- <%= form.label :firstname, Spree.t(:first_name) %><span class="required">*</span><br />
5
- <%= form.text_field :firstname, class: 'required', autocomplete: address_type + ' given-name' %>
4
+ <%= form.label :firstname, t('spree.first_name') %><span class="required">*</span><br />
5
+ <%= form.text_field :firstname, class: 'required', autocomplete: address_type + ' given-name', required: true, autofocus: true %>
6
6
  </p>
7
7
 
8
8
  <p class="field" id=<%="#{address_id}lastname" %>>
9
- <%= form.label :lastname, Spree.t(:last_name) %><span class="required">*</span><br />
9
+ <%= form.label :lastname, t('spree.last_name') %><br />
10
10
  <%= form.text_field :lastname, autocomplete: address_type + ' family-name' %>
11
11
  </p>
12
12
 
13
13
  <% if Spree::Config[:company] %>
14
14
  <p class="field" id=<%="#{address_id}company" %>>
15
- <%= form.label :company, Spree.t(:company) %><br />
15
+ <%= form.label :company, t('spree.company') %><br />
16
16
  <%= form.text_field :company, autocomplete: address_type + ' organization' %>
17
17
  </p>
18
18
  <% end %>
19
19
 
20
20
  <p class="field" id=<%="#{address_id}address1" %>>
21
- <%= form.label :address1, Spree.t(:street_address) %><span class="required">*</span><br />
22
- <%= form.text_field :address1, class: 'required', autocomplete: address_type + ' address-line1' %>
21
+ <%= form.label :address1, t('spree.street_address') %><span class="required">*</span><br />
22
+ <%= form.text_field :address1, class: 'required', autocomplete: address_type + ' address-line1', required: true %>
23
23
  </p>
24
24
 
25
25
  <p class="field" id=<%="#{address_id}address2" %>>
26
- <%= form.label :address2, Spree.t(:street_address_2) %><br />
26
+ <%= form.label :address2, I18n.t('spree.street_address_2') %><br />
27
27
  <%= form.text_field :address2, autocomplete: address_type + ' address-line2' %>
28
28
  </p>
29
29
 
30
30
  <p class="field" id=<%="#{address_id}city" %>>
31
- <%= form.label :city, Spree.t(:city) %><span class="required">*</span><br />
32
- <%= form.text_field :city, class: 'required', autocomplete: address_type + ' address-level2' %>
31
+ <%= form.label :city, t('spree.city') %><span class="required">*</span><br />
32
+ <%= form.text_field :city, class: 'required', autocomplete: address_type + ' address-level2', required: true %>
33
33
  </p>
34
34
 
35
35
  <p class="field" id=<%="#{address_id}country" %>>
36
- <%= form.label :country_id, Spree.t(:country) %><span class="required">*</span><br />
36
+ <%= form.label :country_id, t('spree.country') %><span class="required">*</span><br />
37
37
  <span id=<%="#{address_id}country-selection" %>>
38
38
  <%= form.collection_select :country_id, available_countries, :id, :name, {},
39
39
  class: 'required',
40
- autocomplete: address_type + ' country-name'
40
+ autocomplete: address_type + ' country-name',
41
+ required: true
41
42
  %>
42
43
  </span>
43
44
  </p>
@@ -45,7 +46,7 @@
45
46
  <% if Spree::Config[:address_requires_state] %>
46
47
  <p class="field" id=<%="#{address_id}state" %>>
47
48
  <% have_states = !address.country.states.empty? %>
48
- <%= form.label :state, Spree.t(:state) %><span class='required' id=<%="#{address_id}state-required"%>>*</span><br/>
49
+ <%= form.label :state, t('spree.state') %><span class='required' id=<%="#{address_id}state-required"%>>*</span><br/>
49
50
 
50
51
  <span class="js-address-fields" style="display: none;">
51
52
  <%=
@@ -56,7 +57,7 @@
56
57
  class: have_states ? 'required' : '',
57
58
  style: have_states ? '' : 'display: none;',
58
59
  disabled: !have_states,
59
- autocomplete: address_type + ' address-level1'
60
+ autocomplete: address_type + ' address-level1',
60
61
  })
61
62
  %>
62
63
  <%=
@@ -65,30 +66,31 @@
65
66
  class: !have_states ? 'required' : '',
66
67
  style: have_states ? 'display: none;' : '',
67
68
  disabled: have_states,
68
- autocomplete: address_type + ' address-level1'
69
+ autocomplete: address_type + ' address-level1',
69
70
  )
70
71
  %>
71
72
  </span>
72
73
  <noscript>
73
- <%= form.text_field :state_name, class: 'required', autocomplete: address_type + ' address-level1' %>
74
+ <%= form.text_field :state_name, class: 'required', autocomplete: address_type + ' address-level1', required: true %>
74
75
  </noscript>
75
76
  </p>
76
77
  <% end %>
77
78
 
78
79
  <p class="field" id=<%="#{address_id}zipcode" %>>
79
- <%= form.label :zipcode, Spree.t(:zip) %><% if address.require_zipcode? %><span class="required">*</span><% end %><br />
80
- <%= form.text_field :zipcode, class: "#{'required' if address.require_zipcode?}", autocomplete: address_type + ' postal-code' %>
80
+ <%= form.label :zipcode, t('spree.zip') %><% if address.require_zipcode? %><span class="required">*</span><% end %><br />
81
+ <%= form.text_field :zipcode, class: "#{'required' if address.require_zipcode?}", autocomplete: address_type + ' postal-code', required: true %>
81
82
  </p>
82
83
 
83
84
  <p class="field" id=<%="#{address_id}phone" %>>
84
- <%= form.label :phone, Spree.t(:phone) %><% if address.require_phone? %><span class="required">*</span><% end %><br />
85
- <%= form.phone_field :phone, class: "#{'required' if address.require_phone?}", autocomplete: address_type + ' home tel' %>
85
+ <%= form.label :phone, t('spree.phone') %><% if address.require_phone? %><span class="required">*</span><% end %><br />
86
+ <% phone_hash = address.require_phone? ? { class: 'required', required: true } : {} %>
87
+ <%= form.phone_field :phone, phone_hash.merge({ autocomplete: address_type + ' home tel' }) %>
86
88
  </p>
87
89
 
88
90
  <% if Spree::Config[:alternative_shipping_phone] %>
89
91
  <p class="field" id=<%="#{address_id}altphone" %>>
90
- <%= form.label :alternative_phone, Spree.t(:alternative_phone) %><br />
91
- <%= form.phone_field :alternative_phone, autocomplete: address_type + ' tel' %>
92
+ <%= form.label :alternative_phone, t('spree.alternative_phone') %><br />
93
+ <%= form.phone_field :alternative_phone, autocomplete: address_type + ' tel'%>
92
94
  </p>
93
95
  <% end %>
94
96
  </div>
@@ -1,7 +1,7 @@
1
1
  <div class="columns alpha six" data-hook="billing_fieldset_wrapper">
2
2
  <fieldset id="billing" data-hook>
3
3
  <%= form.fields_for :bill_address do |bill_form| %>
4
- <legend align="center"><%= Spree.t(:billing_address) %></legend>
4
+ <legend align="center"><%= t('spree.billing_address') %></legend>
5
5
  <%= render partial: 'spree/address/form', locals: { form: bill_form, address_type: 'billing', address: @order.bill_address } %>
6
6
  <% end %>
7
7
  </fieldset>
@@ -10,10 +10,10 @@
10
10
  <div class="columns omega six" data-hook="shipping_fieldset_wrapper">
11
11
  <fieldset id="shipping" data-hook>
12
12
  <%= form.fields_for :ship_address do |ship_form| %>
13
- <legend align="center"><%= Spree.t(:shipping_address) %></legend>
13
+ <legend align="center"><%= t('spree.shipping_address') %></legend>
14
14
  <p class="field checkbox" data-hook="use_billing">
15
15
  <%= check_box_tag 'order[use_billing]', '1', @order.shipping_eq_billing_address? %>
16
- <%= label_tag :order_use_billing, Spree.t(:use_billing_address), id: 'use_billing' %>
16
+ <%= label_tag :order_use_billing, t('spree.use_billing_address'), id: 'use_billing' %>
17
17
  </p>
18
18
  <%= render partial: 'spree/address/form', locals: { form: ship_form, address_type: 'shipping', address: @order.ship_address } %>
19
19
  <% end %>
@@ -22,12 +22,12 @@
22
22
  <hr class="clear" />
23
23
 
24
24
  <div class="form-buttons" data-hook="buttons">
25
- <%= submit_tag Spree.t(:save_and_continue), class: 'continue button primary' %>
25
+ <%= submit_tag t('spree.save_and_continue'), class: 'continue button primary' %>
26
26
  <% if try_spree_current_user %>
27
27
  <span data-hook="save_user_address">
28
28
  &nbsp; &nbsp;
29
29
  <%= check_box_tag 'save_user_address', '1', try_spree_current_user.respond_to?(:persist_order_address) %>
30
- <%= label_tag :save_user_address, Spree.t(:save_my_address) %>
30
+ <%= label_tag :save_user_address, t('spree.save_my_address') %>
31
31
  </span>
32
32
  <% end %>
33
33
  </div>
@@ -1,6 +1,6 @@
1
1
  <fieldset id="order_details" data-hook>
2
2
  <div class="clear"></div>
3
- <legend align="center"><%= Spree.t(:confirm) %></legend>
3
+ <legend align="center"><%= t('spree.confirm') %></legend>
4
4
  <%= render partial: 'spree/shared/order_details', locals: { order: @order } %>
5
5
  </fieldset>
6
6
 
@@ -12,11 +12,11 @@
12
12
  <div class="terms_and_conditions" data-hook="terms_and_conditions">
13
13
  <div class="policy"><%= render partial: "spree/checkout/terms_and_conditions" %></div>
14
14
  <%= check_box_tag :accept_terms_and_conditions, 'accepted', false %>
15
- <%= label_tag :accept_terms_and_conditions, Spree.t(:agree_to_terms_of_service) %>
15
+ <%= label_tag :accept_terms_and_conditions, t('spree.agree_to_terms_of_service') %>
16
16
  </div>
17
17
  <% end %>
18
18
 
19
- <%= submit_tag Spree.t(:place_order),
19
+ <%= submit_tag t('spree.place_order'),
20
20
  disabled: requires_acceptance,
21
21
  class: "continue button primary #{ 'disabled' if requires_acceptance }" %>
22
22
  <% end %>
@@ -1,12 +1,12 @@
1
1
  <fieldset id='shipping_method' data-hook>
2
- <legend align="center"><%= Spree.t(:delivery) %></legend>
2
+ <legend align="center"><%= t('spree.delivery') %></legend>
3
3
  <div class="inner" data-hook="shipping_method_inner">
4
4
  <div id="methods">
5
5
  <%= form.fields_for :shipments do |ship_form| %>
6
6
 
7
7
  <div class="shipment">
8
8
  <h3 class="stock-location" data-hook="stock-location">
9
- <%= Spree.t(:package_from) %>
9
+ <%= t('spree.package_from') %>
10
10
  <strong class="stock-location-name" data-hook="stock-location-name"><%= ship_form.object.stock_location.name %></strong>
11
11
  </h3>
12
12
 
@@ -19,14 +19,16 @@
19
19
  </colgroup>
20
20
  <thead>
21
21
  <th></th>
22
- <th align='left'><%= Spree.t(:item) %></th>
23
- <th><%= Spree.t(:qty) %></th>
24
- <th><%= Spree.t(:price) %></th>
22
+ <th align='left'><%= t('spree.item') %></th>
23
+ <th><%= t('spree.qty') %></th>
24
+ <th><%= t('spree.price') %></th>
25
25
  </thead>
26
26
  <tbody>
27
27
  <% ship_form.object.manifest.each do |item| %>
28
28
  <tr class="stock-item">
29
- <td class="item-image"><%= image_tag item.variant.display_image.attachment(:mini) %></td>
29
+ <td class="item-image">
30
+ <%= render 'spree/shared/image', image: item.variant.display_image, size: :mini %>
31
+ </td>
30
32
  <td class="item-name"><%= item.variant.name %></td>
31
33
  <td class="item-qty"><%= item.quantity %></td>
32
34
  <td class="item-price"><%= display_price(item.variant) %></td>
@@ -35,7 +37,7 @@
35
37
  </tbody>
36
38
  </table>
37
39
 
38
- <h5 class="stock-shipping-method-title"><%= Spree.t(:shipping_method) %></h5>
40
+ <h5 class="stock-shipping-method-title"><%= t('spree.shipping_method') %></h5>
39
41
  <ul class="field radios shipping-methods">
40
42
  <% ship_form.object.shipping_rates.each do |rate| %>
41
43
  <li class="shipping-method">
@@ -54,7 +56,7 @@
54
56
  <% if @differentiator.try(:missing?) %>
55
57
  <div class="shipment unshippable">
56
58
  <h3 class="stock-location" data-hook="stock-location">
57
- <%= Spree.t(:unshippable_items) %>
59
+ <%= t('spree.unshippable_items') %>
58
60
  </h3>
59
61
  <table class="stock-contents" data-hook="stock-missing">
60
62
  <colgroup>
@@ -65,14 +67,16 @@
65
67
  </colgroup>
66
68
  <thead>
67
69
  <th></th>
68
- <th align='left'><%= Spree.t(:item) %></th>
69
- <th><%= Spree.t(:qty) %></th>
70
- <th><%= Spree.t(:price) %></th>
70
+ <th align='left'><%= t('spree.item') %></th>
71
+ <th><%= t('spree.qty') %></th>
72
+ <th><%= t('spree.price') %></th>
71
73
  </thead>
72
74
  <tbody>
73
75
  <% @differentiator.missing.each do |variant, quantity| %>
74
76
  <tr class="stock-item">
75
- <td class="item-image"><%= image_tag variant.display_image.attachment(:mini) %></td>
77
+ <td class="item-image">
78
+ <%= render 'spree/shared/image', image: variant.display_image, size: :mini %>
79
+ </td>
76
80
  <td class="item-name"><%= variant.name %></td>
77
81
  <td class="item-qty"><%= quantity %></td>
78
82
  <td class="item-price"><%= display_price(variant) %></td>
@@ -86,7 +90,7 @@
86
90
  </div>
87
91
  <% if Spree::Config[:shipping_instructions] %>
88
92
  <p id="minstrs" data-hook>
89
- <%= form.label :special_instructions, Spree.t(:shipping_instructions) %><br />
93
+ <%= form.label :special_instructions, t('spree.shipping_instructions') %><br />
90
94
  <%= form.text_area :special_instructions, cols: 40, rows: 7 %>
91
95
  </p>
92
96
  <% end %>
@@ -96,5 +100,5 @@
96
100
  <br />
97
101
 
98
102
  <div class="form-buttons" data-hook="buttons">
99
- <%= submit_tag Spree.t(:save_and_continue), class: 'continue button primary' %>
103
+ <%= submit_tag t('spree.save_and_continue'), class: 'continue button primary' %>
100
104
  </div>
@@ -1,16 +1,16 @@
1
1
  <fieldset id="payment" data-hook>
2
- <legend align="center"><%= Spree.t(:payment_information) %></legend>
2
+ <legend align="center"><%= t('spree.payment_information') %></legend>
3
3
  <div data-hook="checkout_payment_step">
4
4
  <% if @wallet_payment_sources.present? %>
5
5
  <div class="card_options">
6
6
  <%= radio_button_tag 'use_existing_card', 'yes', true %>
7
7
  <label for="use_existing_card_yes">
8
- <%= Spree.t(:use_existing_cc) %>
8
+ <%= t('spree.use_existing_cc') %>
9
9
  </label>
10
10
  <br/>
11
11
  <%= radio_button_tag 'use_existing_card', 'no' %>
12
12
  <label for="use_existing_card_no">
13
- <%= Spree.t(:use_new_cc_or_payment_method) %>
13
+ <%= t('spree.use_new_cc_or_payment_method') %>
14
14
  </label>
15
15
  </div>
16
16
 
@@ -40,7 +40,7 @@
40
40
  <p>
41
41
  <label>
42
42
  <%= radio_button_tag "order[payments_attributes][][payment_method_id]", method.id, method == @order.available_payment_methods.first %>
43
- <%= Spree.t(method.name, scope: :payment_methods, default: method.name) %>
43
+ <%= t(method.name, scope: 'spree.payment_methods', default: method.name) %>
44
44
  </label>
45
45
  </p>
46
46
  <% end %>
@@ -60,7 +60,7 @@
60
60
  <%= form.label :coupon_code %><br />
61
61
  <%= form.text_field :coupon_code %>
62
62
  <button type="button" class="button" id="coupon-code-apply-button">
63
- <%= Spree.t(:apply_code) %>
63
+ <%= t('spree.apply_code') %>
64
64
  </button>
65
65
 
66
66
  </p>
@@ -72,6 +72,6 @@
72
72
  <br class="space" />
73
73
 
74
74
  <div class="form-buttons" data-hook="buttons">
75
- <%= submit_tag Spree.t(:save_and_continue), class: 'continue button primary' %>
75
+ <%= submit_tag t('spree.save_and_continue'), class: 'continue button primary' %>
76
76
  <script>Spree.disableSaveOnClick();</script>
77
77
  </div>
@@ -1,9 +1,9 @@
1
- <h3><%= Spree.t(:order_summary) %></h3>
1
+ <h3><%= t('spree.order_summary') %></h3>
2
2
 
3
3
  <table data-hook="order_summary">
4
4
  <tbody>
5
5
  <tr data-hook="item_total">
6
- <td><strong><%= Spree.t(:item_total) %>:</strong></td>
6
+ <td><strong><%= t('spree.item_total') %>:</strong></td>
7
7
  <td><strong><%= order.display_item_total.to_html %></strong></td>
8
8
  </tr>
9
9
 
@@ -29,7 +29,7 @@
29
29
 
30
30
  <% if order.passed_checkout_step?("delivery") && order.shipments.any? %>
31
31
  <tr data-hook="shipping_total">
32
- <td><%= Spree.t(:shipping_total) %>:</td>
32
+ <td><%= t('spree.shipping_total') %>:</td>
33
33
  <td><%= Spree::Money.new(order.shipments.to_a.sum(&:cost), currency: order.currency).to_html %></td>
34
34
  </tr>
35
35
 
@@ -59,13 +59,13 @@
59
59
 
60
60
  <% if order.total_applicable_store_credit > 0.0 %>
61
61
  <tr data-hook="checkout-summary-store-credit">
62
- <td><%= Spree.t("store_credit.store_credit") %>:</td>
62
+ <td><%= t('spree.store_credit.store_credit') %>:</td>
63
63
  <td><%= order.display_total_applicable_store_credit.to_html %></td>
64
64
  </tr>
65
65
  <% end %>
66
66
 
67
67
  <tr data-hook="order_total">
68
- <td><strong><%= Spree.t(:order_total) %>:</strong></td>
68
+ <td><strong><%= t('spree.order_total') %>:</strong></td>
69
69
  <td><strong><span id='summary-order-total'><%= order.display_order_total_after_store_credit.to_html %></span></strong></td>
70
70
  </tr>
71
71
  </tbody>