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
@@ -2,7 +2,7 @@
|
|
2
2
|
<%= render partial: 'spree/shared/error_messages', locals: { target: @order } %>
|
3
3
|
|
4
4
|
<div class="row" data-hook="checkout_header">
|
5
|
-
<h1 class="columns three alpha" data-hook="checkout_title"><%=
|
5
|
+
<h1 class="columns three alpha" data-hook="checkout_title"><%= t('spree.checkout') %></h1>
|
6
6
|
<div class="columns thirteen omega" data-hook="checkout_progress"><%= checkout_progress %></div>
|
7
7
|
</div>
|
8
8
|
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<% if @order.state == 'address' || !@order.email? %>
|
13
13
|
<p class="field" style='clear: both'>
|
14
14
|
<%= form.label :email %><br />
|
15
|
-
<%= form.email_field :email %>
|
15
|
+
<%= form.email_field :email, required: true %>
|
16
16
|
</p>
|
17
17
|
<% end %>
|
18
18
|
<%= render @order.state, form: form %>
|
@@ -30,7 +30,3 @@
|
|
30
30
|
Spree.current_order_id = "<%= @order.number %>"
|
31
31
|
Spree.current_order_token = "<%= @order.guest_token %>"
|
32
32
|
</script>
|
33
|
-
|
34
|
-
<% if I18n.locale != :en %>
|
35
|
-
<%= javascript_include_tag 'jquery.validate/localization/messages_' + I18n.locale.to_s.downcase.gsub('-', '') %>
|
36
|
-
<% end %>
|
@@ -2,30 +2,30 @@
|
|
2
2
|
<% param_prefix = "payment_source[#{payment_method.id}]" %>
|
3
3
|
|
4
4
|
<p class="field">
|
5
|
-
<%= label_tag "name_on_card_#{payment_method.id}",
|
5
|
+
<%= label_tag "name_on_card_#{payment_method.id}", t('spree.name_on_card') %><span class="required">*</span><br />
|
6
6
|
<%= text_field_tag "#{param_prefix}[name]", "#{@order.billing_firstname} #{@order.billing_lastname}", { id: "name_on_card_#{payment_method.id}", autocomplete: "cc-name" } %>
|
7
7
|
</p>
|
8
8
|
|
9
9
|
<p class="field" data-hook="card_number">
|
10
|
-
<%= label_tag "card_number",
|
11
|
-
<%= text_field_tag "#{param_prefix}[number]", '', {id: 'card_number', class: 'required cardNumber', size: 19, maxlength: 19, autocomplete: "cc-number", type: "tel"} %>
|
10
|
+
<%= label_tag "card_number", t('spree.card_number') %><span class="required">*</span><br />
|
11
|
+
<%= text_field_tag "#{param_prefix}[number]", '', {id: 'card_number', class: 'required cardNumber', size: 19, maxlength: 19, autocomplete: "cc-number", type: "tel" } %>
|
12
12
|
|
13
13
|
<span id="card_type" style="display:none;">
|
14
|
-
( <span id="looks_like" ><%=
|
15
|
-
<span id="unrecognized"><%=
|
14
|
+
( <span id="looks_like" ><%= t('spree.card_type_is') %> <span id="type"></span></span>
|
15
|
+
<span id="unrecognized"><%= t('spree.unrecognized_card_type') %></span>
|
16
16
|
)
|
17
17
|
</span>
|
18
18
|
</p>
|
19
19
|
|
20
20
|
<p class="field" data-hook="card_expiration">
|
21
|
-
<%= label_tag "card_expiry",
|
21
|
+
<%= label_tag "card_expiry", t('spree.expiration') %><span class="required">*</span><br />
|
22
22
|
<%= text_field_tag "#{param_prefix}[expiry]", '', id: 'card_expiry', class: "required cardExpiry", placeholder: "MM / YY", type: "tel" %>
|
23
23
|
</p>
|
24
24
|
|
25
25
|
<p class="field" data-hook="card_code">
|
26
|
-
<%= label_tag "card_code",
|
27
|
-
<%= text_field_tag "#{param_prefix}[verification_value]", '', {id: 'card_code', class: 'required cardCode', size: 5, type: "tel", autocomplete: "off"} %>
|
28
|
-
<%= link_to "(#{
|
26
|
+
<%= label_tag "card_code", t('spree.card_code') %><span class="required">*</span><br />
|
27
|
+
<%= text_field_tag "#{param_prefix}[verification_value]", '', {id: 'card_code', class: 'required cardCode', size: 5, type: "tel", autocomplete: "off" } %>
|
28
|
+
<%= link_to "(#{t('spree.what_is_this')})", spree.cvv_path, target: '_blank', "data-hook" => "cvv_link", id: "cvv_link" %>
|
29
29
|
</p>
|
30
30
|
|
31
31
|
<% if @order.bill_address %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="cvv" data-hook>
|
2
|
-
<h1><%=
|
2
|
+
<h1><%= t('spree.what_is_a_cvv') %></h1>
|
3
3
|
<p>For Visa, MasterCard, and Discover cards, the card code is the last 3 digit number located on the back of your card on or above your signature line. For an American Express card, it is the 4 digits on the FRONT above the end of your card number.</p>
|
4
4
|
<p>To help reduce fraud in the card-not-present environment, credit card companies have introduced a card code program. Visa calls this code Card Verification Value (CVV); MasterCard calls it Card Validation Code (CVC); Discover calls it Card ID (CID). The card code is a three- or four- digit security code that is printed on the back of cards. The number typically appears at the end of the signature panel.</p>
|
5
5
|
<div class="cid-caption">Visa</div>
|
@@ -1,17 +1,17 @@
|
|
1
1
|
<tbody id="cart_adjustments" data-hook>
|
2
2
|
<% if @order.line_item_adjustments.exists? %>
|
3
3
|
<% @order.line_item_adjustments.promotion.eligible.group_by(&:label).each do |label, adjustments| %>
|
4
|
-
<%= render "spree/orders/adjustment_row", label: label, adjustments: adjustments, type:
|
4
|
+
<%= render "spree/orders/adjustment_row", label: label, adjustments: adjustments, type: t('spree.promotion') %>
|
5
5
|
<% end %>
|
6
6
|
<% end %>
|
7
7
|
|
8
8
|
<% @order.all_adjustments.tax.eligible.group_by(&:label).each do |label, adjustments| %>
|
9
|
-
<%= render "spree/orders/adjustment_row", label: label, adjustments: adjustments, type:
|
9
|
+
<%= render "spree/orders/adjustment_row", label: label, adjustments: adjustments, type: t('spree.tax') %>
|
10
10
|
<% end %>
|
11
11
|
|
12
12
|
<% @order.shipments.each do |shipment| %>
|
13
13
|
<tr>
|
14
|
-
<td colspan="4" align='right'><h5><%=
|
14
|
+
<td colspan="4" align='right'><h5><%= t('spree.shipping') %>: <%= shipment.shipping_method.name %></h5></td>
|
15
15
|
<td colspan='2'>
|
16
16
|
<h5><%= shipment.display_total_before_tax %></h5>
|
17
17
|
</td>
|
@@ -19,6 +19,6 @@
|
|
19
19
|
<% end %>
|
20
20
|
|
21
21
|
<% @order.adjustments.eligible.group_by(&:label).each do |label, adjustments| %>
|
22
|
-
<%= render "spree/orders/adjustment_row", label: label, adjustments: adjustments, type:
|
22
|
+
<%= render "spree/orders/adjustment_row", label: label, adjustments: adjustments, type: t('spree.adjustment') %>
|
23
23
|
<% end %>
|
24
24
|
</tbody>
|
@@ -3,10 +3,10 @@
|
|
3
3
|
<table id="cart-detail" data-hook>
|
4
4
|
<thead>
|
5
5
|
<tr data-hook="cart_items_headers">
|
6
|
-
<th class="cart-item-description-header" colspan="2"><%=
|
7
|
-
<th class="cart-item-price-header"><%=
|
8
|
-
<th class="cart-item-quantity-header"><%=
|
9
|
-
<th class="cart-item-total-header"><%=
|
6
|
+
<th class="cart-item-description-header" colspan="2"><%= t('spree.item') %></th>
|
7
|
+
<th class="cart-item-price-header"><%= t('spree.price') %></th>
|
8
|
+
<th class="cart-item-quantity-header"><%= t('spree.qty') %></th>
|
9
|
+
<th class="cart-item-total-header"><%= t('spree.total') %></th>
|
10
10
|
<th class="cart-item-delete-header"></th>
|
11
11
|
</tr>
|
12
12
|
</thead>
|
@@ -15,14 +15,14 @@
|
|
15
15
|
</tbody>
|
16
16
|
<% if order.adjustments.nonzero.exists? || order.line_item_adjustments.nonzero.exists? || order.shipment_adjustments.nonzero.exists? || order.shipments.any? %>
|
17
17
|
<tr class="cart-subtotal">
|
18
|
-
<td colspan="4" align='right'><h5><%=
|
18
|
+
<td colspan="4" align='right'><h5><%= t('spree.cart_subtotal', count: order.line_items.sum(:quantity)) %></h5></th>
|
19
19
|
<td colspan><h5><%= order.display_item_total %></h5></td>
|
20
20
|
<td></td>
|
21
21
|
</tr>
|
22
22
|
<%= render "spree/orders/adjustments" %>
|
23
23
|
<% end %>
|
24
24
|
<tr class="cart-total">
|
25
|
-
<td colspan="4" align='right'><h5><%=
|
25
|
+
<td colspan="4" align='right'><h5><%= t('spree.total') %></h5></th>
|
26
26
|
<td colspan><h5><%= order.display_total %></h5></td>
|
27
27
|
<td></td>
|
28
28
|
</tr>
|
@@ -2,10 +2,10 @@
|
|
2
2
|
<%= order_form.fields_for :line_items, line_item do |item_form| -%>
|
3
3
|
<tr class="<%= cycle('', 'alt') %> line-item">
|
4
4
|
<td class="cart-item-image" data-hook="cart_item_image">
|
5
|
-
<% if variant.images.
|
6
|
-
<%= link_to
|
5
|
+
<% if variant.images.empty? %>
|
6
|
+
<%= link_to(render('spree/shared/image', image: variant.product.display_image, size: :small), variant.product) %>
|
7
7
|
<% else %>
|
8
|
-
<%= link_to
|
8
|
+
<%= link_to(render('spree/shared/image', image: variant.images.first, size: :small), variant.product) %>
|
9
9
|
<% end %>
|
10
10
|
</td>
|
11
11
|
<td class="cart-item-description" data-hook="cart_item_description">
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<%= variant.options_text %>
|
14
14
|
<% if line_item.insufficient_stock? %>
|
15
15
|
<span class="out-of-stock">
|
16
|
-
<%=
|
16
|
+
<%= t('spree.out_of_stock') %> <br />
|
17
17
|
</span>
|
18
18
|
<% end %>
|
19
19
|
<span class="line-item-description" data-hook="line_item_description">
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<% @body_id = 'cart' %>
|
2
2
|
<div data-hook="cart_container">
|
3
|
-
<h1><%=
|
3
|
+
<h1><%= t('spree.shopping_cart') %></h1>
|
4
4
|
|
5
5
|
<% if @order.line_items.empty? %>
|
6
6
|
|
7
7
|
<div data-hook="empty_cart">
|
8
|
-
<p><%=
|
9
|
-
<p><%= link_to
|
8
|
+
<p><%= t('spree.your_cart_is_empty') %></p>
|
9
|
+
<p><%= link_to t('spree.continue_shopping'), products_path, class: 'button continue' %></p>
|
10
10
|
</div>
|
11
11
|
|
12
12
|
<% else %>
|
@@ -20,12 +20,12 @@
|
|
20
20
|
</div>
|
21
21
|
|
22
22
|
<div class="links columns sixteen alpha omega" data-hook="cart_buttons">
|
23
|
-
<%= order_form.text_field :coupon_code, size: 10, placeholder:
|
23
|
+
<%= order_form.text_field :coupon_code, size: 10, placeholder: t('spree.coupon_code') %>
|
24
24
|
<%= button_tag class: 'primary', id: 'update-button' do %>
|
25
|
-
<%=
|
25
|
+
<%= t('spree.update') %>
|
26
26
|
<% end %>
|
27
27
|
<%= button_tag class: 'button checkout primary', id: 'checkout-link', name: 'checkout' do %>
|
28
|
-
<%=
|
28
|
+
<%= t('spree.checkout') %>
|
29
29
|
<% end %>
|
30
30
|
</div>
|
31
31
|
|
@@ -36,9 +36,9 @@
|
|
36
36
|
<div id="empty-cart" data-hook>
|
37
37
|
<%= form_tag empty_cart_path, method: :put do %>
|
38
38
|
<p id="clear_cart_link" data-hook>
|
39
|
-
<%= submit_tag
|
40
|
-
<%=
|
41
|
-
<%= link_to
|
39
|
+
<%= submit_tag t('spree.empty_cart'), class: 'button gray' %>
|
40
|
+
<%= t('spree.or') %>
|
41
|
+
<%= link_to t('spree.continue_shopping'), products_path, class: 'continue button gray' %>
|
42
42
|
</p>
|
43
43
|
<% end %>
|
44
44
|
</div>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<fieldset id="order_summary" data-hook>
|
2
|
-
<legend><%=
|
2
|
+
<legend><%= t('spree.order_number', number: @order.number) %></legend>
|
3
3
|
<h1><%= accurate_title %></h1>
|
4
4
|
<% if order_just_completed?(@order) %>
|
5
|
-
<strong><%=
|
5
|
+
<strong><%= t('spree.thank_you_for_your_order') %></strong>
|
6
6
|
<% end %>
|
7
7
|
|
8
8
|
<div id="order" data-hook>
|
@@ -11,10 +11,10 @@
|
|
11
11
|
<br class="clear" />
|
12
12
|
|
13
13
|
<p data-hook="links">
|
14
|
-
<%= link_to
|
14
|
+
<%= link_to t('spree.back_to_store'), spree.root_path, class: "button" %>
|
15
15
|
<% unless order_just_completed?(@order) %>
|
16
16
|
<% if try_spree_current_user && respond_to?(:account_path) %>
|
17
|
-
<%= link_to
|
17
|
+
<%= link_to t('spree.my_account'), spree.account_path, class: "button" %>
|
18
18
|
<% end %>
|
19
19
|
<% end %>
|
20
20
|
</p>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
<% if @product.variants_and_option_values_for(current_pricing_options).any? %>
|
5
5
|
<div id="product-variants" class="columns five alpha">
|
6
|
-
<h6 class="product-section-title"><%=
|
6
|
+
<h6 class="product-section-title"><%= t('spree.variants') %></h6>
|
7
7
|
<ul>
|
8
8
|
<% @product.variants_and_option_values_for(current_pricing_options).each_with_index do |variant, index| %>
|
9
9
|
<li>
|
@@ -17,11 +17,11 @@
|
|
17
17
|
<% end %>
|
18
18
|
|
19
19
|
<% unless variant.can_supply? %>
|
20
|
-
<span class="out-of-stock"><%=
|
20
|
+
<span class="out-of-stock"><%= t('spree.out_of_stock') %></span>
|
21
21
|
<% end %>
|
22
22
|
<% end %>
|
23
23
|
</li>
|
24
|
-
<% end%>
|
24
|
+
<% end %>
|
25
25
|
</ul>
|
26
26
|
</div>
|
27
27
|
<% else %>
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<div data-hook="product_price" class="columns five <%= !@product.has_variants? ? 'alpha' : 'omega' %>">
|
33
33
|
|
34
34
|
<div id="product-price">
|
35
|
-
<h6 class="product-section-title"><%=
|
35
|
+
<h6 class="product-section-title"><%= t('spree.price') %></h6>
|
36
36
|
<div>
|
37
37
|
<span class="price selling" itemprop="price" content="<%= @product.price_for(current_pricing_options).to_d %>">
|
38
38
|
<%= display_price(@product) %>
|
@@ -44,21 +44,21 @@
|
|
44
44
|
<link itemprop="availability" href="http://schema.org/InStock" />
|
45
45
|
<% elsif @product.variants.empty? %>
|
46
46
|
<br />
|
47
|
-
<span class="out-of-stock"><%=
|
47
|
+
<span class="out-of-stock"><%= t('spree.out_of_stock') %></span>
|
48
48
|
<% end %>
|
49
49
|
</div>
|
50
50
|
|
51
51
|
<div class="add-to-cart">
|
52
52
|
<%= number_field_tag :quantity, 1, class: 'title', min: 1 %>
|
53
53
|
<%= button_tag class: 'large primary', id: 'add-to-cart-button', type: :submit do %>
|
54
|
-
<%=
|
54
|
+
<%= t('spree.add_to_cart') %>
|
55
55
|
<% end %>
|
56
56
|
</div>
|
57
57
|
</div>
|
58
58
|
<% else %>
|
59
59
|
<div id="product-price">
|
60
60
|
<br>
|
61
|
-
<div><span class="price selling" itemprop="price"><%=
|
61
|
+
<div><span class="price selling" itemprop="price"><%= t('spree.product_not_available_in_this_currency') %></span></div>
|
62
62
|
</div>
|
63
63
|
<% end %>
|
64
64
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% if defined?(image) && image %>
|
2
|
-
<%=
|
2
|
+
<%= render 'spree/shared/image', image: image, size: :product, itemprop: "image" %>
|
3
3
|
<% else %>
|
4
|
-
<%=
|
4
|
+
<%= render 'spree/shared/image', image: @product.display_image, size: :product, itemprop: "image" %>
|
5
5
|
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% unless @product_properties.empty? %>
|
2
|
-
<h6 class="product-section-title"><%=
|
2
|
+
<h6 class="product-section-title"><%= t('spree.properties')%></h6>
|
3
3
|
<table id="product-properties" class="table-display" data-hook>
|
4
4
|
<tbody>
|
5
5
|
<% @product_properties.each do |product_property| %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<% if !@product.taxons.blank? %>
|
2
2
|
<div id="taxon-crumbs" data-hook class="alpha columns five omega">
|
3
|
-
<h6 class="product-section-title"><%=
|
3
|
+
<h6 class="product-section-title"><%= t('spree.look_for_similar_items') %></h6>
|
4
4
|
|
5
5
|
<div data-hook="product_taxons">
|
6
6
|
<ul id="similar_items_by_taxon" data-hook>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
|
14
14
|
<div data-hook="search_results">
|
15
15
|
<% if @products.empty? %>
|
16
|
-
<h6 class="search-results-title"><%=
|
16
|
+
<h6 class="search-results-title"><%= t('spree.no_products_found') %></h6>
|
17
17
|
<% else %>
|
18
18
|
<%= render partial: 'spree/shared/products', locals: { products: @products, taxon: @taxon } %>
|
19
19
|
<% end %>
|
@@ -33,7 +33,7 @@
|
|
33
33
|
<h1 class="product-title" itemprop="name"><%= @product.name %></h1>
|
34
34
|
|
35
35
|
<div itemprop="description" data-hook="description">
|
36
|
-
<%= product_description(@product) rescue
|
36
|
+
<%= product_description(@product) rescue t('spree.product_has_no_description') %>
|
37
37
|
</div>
|
38
38
|
|
39
39
|
<div id="cart-form" data-hook="cart_form">
|
@@ -25,13 +25,13 @@
|
|
25
25
|
</div>
|
26
26
|
<% unless address.phone.blank? %>
|
27
27
|
<div class="tel">
|
28
|
-
<span class="type"><%=
|
28
|
+
<span class="type"><%= t('spree.phone') %></span>
|
29
29
|
<%= address.phone %>
|
30
30
|
</div>
|
31
31
|
<% end %>
|
32
32
|
<% unless address.alternative_phone.blank? %>
|
33
33
|
<div class="alternative-phone tel">
|
34
|
-
<span class="type"><%=
|
34
|
+
<span class="type"><%= t('spree.alternative_phone') %></span>
|
35
35
|
<%= address.alternative_phone %>
|
36
36
|
</div>
|
37
37
|
<% end %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<% filters = @taxon
|
1
|
+
<% filters = @taxon.applicable_filters %>
|
2
2
|
<% unless filters.empty? %>
|
3
3
|
<%= form_tag '', method: :get, id: 'sidebar_products_search' do %>
|
4
4
|
<%= hidden_field_tag 'per_page', params[:per_page] %>
|
@@ -22,6 +22,6 @@
|
|
22
22
|
</ul>
|
23
23
|
</div>
|
24
24
|
<% end %>
|
25
|
-
<%= submit_tag
|
25
|
+
<%= submit_tag t('spree.search'), name: nil %>
|
26
26
|
<% end %>
|
27
27
|
<% end %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<footer id="footer" class="sixteen columns" data-hook>
|
2
2
|
<div id="footer-left" class="columns alpha eight" data-hook>
|
3
|
-
<p><%=
|
3
|
+
<p><%= t 'spree.powered_by' %> <%= link_to 'Solidus', 'http://solidus.io/' %></p>
|
4
4
|
</div>
|
5
5
|
<div id="footer-right" class="columns omega eight" data-hook></div>
|
6
6
|
</footer>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<% size ||= :mini %>
|
2
|
+
<% itemprop ||= nil %>
|
3
|
+
|
4
|
+
<% if image && image.attachment? %>
|
5
|
+
<% if itemprop %>
|
6
|
+
<%= image_tag image.attachment(size), itemprop: itemprop %>
|
7
|
+
<% else %>
|
8
|
+
<%= image_tag image.attachment(size) %>
|
9
|
+
<% end %>
|
10
|
+
<% else %>
|
11
|
+
<span class="image-placeholder <%= size %>"></span>
|
12
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%# solidus_auth_devise or a custom auth system can replace this partial %>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<nav class="columns sixteen">
|
2
2
|
<ul id="main-nav-bar" class="inline" data-hook>
|
3
|
-
<li id="home-link" data-hook><%= link_to
|
3
|
+
<li id="home-link" data-hook><%= link_to t('spree.home'), spree.root_path %></li>
|
4
4
|
<li id="link-to-cart" data-hook>
|
5
5
|
<noscript>
|
6
|
-
<%= link_to
|
6
|
+
<%= link_to t('spree.cart'), spree.cart_path %>
|
7
7
|
</noscript>
|
8
8
|
|
9
9
|
</li>
|
@@ -3,23 +3,23 @@
|
|
3
3
|
<% if order.has_checkout_step?("address") %>
|
4
4
|
|
5
5
|
<div class="columns alpha four" data-hook="order-bill-address">
|
6
|
-
<h6><%=
|
6
|
+
<h6><%= t('spree.billing_address') %> <%= link_to "(#{t('spree.actions.edit')})", checkout_state_path(:address) unless order.completed? %></h6>
|
7
7
|
<%= render partial: 'spree/shared/address', locals: { address: order.bill_address } %>
|
8
8
|
</div>
|
9
9
|
|
10
10
|
<% if order.has_checkout_step?("delivery") %>
|
11
11
|
<div class="columns alpha four" data-hook="order-ship-address">
|
12
|
-
<h6><%=
|
12
|
+
<h6><%= t('spree.shipping_address') %> <%= link_to "(#{t('spree.actions.edit')})", checkout_state_path(:address) unless order.completed? %></h6>
|
13
13
|
<%= render partial: 'spree/shared/address', locals: { address: order.ship_address } %>
|
14
14
|
</div>
|
15
15
|
|
16
16
|
<div class="columns alpha four" data-hook="order-shipment">
|
17
|
-
<h6><%=
|
17
|
+
<h6><%= t('spree.shipments') %> <%= link_to "(#{t('spree.actions.edit')})", checkout_state_path(:delivery) unless order.completed? %></h6>
|
18
18
|
<div class="delivery">
|
19
19
|
<% order.shipments.each do |shipment| %>
|
20
20
|
<div>
|
21
21
|
<i class='fa fa-truck'></i>
|
22
|
-
<%=
|
22
|
+
<%= t('spree.shipment_details', stock_location: shipment.stock_location.name, shipping_method: shipment.selected_shipping_rate.name) %>
|
23
23
|
</div>
|
24
24
|
<% end %>
|
25
25
|
</div>
|
@@ -30,7 +30,7 @@
|
|
30
30
|
|
31
31
|
<% if order.has_checkout_step?("payment") %>
|
32
32
|
<div class="columns omega four">
|
33
|
-
<h6><%=
|
33
|
+
<h6><%= t('spree.payment_information') %> <%= link_to "(#{t('spree.actions.edit')})", checkout_state_path(:payment) unless order.completed? %></h6>
|
34
34
|
<div class="payment-info">
|
35
35
|
<% order.payments.valid.each do |payment| %>
|
36
36
|
<%= render payment %><br/>
|
@@ -51,10 +51,10 @@
|
|
51
51
|
|
52
52
|
<thead data-hook>
|
53
53
|
<tr data-hook="order_details_line_items_headers">
|
54
|
-
<th colspan="2"><%=
|
55
|
-
<th class="price"><%=
|
56
|
-
<th class="qty"><%=
|
57
|
-
<th class="total"><span><%=
|
54
|
+
<th colspan="2"><%= t('spree.item') %></th>
|
55
|
+
<th class="price"><%= t('spree.price') %></th>
|
56
|
+
<th class="qty"><%= t('spree.qty') %></th>
|
57
|
+
<th class="total"><span><%= t('spree.total') %></span></th>
|
58
58
|
</tr>
|
59
59
|
</thead>
|
60
60
|
|
@@ -62,10 +62,10 @@
|
|
62
62
|
<% order.line_items.each do |item| %>
|
63
63
|
<tr data-hook="order_details_line_item_row">
|
64
64
|
<td data-hook="order_item_image">
|
65
|
-
<% if item.variant.images.
|
66
|
-
<%= link_to
|
65
|
+
<% if item.variant.images.empty? %>
|
66
|
+
<%= link_to(render('spree/shared/image', image: item.variant.product.display_image, size: :small), item.variant.product) %>
|
67
67
|
<% else %>
|
68
|
-
<%= link_to
|
68
|
+
<%= link_to(render('spree/shared/image', image: item.variant.images.first, size: :small), item.variant.product) %>
|
69
69
|
<% end %>
|
70
70
|
</td>
|
71
71
|
<td data-hook="order_item_description">
|
@@ -81,24 +81,24 @@
|
|
81
81
|
</tbody>
|
82
82
|
<tfoot id="order-total" data-hook="order_details_total">
|
83
83
|
<tr class="total">
|
84
|
-
<td colspan="4"><b><%=
|
84
|
+
<td colspan="4"><b><%= t('spree.order_total') %>:</b></td>
|
85
85
|
<td class="total"><span id="order_total"><%= order.display_order_total_after_store_credit.to_html %></span></td>
|
86
86
|
</tr>
|
87
87
|
</tfoot>
|
88
88
|
|
89
89
|
<tfoot id="subtotal" data-hook="order_details_subtotal">
|
90
90
|
<tr class="total" id="subtotal-row">
|
91
|
-
<td colspan="4"><b><%=
|
91
|
+
<td colspan="4"><b><%= t('spree.subtotal') %>:</b></td>
|
92
92
|
<td class="total"><span><%= order.display_item_total.to_html %></span></td>
|
93
93
|
</tr>
|
94
94
|
</tfoot>
|
95
95
|
|
96
96
|
<% if order.line_item_adjustments.exists? %>
|
97
|
-
<% if order.
|
97
|
+
<% if order.line_item_adjustments.promotion.eligible.exists? %>
|
98
98
|
<tfoot id="price-adjustments" data-hook="order_details_price_adjustments">
|
99
|
-
<% order.
|
99
|
+
<% order.line_item_adjustments.promotion.eligible.group_by(&:label).each do |label, adjustments| %>
|
100
100
|
<tr class="total">
|
101
|
-
<td colspan="4"><%=
|
101
|
+
<td colspan="4"><%= t('spree.promotion') %>: <strong><%= label %></strong></td>
|
102
102
|
<td class="total"><span><%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency) %></span></td>
|
103
103
|
</tr>
|
104
104
|
<% end %>
|
@@ -109,7 +109,7 @@
|
|
109
109
|
<tfoot id='shipment-total'>
|
110
110
|
<% order.shipments.group_by { |s| s.selected_shipping_rate.name }.each do |name, shipments| %>
|
111
111
|
<tr class="total" data-hook='shipment-row'>
|
112
|
-
<td colspan="4"><%=
|
112
|
+
<td colspan="4"><%= t('spree.shipping') %>: <strong><%= name %></strong></td>
|
113
113
|
<td class="total"><span><%= Spree::Money.new(shipments.sum(&:total_before_tax), currency: order.currency).to_html %></span></td>
|
114
114
|
</tr>
|
115
115
|
<% end %>
|
@@ -119,7 +119,7 @@
|
|
119
119
|
<tfoot id="tax-adjustments" data-hook="order_details_tax_adjustments">
|
120
120
|
<% order.all_adjustments.tax.group_by(&:label).each do |label, adjustments| %>
|
121
121
|
<tr class="total">
|
122
|
-
<td colspan="4"><%=
|
122
|
+
<td colspan="4"><%= t('spree.tax') %>: <strong><%= label %></strong></td>
|
123
123
|
<td class="total"><span><%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency) %></span></td>
|
124
124
|
</tr>
|
125
125
|
<% end %>
|
@@ -129,7 +129,7 @@
|
|
129
129
|
<% if order.total_applicable_store_credit > 0.0 %>
|
130
130
|
<tfoot id="store-credit" data-hook="order_details_store_credit">
|
131
131
|
<tr class="total">
|
132
|
-
<td colspan='4'><%=
|
132
|
+
<td colspan='4'><%= t('spree.store_credit.store_credit') %>:</td>
|
133
133
|
<td class='total'><span><%= order.display_total_applicable_store_credit.to_html %></span></td>
|
134
134
|
</tr>
|
135
135
|
</tfoot>
|