spree_frontend 4.2.0.rc1 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spree/frontend.js +11 -1
- data/app/assets/javascripts/spree/frontend/account.js +1 -1
- data/app/assets/javascripts/spree/frontend/cart.js +24 -2
- data/app/assets/javascripts/spree/frontend/checkout/address.js +60 -43
- data/app/assets/javascripts/spree/frontend/checkout/shipment.js +15 -2
- data/app/assets/javascripts/spree/frontend/coupon_manager.js +2 -2
- data/app/assets/javascripts/spree/frontend/currency.js +11 -0
- data/app/assets/javascripts/spree/frontend/locale.js +11 -0
- data/app/assets/javascripts/spree/frontend/views/spree/product/related.js +2 -2
- data/app/assets/javascripts/spree/frontend/views/spree/products/cart_form.js +1 -1
- data/app/assets/stylesheets/spree/frontend/application.scss +0 -3
- data/app/assets/stylesheets/spree/frontend/functions.scss +1 -0
- data/app/assets/stylesheets/spree/frontend/variables/bootstrap-overrides.scss +2 -2
- data/app/assets/stylesheets/spree/frontend/variables/helper-variables.scss +1 -0
- data/app/assets/stylesheets/spree/frontend/variables/variables.scss +54 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/checkout/confirm.scss +27 -22
- data/app/assets/stylesheets/spree/frontend/views/spree/checkout/edit.scss +3 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/orders/show.scss +3 -0
- data/app/controllers/concerns/spree/checkout/address_book.rb +9 -7
- data/app/controllers/concerns/spree/locale_urls.rb +23 -0
- data/app/controllers/spree/addresses_controller.rb +1 -0
- data/app/controllers/spree/checkout_controller.rb +8 -8
- data/app/controllers/spree/currency_controller.rb +6 -10
- data/app/controllers/spree/home_controller.rb +5 -1
- data/app/controllers/spree/locale_controller.rb +23 -6
- data/app/controllers/spree/orders_controller.rb +2 -2
- data/app/controllers/spree/products_controller.rb +6 -5
- data/app/controllers/spree/store_controller.rb +7 -13
- data/app/controllers/spree/taxons_controller.rb +4 -3
- data/app/helpers/spree/addresses_helper.rb +19 -8
- data/app/helpers/spree/cache_helper.rb +7 -0
- data/app/helpers/spree/frontend_helper.rb +17 -25
- data/app/helpers/spree/navigation_helper.rb +6 -1
- data/app/helpers/spree/store_helper.rb +39 -0
- data/app/helpers/spree/taxons_helper.rb +1 -1
- data/app/models/spree/frontend_configuration.rb +2 -1
- data/app/views/kaminari/twitter-bootstrap-4/_first_page.html.erb +2 -2
- data/app/views/kaminari/twitter-bootstrap-4/_gap.html.erb +2 -2
- data/app/views/kaminari/twitter-bootstrap-4/_last_page.html.erb +2 -2
- data/app/views/kaminari/twitter-bootstrap-4/_next_page.html.erb +2 -2
- data/app/views/kaminari/twitter-bootstrap-4/_page.html.erb +2 -2
- data/app/views/kaminari/twitter-bootstrap-4/_paginator.html.erb +2 -2
- data/app/views/kaminari/twitter-bootstrap-4/_prev_page.html.erb +2 -2
- data/app/views/spree/address/_form.html.erb +15 -16
- data/app/views/spree/addresses/_form.html.erb +1 -1
- data/app/views/spree/addresses/edit.html.erb +2 -2
- data/app/views/spree/addresses/new.html.erb +2 -2
- data/app/views/spree/checkout/_address.html.erb +4 -6
- data/app/views/spree/checkout/_confirm.html.erb +1 -33
- data/app/views/spree/checkout/_credit_card.html.erb +2 -2
- data/app/views/spree/checkout/_delivery_informations.html.erb +43 -36
- data/app/views/spree/checkout/_summary.html.erb +3 -5
- data/app/views/spree/checkout/payment/_gateway.html.erb +1 -1
- data/app/views/spree/home/index.html.erb +21 -22
- data/app/views/spree/locale/index.html.erb +1 -0
- data/app/views/spree/orders/_coupon_code.html.erb +2 -3
- data/app/views/spree/orders/_line_item.html.erb +2 -2
- data/app/views/spree/orders/_line_item_data.html.erb +2 -2
- data/app/views/spree/orders/edit.html.erb +2 -3
- data/app/views/spree/orders/show.html.erb +1 -71
- data/app/views/spree/products/_cart_form.html.erb +4 -7
- data/app/views/spree/products/_color_option_type.html.erb +2 -3
- data/app/views/spree/products/_filters_desktop.html.erb +1 -2
- data/app/views/spree/products/_gallery.html.erb +4 -6
- data/app/views/spree/products/_gallery_modal.html.erb +3 -5
- data/app/views/spree/products/_option_type.html.erb +1 -2
- data/app/views/spree/products/_sort_mobile.html.erb +4 -4
- data/app/views/spree/products/related.html.erb +11 -5
- data/app/views/spree/products/show.html.erb +1 -5
- data/app/views/spree/shared/_carousel_4_products.html.erb +6 -12
- data/app/views/spree/shared/_color_select.html.erb +3 -3
- data/app/views/spree/shared/_currency_dropdown.html.erb +13 -0
- data/app/views/spree/shared/_delete_address_popup.html.erb +1 -2
- data/app/views/spree/shared/_error_messages.html.erb +2 -2
- data/app/views/spree/shared/_footer.html.erb +4 -4
- data/app/views/spree/shared/_head.html.erb +5 -1
- data/app/views/spree/shared/_header.html.erb +1 -1
- data/app/views/spree/shared/_internationalization_options.html.erb +31 -0
- data/app/views/spree/shared/_line_item.html.erb +2 -2
- data/app/views/spree/shared/_link_to_account.html.erb +5 -5
- data/app/views/spree/shared/_locale_dropdown.html.erb +13 -0
- data/app/views/spree/shared/_login.html.erb +1 -1
- data/app/views/spree/shared/_main_nav_bar.html.erb +1 -1
- data/app/views/spree/shared/_mobile_internationalization_options.html.erb +37 -0
- data/app/views/spree/shared/_mobile_navigation.html.erb +3 -6
- data/app/views/spree/shared/_nav_bar.html.erb +5 -5
- data/app/views/spree/shared/_no_product_available.html.erb +1 -1
- data/app/views/spree/shared/_option_values.html.erb +1 -1
- data/app/views/spree/shared/_order_details.html.erb +117 -174
- data/app/views/spree/shared/_payment.html.erb +2 -2
- data/app/views/spree/shared/_payment_sources.html.erb +2 -2
- data/app/views/spree/shared/_product_added_modal.html.erb +1 -1
- data/app/views/spree/shared/_search.html.erb +1 -2
- data/app/views/spree/shared/_translations.html.erb +6 -6
- data/app/views/spree/shared/carousel/_single.html.erb +6 -11
- data/app/views/spree/shared/carousel/_thumbnails.html.erb +5 -11
- data/app/views/spree/users/_address.html.erb +1 -1
- data/app/views/spree/users/_address_controls.html.erb +1 -2
- data/app/views/spree/users/show.html.erb +4 -4
- data/config/initializers/canonical_rails.rb +1 -1
- data/config/routes.rb +26 -30
- data/lib/generators/spree/frontend/copy_storefront/copy_storefront_generator.rb +1 -7
- data/lib/generators/spree/frontend/install/install_generator.rb +34 -0
- data/lib/generators/spree/frontend/install/templates/config/initializers/spree_storefront.rb +1 -0
- data/lib/generators/spree/frontend/install/templates/config/spree_storefront.yml +99 -0
- data/spree_frontend.gemspec +2 -2
- metadata +27 -19
- data/app/views/spree/products/_vendor_info.html.erb +0 -13
- data/app/views/spree/shared/_change_store.html.erb +0 -25
- data/app/views/spree/shared/_mobile_change_store.html.erb +0 -30
- data/app/views/spree/shared/forbidden.html.erb +0 -0
- data/app/views/spree/shared/unauthorized.html.erb +0 -0
@@ -25,7 +25,7 @@
|
|
25
25
|
</div>
|
26
26
|
<% end %>
|
27
27
|
|
28
|
-
<%= f.submit Spree.t(:
|
28
|
+
<%= f.submit Spree.t(:login), class: 'btn btn-primary btn-block spree-btn mt-2' %>
|
29
29
|
<% end %>
|
30
30
|
|
31
31
|
<% if spree.respond_to?(:recover_password_path) %>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<% if (defined?(should_render_store_chooser?) && should_render_store_chooser?) || (defined?(should_render_internationalization_dropdown?) && should_render_internationalization_dropdown?) %>
|
2
|
+
<% link_title = "#{Spree.t(:choose_currency)} / #{Spree.t('i18n.language')}" %>
|
3
|
+
|
4
|
+
<li class="d-flex justify-content-between align-items-center mobile-navigation-list-item">
|
5
|
+
<span class="w-75"><%= link_title %></span>
|
6
|
+
<a class="w-25 text-right mobile-navigation-category-link" data-category="internationalization" href="#" aria-label="<%= link_title %>">
|
7
|
+
<%= icon(name: 'arrow-right',
|
8
|
+
classes: 'd-sm-none spree-icon-arrow spree-icon-arrow-right',
|
9
|
+
width: 16,
|
10
|
+
height: 16) %>
|
11
|
+
<%= icon(name: 'arrow-right',
|
12
|
+
classes: 'd-none d-sm-inline spree-icon-arrow spree-icon-arrow-right',
|
13
|
+
width: 14,
|
14
|
+
height: 27) %>
|
15
|
+
</a>
|
16
|
+
|
17
|
+
<ul class="list-unstyled position-absolute mobile-navigation-sublist" data-category="internationalization">
|
18
|
+
<li class="text-center font-weight-bold mobile-navigation-sublist-header">
|
19
|
+
<%= Spree.t(:internationalization) %>
|
20
|
+
</li>
|
21
|
+
<% if (defined?(should_render_store_chooser?) && should_render_store_chooser?) %>
|
22
|
+
<% stores.each do |store| %>
|
23
|
+
<li class="d-flex justify-content-between align-items-center mobile-navigation-list-item">
|
24
|
+
<%= country_flag_icon(store_country_iso(store)) %>
|
25
|
+
<%= store_link(store, class: "dropdown-item text-uppercase d-flex #{'font-weight-bold' if current_store == store}") %>
|
26
|
+
</li>
|
27
|
+
<% end %>
|
28
|
+
<% else %>
|
29
|
+
<div class="mt-4 pt-4">
|
30
|
+
<%= render 'spree/shared/locale_dropdown' %>
|
31
|
+
<div class="dropdown-divider mt-4 pb-4"></div>
|
32
|
+
<%= render 'spree/shared/currency_dropdown' %>
|
33
|
+
</div>
|
34
|
+
<% end %>
|
35
|
+
</ul>
|
36
|
+
</li>
|
37
|
+
<% end %>
|
@@ -7,11 +7,8 @@
|
|
7
7
|
width: 26,
|
8
8
|
height: 26) %>
|
9
9
|
</button>
|
10
|
-
<figure class="logo header-spree-fluid-logo" data-hook>
|
11
|
-
<%= logo %>
|
12
|
-
</figure>
|
13
10
|
<div id="top-nav-bar-mobile" class="m-0 p-0 header-spree-fluid-secondary-navigation" data-hook>
|
14
|
-
<button id="mobile-navigation-close-button" aria-label="<%= Spree.t(
|
11
|
+
<button id="mobile-navigation-close-button" aria-label="<%= Spree.t(:close) %>">
|
15
12
|
<%= icon(name: 'close',
|
16
13
|
classes: 'd-inline',
|
17
14
|
width: 26,
|
@@ -25,7 +22,7 @@
|
|
25
22
|
<li class="d-flex justify-content-between align-items-center mobile-navigation-list-item">
|
26
23
|
<%= link_to root[:title], root[:url], class: 'w-75' %>
|
27
24
|
<% if root[:items].present? %>
|
28
|
-
<a class="w-25 text-right mobile-navigation-category-link" data-category="<%= root[:title].parameterize %>" href="#" aria-label="<%= Spree.t('go_to_category')%>">
|
25
|
+
<a class="w-25 text-right mobile-navigation-category-link" data-category="<%= root[:title].parameterize %>" href="#" aria-label="<%= Spree.t('go_to_category') %>">
|
29
26
|
<%= icon(name: 'arrow-right',
|
30
27
|
classes: 'd-inline spree-icon-arrow spree-icon-arrow-right',
|
31
28
|
width: 14,
|
@@ -44,7 +41,7 @@
|
|
44
41
|
<% end %>
|
45
42
|
</li>
|
46
43
|
<% end %>
|
47
|
-
<%= render partial: 'spree/shared/
|
44
|
+
<%= render partial: 'spree/shared/mobile_internationalization_options' %>
|
48
45
|
</ul>
|
49
46
|
</div>
|
50
47
|
<% end %>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<ul id="nav-bar" class="nav align-items-center d-flex flex-nowrap justify-content-end navbar-right">
|
2
2
|
<li>
|
3
3
|
<div class="navbar-right-search-menu">
|
4
|
-
<button type="button" class="navbar-right-dropdown-toggle search-icons" aria-label="<%= Spree.t('nav_bar.show_search')%>">
|
4
|
+
<button type="button" class="navbar-right-dropdown-toggle search-icons" aria-label="<%= Spree.t('nav_bar.show_search') %>">
|
5
5
|
<%= icon(name: 'magnifying-glass',
|
6
6
|
classes: 'd-inline-block',
|
7
7
|
width: 36,
|
8
|
-
height: 36)
|
8
|
+
height: 36) %>
|
9
9
|
</button>
|
10
10
|
|
11
11
|
<div id="search-dropdown" class="p-0 px-md-4 py-md-2 w-100 shadow navbar-right-search-menu-dropdown hide-on-esc">
|
@@ -16,11 +16,11 @@
|
|
16
16
|
<% if defined?(spree.account_link_path) %>
|
17
17
|
<li>
|
18
18
|
<div class="dropdown navbar-right-dropdown">
|
19
|
-
<button id="account-button" type="button" data-toggle="dropdown" class="navbar-right-dropdown-toggle account-icon" aria-label="<%= Spree.t('nav_bar.show_user_menu')%>">
|
19
|
+
<button id="account-button" type="button" data-toggle="dropdown" class="navbar-right-dropdown-toggle account-icon" aria-label="<%= Spree.t('nav_bar.show_user_menu') %>">
|
20
20
|
<%= icon(name: 'person',
|
21
21
|
classes: 'd-inline-block',
|
22
22
|
width: 41.4,
|
23
|
-
height: 36)
|
23
|
+
height: 36) %>
|
24
24
|
</button>
|
25
25
|
|
26
26
|
<div id="link-to-account" class="dropdown-menu dropdown-menu-right text-right">
|
@@ -31,5 +31,5 @@
|
|
31
31
|
<li id="link-to-cart">
|
32
32
|
<%= render 'spree/shared/cart', class: 'd-inline-block cart-icon', size: 36, item_count: 0 %>
|
33
33
|
</li>
|
34
|
-
<%= render partial: 'spree/shared/
|
34
|
+
<%= render partial: 'spree/shared/internationalization_options' %>
|
35
35
|
</ul>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="p-0 justify-content-around mx-auto no-product-available">
|
2
|
-
<div id=
|
2
|
+
<div id="no-product-available-close-button" class="d-flex no-product-available-icon">
|
3
3
|
<%= inline_svg_tag "close.svg", class: "w-100 h-100" %>
|
4
4
|
</div>
|
5
5
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
<% option_value_param = (selected_option_values.include?(id) ? selected_option_values - [id] : selected_option_values + [id]).join(',') %>
|
8
8
|
<%= link_to permitted_params.merge(ot_downcase_name => option_value_param, menu_open: 1), data: { params: permitted_params.merge(ot_downcase_name => option_value_param, menu_open: 1), id: id, filter_name: ot_downcase_name, multiselect: true } do %>
|
9
|
-
<% if
|
9
|
+
<% if color_option_type_name.present? && color_option_type_name.downcase == ot_downcase_name %>
|
10
10
|
|
11
11
|
<span class="d-inline-block mb-1">
|
12
12
|
<%= render partial: 'spree/shared/color_select', locals: {
|
@@ -1,184 +1,127 @@
|
|
1
|
-
|
2
|
-
<div class="
|
3
|
-
|
4
|
-
|
5
|
-
<h4 class="h5">
|
6
|
-
<%= Spree.t(:billing_address) %> <%= link_to "(#{Spree.t(:edit)})", spree.checkout_state_path(:address) unless order.completed? %>
|
7
|
-
</h4>
|
8
|
-
<%= render 'spree/shared/address', address: order.bill_address %>
|
1
|
+
<div class='checkout-confirm-order-details w-100 d-flex flex-wrap' data-hook>
|
2
|
+
<div class="checkout-confirm-delivery-informations text-left mt-3">
|
3
|
+
<div class="d-lg-none checkout-confirm-delivery-informations-header">
|
4
|
+
<%= Spree.t(:delivery_information) %>
|
9
5
|
</div>
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
6
|
+
<dl>
|
7
|
+
<% if order.has_step?("address") %>
|
8
|
+
<div data-hook="order-ship-address">
|
9
|
+
<dt class="text-uppercase">
|
10
|
+
<%= Spree.t(:shipping_address) %>
|
11
|
+
<%= checkout_edit_link %>
|
12
|
+
</dt>
|
13
|
+
<%= render 'spree/shared/address', address: order.ship_address %>
|
14
|
+
</div>
|
15
|
+
<div data-hook="order-bill-address">
|
16
|
+
<dt class="text-uppercase">
|
17
|
+
<%= Spree.t(:billing_address) %>
|
18
|
+
<%= checkout_edit_link %>
|
19
|
+
</dt>
|
20
|
+
<%= render 'spree/shared/address', address: order.bill_address %>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
23
|
+
<% if order.has_step?("delivery") %>
|
24
|
+
<div data-hook="order-shipment">
|
25
|
+
<dt class="text-uppercase">
|
26
|
+
<%= Spree.t(:shipping) %>
|
27
|
+
<%= checkout_edit_link('delivery') %>
|
28
|
+
</dt>
|
29
|
+
<% @order.shipments.valid.each do |shipment| %>
|
30
|
+
<dd><%= shipment.shipping_method&.name %> </dd>
|
28
31
|
<% end %>
|
32
|
+
<%= render 'spree/shared/shipment_tracking', order: order if order.shipped? %>
|
29
33
|
</div>
|
30
|
-
<%= render 'spree/shared/shipment_tracking', order: order if order.shipped? %>
|
31
|
-
</div>
|
32
|
-
<% end %>
|
33
|
-
<% end %>
|
34
|
-
|
35
|
-
<% if order.has_step?("payment") %>
|
36
|
-
<div class="col-md-3 col-6 mb-3" data-hook="order-payment">
|
37
|
-
<h4 class="h5">
|
38
|
-
<%= Spree.t(:payment_information) %> <%= link_to "(#{Spree.t(:edit)})", spree.checkout_state_path(:payment) unless order.completed? %>
|
39
|
-
</h4>
|
40
|
-
<div class="payment-info">
|
41
|
-
<%= render collection: order.payments.valid, partial: 'spree/shared/payment' %>
|
42
|
-
</div>
|
43
|
-
</div>
|
44
|
-
<% end %>
|
45
|
-
</div>
|
46
|
-
|
47
|
-
<div class="table-responsive">
|
48
|
-
<table id='line-items' class="table mt-4" data-hook="order_details">
|
49
|
-
<col width="15%" valign="middle" halign="center">
|
50
|
-
<col width="70%" valign="middle">
|
51
|
-
<col width="5%" valign="middle" halign="center">
|
52
|
-
<col width="5%" valign="middle" halign="center">
|
53
|
-
<col width="5%" valign="middle" halign="center">
|
54
|
-
|
55
|
-
<thead data-hook>
|
56
|
-
<tr class="active" data-hook="order_details_line_items_headers">
|
57
|
-
<th colspan="2"><%= Spree.t(:item) %></th>
|
58
|
-
<th class="price"><%= Spree.t(:price) %></th>
|
59
|
-
<th class="qty"><%= Spree.t(:qty) %></th>
|
60
|
-
<th class="total"><span><%= Spree.t(:total) %></span></th>
|
61
|
-
</tr>
|
62
|
-
</thead>
|
63
|
-
|
64
|
-
<tbody data-hook>
|
65
|
-
<% order.line_items.each do |item| %>
|
66
|
-
<tr data-hook="order_details_line_item_row">
|
67
|
-
<td data-hook="order_item_image">
|
68
|
-
<%= link_to small_image(line_item.variant), line_item.product %>
|
69
|
-
</td>
|
70
|
-
<td data-hook="order_item_description">
|
71
|
-
<h4><%= item.name %></h4>
|
72
|
-
<p>
|
73
|
-
<%= truncate(item.description, length: 100) %>
|
74
|
-
<%= "(" + item.variant.options_text + ")" unless item.variant.option_values.empty? %>
|
75
|
-
</p>
|
76
|
-
</td>
|
77
|
-
<td data-hook="order_item_price" class="lead text-primary price">
|
78
|
-
<span><%= item.single_money.to_html %></span>
|
79
|
-
</td>
|
80
|
-
<td data-hook="order_item_qty" class="order-qty">
|
81
|
-
<%= item.quantity %>
|
82
|
-
</td>
|
83
|
-
<td data-hook="order_item_total" class="lead text-primary total">
|
84
|
-
<span><%= item.display_amount.to_html %></span>
|
85
|
-
</td>
|
86
|
-
</tr>
|
87
34
|
<% end %>
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
<tr class="total" id="subtotal-row">
|
104
|
-
<td colspan="4">
|
105
|
-
<strong><%= Spree.t(:subtotal) %>:</strong>
|
106
|
-
</td>
|
107
|
-
<td class="total">
|
108
|
-
<span><%= order.display_item_total.to_html %></span>
|
109
|
-
</td>
|
110
|
-
</tr>
|
111
|
-
</tfoot>
|
112
|
-
|
113
|
-
<% if order.line_item_adjustments.exists? %>
|
114
|
-
<% if order.line_item_adjustments.promotion.eligible.exists? %>
|
115
|
-
<tfoot id="price-adjustments" data-hook="order_details_price_adjustments">
|
116
|
-
<% order.line_item_adjustments.promotion.eligible.group_by(&:label).each do |label, adjustments| %>
|
117
|
-
<tr class="total">
|
118
|
-
<td colspan="4">
|
119
|
-
<%= Spree.t(:promotion) %>: <strong><%= label %></strong>
|
120
|
-
</td>
|
121
|
-
<td class="total">
|
122
|
-
<span>
|
123
|
-
<%= Spree::Money.new(
|
124
|
-
adjustments.sum(&:amount), currency: order.currency
|
125
|
-
) %>
|
126
|
-
</span>
|
127
|
-
</td>
|
128
|
-
</tr>
|
129
|
-
<% end %>
|
130
|
-
</tfoot>
|
35
|
+
<% if order.has_step?("payment") %>
|
36
|
+
<div data-hook="order-payment">
|
37
|
+
<dt class="text-uppercase">
|
38
|
+
<%= Spree.t(:payment) %>
|
39
|
+
<%= checkout_edit_link('payment') %>
|
40
|
+
</dt>
|
41
|
+
<dd>
|
42
|
+
<%= render collection: @order.payments.valid, partial: 'spree/shared/payment' %>
|
43
|
+
</dd>
|
44
|
+
<dd>
|
45
|
+
<% if !@order.complete? && @order.using_store_credit? %>
|
46
|
+
<%= button_tag Spree.t('store_credit.remove'), name: 'remove_store_credit', class: 'continue btn' %>
|
47
|
+
<% end %>
|
48
|
+
</dd>
|
49
|
+
</div>
|
131
50
|
<% end %>
|
132
|
-
|
51
|
+
</dl>
|
52
|
+
</div>
|
133
53
|
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
54
|
+
<div class="checkout-confirm-order-details-line-items d-flex flex-column mt-5 mr-md-4">
|
55
|
+
<div class="checkout-confirm-order-details-line-items-header d-none d-sm-block d-lg-none align-self-start mb-3">
|
56
|
+
<%= Spree.t(:products) %>
|
57
|
+
</div>
|
58
|
+
<div class="d-table" data-hook="order_details">
|
59
|
+
<div class="d-none d-lg-table-row text-secondary text-uppercase" data-hook="order_details_line_items_headers">
|
60
|
+
<p class="d-table-cell pb-1">
|
61
|
+
<%= Spree.t(:product) %>
|
62
|
+
</p>
|
63
|
+
<p class="d-table-cell pb-1">
|
64
|
+
<%= Spree.t(:price) %>
|
65
|
+
</p>
|
66
|
+
<p class="d-table-cell pb-1">
|
67
|
+
<%= Spree.t(:quantity) %>
|
68
|
+
</p>
|
69
|
+
<p class="d-table-cell pb-1">
|
70
|
+
<%= Spree.t(:total) %>
|
71
|
+
</p>
|
72
|
+
</div>
|
73
|
+
<% @order.line_items.each do |item| %>
|
74
|
+
<div class="checkout-confirm-order-details-line-items-line-item w-100 d-table-row" data-hook="order_details_line_item_row">
|
75
|
+
<div class="checkout-confirm-order-details-line-items-line-item-name d-table-cell align-middle py-3 py-sm-4">
|
76
|
+
<div class="d-flex align-items-lg-center">
|
77
|
+
<div class="checkout-confirm-order-details-line-items-line-item-name-image" data-hook="order_item_image">
|
78
|
+
<%= link_to product_image(item.variant), spree.product_path(item.product) %>
|
79
|
+
</div>
|
80
|
+
<div class="d-flex flex-column mt-2 mt-lg-0" data-hook="order_item_description">
|
81
|
+
<div data-hook="order_item_name">
|
82
|
+
<%= link_to item.name, spree.product_path(item.product), class: 'checkout-confirm-order-details-line-items-line-item-name-link' %>
|
83
|
+
</div>
|
84
|
+
<% unless item.variant.is_master? %>
|
85
|
+
<ul class="checkout-confirm-order-details-line-items-line-item-name-options text-uppercase list-unstyled mb-0">
|
86
|
+
<% item.variant.option_values.sort { |ov| ov.option_type.position }.each do |ov| %>
|
87
|
+
<li>
|
88
|
+
<% # TODO: rework option values so options_text method can be used here %>
|
89
|
+
<%= "#{ov.option_type.presentation}: #{ov.name.titleize}" %>
|
90
|
+
</li>
|
91
|
+
<% end %>
|
92
|
+
</ul>
|
93
|
+
<% end %>
|
94
|
+
<div class="d-lg-none" data-hook="order_item_price">
|
95
|
+
<div class="font-weight-bold"><%= item.single_money.to_html %></div>
|
96
|
+
</div>
|
97
|
+
<div class="d-lg-none" data-hook="order_item_qty">
|
98
|
+
<span><%= Spree.t(:quantity) %>:</span>
|
99
|
+
<span class="font-weight-bold"><%= item.quantity %></span>
|
100
|
+
</div>
|
101
|
+
</div>
|
102
|
+
</div>
|
103
|
+
</div>
|
104
|
+
<div class="checkout-confirm-order-details-line-items-line-item-price d-none d-lg-table-cell align-middle py-4" data-hook="order_item_price">
|
105
|
+
<div><%= item.single_money.to_html %></div>
|
106
|
+
</div>
|
107
|
+
<div class="checkout-confirm-order-details-line-items-line-item-quantity d-none d-lg-table-cell align-middle py-4" data-hook="order_item_qty">
|
108
|
+
<span class="checkout-confirm-order-details-line-items-line-item-quantity-val d-lg-block"><%= item.quantity %></span>
|
109
|
+
</div>
|
110
|
+
<div class="checkout-confirm-order-details-line-items-line-item-total d-none d-lg-table-cell align-middle py-4" data-hook="order_item_total">
|
111
|
+
<div><%= item.display_total.to_s %></div>
|
112
|
+
</div>
|
113
|
+
</div>
|
148
114
|
<% end %>
|
149
|
-
</
|
115
|
+
</div>
|
116
|
+
</div>
|
150
117
|
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
<td class="total">
|
159
|
-
<span>
|
160
|
-
<%= Spree::Money.new(
|
161
|
-
adjustments.sum(&:amount), currency: order.currency
|
162
|
-
) %>
|
163
|
-
</span>
|
164
|
-
</td>
|
165
|
-
</tr>
|
166
|
-
<% end %>
|
167
|
-
</tfoot>
|
118
|
+
<div class="mt-5" id="checkout-summary" data-hook="checkout_summary_box">
|
119
|
+
<%= render partial: 'spree/checkout/summary', locals: { order: @order } %>
|
120
|
+
<% unless @order.complete? %>
|
121
|
+
<div data-hook="buttons">
|
122
|
+
<% submit_label_key = @order.confirm? ? :place_order : :save_and_continue %>
|
123
|
+
<%= submit_tag Spree.t(submit_label_key), class: 'btn btn-primary text-uppercase font-weight-bold w-100 checkout-content-save-continue-button' %>
|
124
|
+
</div>
|
168
125
|
<% end %>
|
169
|
-
|
170
|
-
<tfoot id="order-charges" data-hook="order_details_adjustments">
|
171
|
-
<% order.adjustments.eligible.each do |adjustment| %>
|
172
|
-
<% next if (adjustment.source_type == 'Spree::TaxRate') and (adjustment.amount == 0) %>
|
173
|
-
<tr class="total">
|
174
|
-
<td colspan="4" align="right">
|
175
|
-
<strong><%= adjustment.label %></strong>
|
176
|
-
</td>
|
177
|
-
<td class="total">
|
178
|
-
<span><%= adjustment.display_amount.to_html %></span>
|
179
|
-
</td>
|
180
|
-
</tr>
|
181
|
-
<% end %>
|
182
|
-
</tfoot>
|
183
|
-
</table>
|
126
|
+
</div>
|
184
127
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<%= Spree.t(:ending_in) %> <%= source.last_digits %>
|
7
7
|
<% end %>
|
8
8
|
</span>
|
9
|
-
<br
|
9
|
+
<br>
|
10
10
|
<span class="full-name"><%= source.name %></span>
|
11
11
|
<% else %>
|
12
12
|
<%= content_tag(:span, payment.payment_method.name) %>
|
@@ -14,4 +14,4 @@
|
|
14
14
|
|
15
15
|
<span class="payment-amount">(<%= payment.display_amount %>)</span>
|
16
16
|
|
17
|
-
<br
|
17
|
+
<br>
|