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.
- checksums.yaml +5 -5
- data/README.md +1 -5
- data/Rakefile +7 -7
- data/app/assets/config/solidus_frontend_manifest.js +0 -2
- data/app/assets/javascripts/spree/frontend.js +0 -1
- data/app/assets/javascripts/spree/frontend/cart.js +30 -0
- data/app/assets/javascripts/spree/frontend/checkout.js +24 -0
- data/app/assets/javascripts/spree/frontend/checkout/address.js +128 -0
- data/app/assets/javascripts/spree/frontend/checkout/coupon-code.js +40 -0
- data/app/assets/javascripts/spree/frontend/checkout/payment.js +55 -0
- data/app/assets/javascripts/spree/frontend/product.js +81 -0
- data/app/assets/stylesheets/spree/frontend/_variables.scss +3 -0
- data/app/assets/stylesheets/spree/frontend/screen.css.scss +2 -2
- data/app/controllers/spree/checkout_controller.rb +3 -3
- data/app/controllers/spree/locale_controller.rb +2 -2
- data/app/controllers/spree/orders_controller.rb +5 -6
- data/app/controllers/spree/products_controller.rb +0 -1
- data/app/controllers/spree/store_controller.rb +1 -1
- data/app/controllers/spree/taxons_controller.rb +0 -1
- data/app/views/spree/address/_form.html.erb +23 -21
- data/app/views/spree/checkout/_address.html.erb +5 -5
- data/app/views/spree/checkout/_confirm.html.erb +3 -3
- data/app/views/spree/checkout/_delivery.html.erb +18 -14
- data/app/views/spree/checkout/_payment.html.erb +6 -6
- data/app/views/spree/checkout/_summary.html.erb +5 -5
- data/app/views/spree/checkout/edit.html.erb +2 -6
- data/app/views/spree/checkout/payment/_gateway.html.erb +9 -9
- data/app/views/spree/content/cvv.html.erb +1 -1
- data/app/views/spree/orders/_adjustments.html.erb +4 -4
- data/app/views/spree/orders/_form.html.erb +6 -6
- data/app/views/spree/orders/_line_item.html.erb +4 -4
- data/app/views/spree/orders/edit.html.erb +9 -9
- data/app/views/spree/orders/show.html.erb +4 -4
- data/app/views/spree/payments/_payment.html.erb +1 -1
- data/app/views/spree/products/_cart_form.html.erb +7 -7
- data/app/views/spree/products/_image.html.erb +2 -2
- data/app/views/spree/products/_promotions.html.erb +1 -1
- data/app/views/spree/products/_properties.html.erb +1 -1
- data/app/views/spree/products/_taxons.html.erb +1 -1
- data/app/views/spree/products/index.html.erb +1 -1
- data/app/views/spree/products/show.html.erb +1 -1
- data/app/views/spree/shared/_address.html.erb +2 -2
- data/app/views/spree/shared/_filters.html.erb +2 -2
- data/app/views/spree/shared/_footer.html.erb +1 -1
- data/app/views/spree/shared/_image.html.erb +12 -0
- data/app/views/spree/shared/_login_bar_items.html.erb +1 -0
- data/app/views/spree/shared/_main_nav_bar.html.erb +2 -2
- data/app/views/spree/shared/_nav_bar.html.erb +1 -0
- data/app/views/spree/shared/_order_details.html.erb +20 -20
- data/app/views/spree/shared/_products.html.erb +3 -3
- data/app/views/spree/shared/_search.html.erb +3 -3
- data/app/views/spree/shared/_shipment_tracking.html.erb +1 -1
- data/app/views/spree/shared/_taxonomies.html.erb +2 -2
- data/lib/generators/solidus/views/override_generator.rb +1 -0
- data/lib/spree/frontend.rb +4 -2
- data/solidus_frontend.gemspec +1 -2
- data/spec/controllers/spree/checkout_controller_spec.rb +12 -12
- data/spec/controllers/spree/current_order_tracking_spec.rb +1 -1
- data/spec/controllers/spree/orders_controller_ability_spec.rb +6 -4
- data/spec/controllers/spree/orders_controller_spec.rb +4 -3
- data/spec/controllers/spree/orders_controller_transitions_spec.rb +1 -1
- data/spec/controllers/spree/products_controller_spec.rb +3 -2
- data/spec/features/caching/products_spec.rb +7 -7
- data/spec/features/cart_spec.rb +1 -1
- data/spec/features/checkout_spec.rb +10 -9
- data/spec/features/coupon_code_spec.rb +12 -13
- data/spec/features/locale_spec.rb +0 -38
- data/spec/features/order_spec.rb +1 -1
- data/spec/features/products_spec.rb +4 -4
- data/spec/features/promotion_code_invalidation_spec.rb +3 -3
- data/spec/features/quantity_promotions_spec.rb +5 -5
- data/spec/generators/solidus/views/override_generator_spec.rb +2 -1
- data/spec/spec_helper.rb +19 -41
- data/spec/support/shared_contexts/custom_products.rb +17 -17
- metadata +19 -88
- data/Gemfile +0 -7
- data/app/assets/javascripts/spree/frontend/cart.js.coffee +0 -15
- data/app/assets/javascripts/spree/frontend/checkout.js.coffee +0 -17
- data/app/assets/javascripts/spree/frontend/checkout/address.js.coffee +0 -91
- data/app/assets/javascripts/spree/frontend/checkout/coupon-code.js.coffee +0 -34
- data/app/assets/javascripts/spree/frontend/checkout/payment.js.coffee +0 -42
- data/app/assets/javascripts/spree/frontend/product.js.coffee +0 -47
- data/vendor/assets/javascripts/jquery.validate/additional-methods.min.js +0 -12
- data/vendor/assets/javascripts/jquery.validate/jquery.validate.min.js +0 -12
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ar.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_bg.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ca.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_cs.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_da.js +0 -22
- data/vendor/assets/javascripts/jquery.validate/localization/messages_de.js +0 -22
- data/vendor/assets/javascripts/jquery.validate/localization/messages_el.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_es.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_et.js +0 -23
- data/vendor/assets/javascripts/jquery.validate/localization/messages_eu.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_fa.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_fi.js +0 -23
- data/vendor/assets/javascripts/jquery.validate/localization/messages_fr.js +0 -47
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ge.js +0 -23
- data/vendor/assets/javascripts/jquery.validate/localization/messages_he.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_hr.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_hu.js +0 -24
- data/vendor/assets/javascripts/jquery.validate/localization/messages_it.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ja.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ka.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_kk.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ko.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_lt.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_lv.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ms.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_nl.js +0 -35
- data/vendor/assets/javascripts/jquery.validate/localization/messages_no.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_pl.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ptbr.js +0 -24
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ptpt.js +0 -24
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ro.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ru.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_se.js +0 -23
- data/vendor/assets/javascripts/jquery.validate/localization/messages_si.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_sk.js +0 -22
- data/vendor/assets/javascripts/jquery.validate/localization/messages_sl.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_sr.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_sv.js +0 -23
- data/vendor/assets/javascripts/jquery.validate/localization/messages_th.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_tr.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_tw.js +0 -24
- data/vendor/assets/javascripts/jquery.validate/localization/messages_uk.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_vi.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_zh.js +0 -25
- data/vendor/assets/javascripts/jquery.validate/localization/messages_zhtw.js +0 -26
- data/vendor/assets/javascripts/jquery.validate/localization/methods_de.js +0 -12
- data/vendor/assets/javascripts/jquery.validate/localization/methods_nl.js +0 -9
- 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 =
|
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] =
|
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] =
|
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 =
|
9
|
+
flash.notice = t('spree.locale_changed')
|
10
10
|
else
|
11
|
-
flash[:error] =
|
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,
|
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] =
|
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
|
-
|
87
|
+
t('spree.order_number', number: @order.number)
|
89
88
|
else
|
90
|
-
|
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] =
|
117
|
+
flash[:error] = t('spree.order_not_found')
|
119
118
|
redirect_to(root_path) && return
|
120
119
|
end
|
121
120
|
end
|
@@ -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] =
|
42
|
+
flash[:error] = t('spree.order_mutex_error')
|
43
43
|
redirect_to spree.cart_path
|
44
44
|
end
|
45
45
|
end
|
@@ -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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
85
|
-
|
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,
|
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"><%=
|
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"><%=
|
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,
|
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
|
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
|
|
29
29
|
<%= check_box_tag 'save_user_address', '1', try_spree_current_user.respond_to?(:persist_order_address) %>
|
30
|
-
<%= label_tag :save_user_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"><%=
|
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,
|
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
|
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"><%=
|
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
|
-
<%=
|
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'><%=
|
23
|
-
<th><%=
|
24
|
-
<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"
|
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"><%=
|
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
|
-
<%=
|
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'><%=
|
69
|
-
<th><%=
|
70
|
-
<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"
|
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,
|
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
|
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"><%=
|
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
|
-
<%=
|
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
|
-
<%=
|
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
|
-
<%=
|
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
|
-
<%=
|
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
|
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><%=
|
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><%=
|
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><%=
|
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><%=
|
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><%=
|
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>
|