spree_frontend 3.7.13 → 4.0.0.beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/app/assets/javascripts/spree/frontend.js +4 -1
- data/app/assets/javascripts/spree/frontend/checkout/address.js +42 -14
- data/app/assets/javascripts/spree/frontend/checkout/address_book.js +56 -0
- data/app/assets/javascripts/spree/frontend/product.js +54 -39
- data/app/assets/stylesheets/spree/frontend.css +1 -0
- data/app/assets/stylesheets/spree/frontend/_variables.scss +1 -1
- data/app/assets/stylesheets/spree/frontend/address_book.scss +8 -0
- data/app/assets/stylesheets/spree/frontend/frontend_bootstrap.css.scss +13 -35
- data/app/controllers/concerns/spree/checkout/address_book.rb +53 -0
- data/app/controllers/spree/addresses_controller.rb +72 -0
- data/app/controllers/spree/checkout_controller.rb +2 -0
- data/app/controllers/spree/orders_controller.rb +0 -55
- data/app/controllers/spree/products_controller.rb +5 -1
- data/app/controllers/spree/store_controller.rb +1 -1
- data/app/helpers/spree/addresses_helper.rb +36 -0
- data/app/helpers/spree/frontend_helper.rb +16 -15
- data/app/views/kaminari/{twitter-bootstrap-3 → twitter-bootstrap-4}/_first_page.html.erb +2 -2
- data/app/views/kaminari/{twitter-bootstrap-3 → twitter-bootstrap-4}/_gap.html.erb +5 -1
- data/app/views/kaminari/{twitter-bootstrap-3 → twitter-bootstrap-4}/_last_page.html.erb +2 -2
- data/app/views/kaminari/{twitter-bootstrap-3 → twitter-bootstrap-4}/_next_page.html.erb +2 -2
- data/app/views/kaminari/{twitter-bootstrap-3 → twitter-bootstrap-4}/_page.html.erb +8 -2
- data/app/views/kaminari/{twitter-bootstrap-3 → twitter-bootstrap-4}/_paginator.html.erb +1 -1
- data/app/views/kaminari/{twitter-bootstrap-3 → twitter-bootstrap-4}/_prev_page.html.erb +2 -2
- data/app/views/spree/address/_form.html.erb +27 -24
- data/app/views/spree/addresses/_form.html.erb +18 -0
- data/app/views/spree/addresses/destroy.js.erb +2 -0
- data/app/views/spree/addresses/edit.html.erb +23 -0
- data/app/views/spree/addresses/new.html.erb +23 -0
- data/app/views/spree/checkout/_address.html.erb +61 -37
- data/app/views/spree/checkout/_confirm.html.erb +12 -10
- data/app/views/spree/checkout/_delivery.html.erb +27 -15
- data/app/views/spree/checkout/_payment.html.erb +14 -9
- data/app/views/spree/checkout/_summary.html.erb +59 -57
- data/app/views/spree/checkout/edit.html.erb +6 -6
- data/app/views/spree/checkout/payment/_gateway.html.erb +43 -35
- data/app/views/spree/layouts/spree_application.html.erb +5 -2
- data/app/views/spree/orders/_form.html.erb +38 -25
- data/app/views/spree/orders/edit.html.erb +28 -22
- data/app/views/spree/orders/show.html.erb +2 -1
- data/app/views/spree/products/_cart_form.html.erb +28 -26
- data/app/views/spree/products/_product.html.erb +7 -8
- data/app/views/spree/products/_promotions.html.erb +13 -11
- data/app/views/spree/products/_properties.html.erb +10 -3
- data/app/views/spree/products/_thumbnails.html.erb +5 -7
- data/app/views/spree/products/show.html.erb +8 -8
- data/app/views/spree/shared/_filters.html.erb +29 -9
- data/app/views/spree/shared/_header.html.erb +2 -2
- data/app/views/spree/shared/_login_bar.html.erb +9 -3
- data/app/views/spree/shared/_main_nav_bar.html.erb +15 -15
- data/app/views/spree/shared/_nav_bar.html.erb +2 -2
- data/app/views/spree/shared/_order_details.html.erb +143 -89
- data/app/views/spree/shared/_products.html.erb +2 -2
- data/app/views/spree/shared/_search.html.erb +19 -12
- data/app/views/spree/shared/_sidebar.html.erb +1 -1
- data/app/views/spree/shared/_taxonomies.html.erb +7 -3
- data/config/routes.rb +2 -0
- data/lib/spree/frontend.rb +3 -3
- data/lib/spree/frontend/engine.rb +4 -0
- data/spree_frontend.gemspec +4 -3
- metadata +48 -25
@@ -1,19 +1,17 @@
|
|
1
1
|
<%# no need for thumbnails unless there is more than one image %>
|
2
2
|
<% if (@product.images + @product.variant_images).uniq.size > 1 %>
|
3
|
-
<ul id="product-thumbnails" class="thumbnails
|
3
|
+
<ul id="product-thumbnails" class="thumbnails d-flex w-100 pl-0 my-4" data-hook>
|
4
4
|
<% @product.images.each do |i| %>
|
5
|
-
<li class='tmb-all tmb-<%= i.viewable.id %>'>
|
6
|
-
|
7
|
-
<%= link_to(img_tag, main_app.url_for(i.url(:product))) %>
|
5
|
+
<li class='tmb-all mr-2 tmb-<%= i.viewable.id %>'>
|
6
|
+
<%= link_to(image_tag(main_app.url_for(i.url(:mini)), class: "img-thumbnail d-inline-block"), main_app.url_for(i.url(:product))) %>
|
8
7
|
</li>
|
9
8
|
<% end %>
|
10
9
|
|
11
10
|
<% if @product.has_variants? %>
|
12
11
|
<% @product.variant_images.each do |i| %>
|
13
12
|
<% next if @product.images.include?(i) %>
|
14
|
-
<li class='vtmb tmb-<%= i.viewable.id %>'>
|
15
|
-
|
16
|
-
<%= link_to(img_tag, main_app.url_for(i.url(:product))) %>
|
13
|
+
<li class='vtmb mr-2 tmb-<%= i.viewable.id %>'>
|
14
|
+
<%= link_to(image_tag(main_app.url_for(i.url(:mini)), class: "img-thumbnail"), main_app.url_for(i.url(:product))) %>
|
17
15
|
</li>
|
18
16
|
<% end %>
|
19
17
|
<% end %>
|
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
<% cache cache_key_for_product do %>
|
4
4
|
<div data-hook="product_show" class="row" itemscope itemtype="https://schema.org/Product">
|
5
|
-
<div class="col-
|
5
|
+
<div class="col-lg-4 col-md-5" data-hook="product_left_part">
|
6
6
|
<div data-hook="product_left_part_wrap">
|
7
7
|
<div id="product-images" data-hook="product_images">
|
8
|
-
<div id="main-image" class="
|
9
|
-
<div class="
|
8
|
+
<div id="main-image" class="card " data-hook>
|
9
|
+
<div class="card-body text-center">
|
10
10
|
<%= product_image(@product, itemprop: "image") %>
|
11
11
|
</div>
|
12
12
|
</div>
|
@@ -25,13 +25,13 @@
|
|
25
25
|
</div>
|
26
26
|
</div>
|
27
27
|
|
28
|
-
<div class="col-
|
28
|
+
<div class="col-lg-8 col-md-7" data-hook="product_right_part">
|
29
29
|
<div data-hook="product_right_part_wrap">
|
30
30
|
<div id="product-description" data-hook="product_description">
|
31
|
-
<h1 class="product-title" itemprop="name"><%= @product.name %></h1>
|
31
|
+
<h1 class="product-title mt-2" itemprop="name"><%= @product.name %></h1>
|
32
32
|
|
33
|
-
<div
|
34
|
-
<%= product_description(@product) %>
|
33
|
+
<div itemprop="description" data-hook="description">
|
34
|
+
<%= sanitize product_description(@product) %>
|
35
35
|
</div>
|
36
36
|
|
37
37
|
<div id="cart-form" data-hook="cart_form">
|
@@ -39,7 +39,7 @@
|
|
39
39
|
</div>
|
40
40
|
</div>
|
41
41
|
|
42
|
-
<div id="taxon-crumbs" class="
|
42
|
+
<div id="taxon-crumbs" class="mt-4" data-hook="product_taxons">
|
43
43
|
<%= render partial: 'taxons' %>
|
44
44
|
</div>
|
45
45
|
</div>
|
@@ -6,23 +6,43 @@
|
|
6
6
|
<% filters.each do |filter| %>
|
7
7
|
<% labels = filter[:labels] || filter[:conds].map {|m,c| [m,m]} %>
|
8
8
|
<% next if labels.empty? %>
|
9
|
-
<div
|
10
|
-
|
9
|
+
<div
|
10
|
+
class="navigation mt-4"
|
11
|
+
data-hook="navigation"
|
12
|
+
aria-labelledby="products_search_wrapper"
|
13
|
+
role="group">
|
14
|
+
|
15
|
+
<h4 class="filter-title mt-0 h5" id="products_search_wrapper">
|
16
|
+
<%= filter[:name] %>
|
17
|
+
</h4>
|
18
|
+
|
11
19
|
<ul class="list-group">
|
12
20
|
<% labels.each do |nm,val| %>
|
13
21
|
<% label = "#{filter[:name]}_#{nm}".gsub(/\s+/,'_') %>
|
14
22
|
<li class="list-group-item">
|
15
|
-
<
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
23
|
+
<div class="form-check">
|
24
|
+
<input
|
25
|
+
aria-labelledby="products_search_wrapper"
|
26
|
+
type="checkbox"
|
27
|
+
class="form-check-input"
|
28
|
+
id="<%= label %>"
|
29
|
+
name="search[<%= filter[:scope].to_s %>][]"
|
30
|
+
value="<%= val %>"
|
31
|
+
<%= params[:search].present? &&
|
32
|
+
params[:search][filter[:scope]] &&
|
33
|
+
params[:search][filter[:scope]].include?(val.to_s) ?
|
34
|
+
"checked" :
|
35
|
+
"" %> />
|
36
|
+
<label class="nowrap form-check-label" for="<%= label %>">
|
37
|
+
<%= nm %>
|
38
|
+
</label>
|
39
|
+
</div>
|
21
40
|
</li>
|
22
41
|
<% end %>
|
23
42
|
</ul>
|
24
43
|
</div>
|
25
44
|
<% end %>
|
26
|
-
|
45
|
+
|
46
|
+
<%= submit_tag Spree.t(:search), name: nil, class: 'mt-4 btn btn-primary' %>
|
27
47
|
<% end %>
|
28
48
|
<% end %>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<div id="spree-header">
|
2
|
-
<header id="header" data-hook>
|
2
|
+
<header id="header" data-hook class="py-3">
|
3
3
|
<div class="container">
|
4
4
|
<div class="row">
|
5
|
-
<figure id="logo" class="col-
|
5
|
+
<figure id="logo" class="col-3 col-md-4" data-hook>
|
6
6
|
<%= logo %>
|
7
7
|
</figure>
|
8
8
|
<%= render partial: 'spree/shared/nav_bar' %>
|
@@ -1,6 +1,12 @@
|
|
1
1
|
<% if spree_current_user %>
|
2
|
-
<li
|
3
|
-
|
2
|
+
<li>
|
3
|
+
<%= link_to Spree.t(:my_account), spree.account_path %>
|
4
|
+
</li>
|
5
|
+
<li>
|
6
|
+
<%= link_to Spree.t(:logout), spree.logout_path %>
|
7
|
+
</li>
|
4
8
|
<% else %>
|
5
|
-
<li id="link-to-login"
|
9
|
+
<li id="link-to-login">
|
10
|
+
<%= link_to Spree.t(:login), spree.login_path %>
|
11
|
+
</li>
|
6
12
|
<% end %>
|
@@ -1,16 +1,16 @@
|
|
1
|
-
<nav
|
2
|
-
<
|
3
|
-
<
|
4
|
-
|
5
|
-
</
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
</
|
15
|
-
</
|
1
|
+
<nav id="main-nav-bar" class="navbar">
|
2
|
+
<ul class="nav" data-hook>
|
3
|
+
<li id="home-link" class="nav-item" data-hook>
|
4
|
+
<%= link_to Spree.t(:home), spree.root_path, class: 'nav-link' %>
|
5
|
+
</li>
|
6
|
+
</ul>
|
7
|
+
<ul class="nav navbar-right" data-hook>
|
8
|
+
<li id="link-to-cart" class="nav-item" data-hook>
|
9
|
+
<noscript>
|
10
|
+
<%= link_to_cart %>
|
11
|
+
</noscript>
|
12
|
+
|
13
|
+
</li>
|
14
|
+
<script>Spree.fetch_cart()</script>
|
15
|
+
</ul>
|
16
16
|
</nav>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
<nav class="navbar col-md-8 col-sm-9" id="top-nav-bar">
|
2
|
-
<ul id="nav-bar" class="nav
|
1
|
+
<nav class="navbar navbar-dark col-md-8 col-sm-9" id="top-nav-bar">
|
2
|
+
<ul id="nav-bar" class="nav align-items-center d-flex flex-column flex-sm-row navbar-right w-100 justify-content-start justify-content-md-end" data-hook>
|
3
3
|
<li id="search-bar" data-hook>
|
4
4
|
<%= render partial: 'spree/shared/search' %>
|
5
5
|
</li>
|
@@ -1,18 +1,24 @@
|
|
1
1
|
<div class="row steps-data">
|
2
2
|
<% if order.has_step?("address") %>
|
3
|
-
<div class="col-md-3 col-
|
4
|
-
<h4
|
3
|
+
<div class="col-md-3 col-6 mb-3" data-hook="order-bill-address">
|
4
|
+
<h4 class="h5">
|
5
|
+
<%= Spree.t(:billing_address) %> <%= link_to "(#{Spree.t(:edit)})", checkout_state_path(:address) unless order.completed? %>
|
6
|
+
</h4>
|
5
7
|
<%= render 'spree/shared/address', address: order.bill_address %>
|
6
8
|
</div>
|
7
9
|
|
8
10
|
<% if order.has_step?("delivery") %>
|
9
|
-
<div class="col-md-3 col-
|
10
|
-
<h4
|
11
|
+
<div class="col-md-3 col-6 mb-3" data-hook="order-ship-address">
|
12
|
+
<h4 class="h5">
|
13
|
+
<%= Spree.t(:shipping_address) %> <%= link_to "(#{Spree.t(:edit)})", checkout_state_path(:address) unless order.completed? %>
|
14
|
+
</h4>
|
11
15
|
<%= render 'spree/shared/address', address: order.ship_address %>
|
12
16
|
</div>
|
13
17
|
|
14
|
-
<div class="col-md-3 col-
|
15
|
-
<h4
|
18
|
+
<div class="col-md-3 col-6 mb-3" data-hook="order-shipment">
|
19
|
+
<h4 class="h5">
|
20
|
+
<%= Spree.t(:shipments) %> <%= link_to "(#{Spree.t(:edit)})", checkout_state_path(:delivery) unless order.completed? %>
|
21
|
+
</h4>
|
16
22
|
<div class="delivery">
|
17
23
|
<% order.shipments.each do |shipment| %>
|
18
24
|
<div>
|
@@ -26,8 +32,10 @@
|
|
26
32
|
<% end %>
|
27
33
|
|
28
34
|
<% if order.has_step?("payment") %>
|
29
|
-
<div class="col-md-3 col-
|
30
|
-
<h4
|
35
|
+
<div class="col-md-3 col-6 mb-3" data-hook="order-payment">
|
36
|
+
<h4 class="h5">
|
37
|
+
<%= Spree.t(:payment_information) %> <%= link_to "(#{Spree.t(:edit)})", checkout_state_path(:payment) unless order.completed? %>
|
38
|
+
</h4>
|
31
39
|
<div class="payment-info">
|
32
40
|
<%= render collection: order.payments.valid, partial: 'spree/shared/payment' %>
|
33
41
|
</div>
|
@@ -35,99 +43,145 @@
|
|
35
43
|
<% end %>
|
36
44
|
</div>
|
37
45
|
|
38
|
-
<
|
46
|
+
<div class="table-responsive">
|
47
|
+
<table id='line-items' class="table mt-4" data-hook="order_details">
|
48
|
+
<col width="15%" valign="middle" halign="center">
|
49
|
+
<col width="70%" valign="middle">
|
50
|
+
<col width="5%" valign="middle" halign="center">
|
51
|
+
<col width="5%" valign="middle" halign="center">
|
52
|
+
<col width="5%" valign="middle" halign="center">
|
39
53
|
|
40
|
-
<
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
<tr class="active" data-hook="order_details_line_items_headers">
|
49
|
-
<th colspan="2"><%= Spree.t(:item) %></th>
|
50
|
-
<th class="price"><%= Spree.t(:price) %></th>
|
51
|
-
<th class="qty"><%= Spree.t(:qty) %></th>
|
52
|
-
<th class="total"><span><%= Spree.t(:total) %></span></th>
|
53
|
-
</tr>
|
54
|
-
</thead>
|
54
|
+
<thead data-hook>
|
55
|
+
<tr class="active" data-hook="order_details_line_items_headers">
|
56
|
+
<th colspan="2"><%= Spree.t(:item) %></th>
|
57
|
+
<th class="price"><%= Spree.t(:price) %></th>
|
58
|
+
<th class="qty"><%= Spree.t(:qty) %></th>
|
59
|
+
<th class="total"><span><%= Spree.t(:total) %></span></th>
|
60
|
+
</tr>
|
61
|
+
</thead>
|
55
62
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
63
|
+
<tbody data-hook>
|
64
|
+
<% order.line_items.each do |item| %>
|
65
|
+
<tr data-hook="order_details_line_item_row">
|
66
|
+
<td data-hook="order_item_image">
|
67
|
+
<% if item.variant.images.length == 0 %>
|
68
|
+
<%= link_to small_image(item.variant.product), item.variant.product %>
|
69
|
+
<% else %>
|
70
|
+
<%= link_to image_tag(main_app.url_for(item.variant.images.first.url(:small))), item.variant.product %>
|
71
|
+
<% end %>
|
72
|
+
</td>
|
73
|
+
<td data-hook="order_item_description">
|
74
|
+
<h4><%= item.name %></h4>
|
75
|
+
<p>
|
76
|
+
<%= truncate(item.description, length: 100) %>
|
77
|
+
<%= "(" + item.variant.options_text + ")" unless item.variant.option_values.empty? %>
|
78
|
+
</p>
|
79
|
+
</td>
|
80
|
+
<td data-hook="order_item_price" class="lead text-primary price">
|
81
|
+
<span><%= item.single_money.to_html %></span>
|
82
|
+
</td>
|
83
|
+
<td data-hook="order_item_qty" class="order-qty">
|
84
|
+
<%= item.quantity %>
|
85
|
+
</td>
|
86
|
+
<td data-hook="order_item_total" class="lead text-primary total">
|
87
|
+
<span><%= item.display_amount.to_html %></span>
|
88
|
+
</td>
|
89
|
+
</tr>
|
90
|
+
<% end %>
|
91
|
+
</tbody>
|
92
|
+
<tfoot id="order-total" data-hook="order_details_total">
|
93
|
+
<tr class="table-warning total">
|
94
|
+
<td colspan="4" align="right">
|
95
|
+
<strong><%= Spree.t(:order_total) %>:</strong>
|
65
96
|
</td>
|
66
|
-
<td
|
67
|
-
<
|
68
|
-
|
69
|
-
|
97
|
+
<td class="total">
|
98
|
+
<span id="order_total" class="lead text-primary">
|
99
|
+
<%= order.display_total.to_html %>
|
100
|
+
</span>
|
70
101
|
</td>
|
71
|
-
<td data-hook="order_item_price" class="lead text-primary price"><span><%= item.single_money.to_html %></span></td>
|
72
|
-
<td data-hook="order_item_qty" class="order-qty"><%= item.quantity %></td>
|
73
|
-
<td data-hook="order_item_total" class="lead text-primary total"><span><%= item.display_amount.to_html %></span></td>
|
74
102
|
</tr>
|
75
|
-
|
76
|
-
</tbody>
|
77
|
-
<tfoot id="order-total" data-hook="order_details_total">
|
78
|
-
<tr class="warning total">
|
79
|
-
<td colspan="4" align="right"><b><%= Spree.t(:order_total) %>:</b></td>
|
80
|
-
<td class="total"><span id="order_total" class="lead text-primary"><%= order.display_total.to_html %></span></td>
|
81
|
-
</tr>
|
82
|
-
</tfoot>
|
103
|
+
</tfoot>
|
83
104
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
105
|
+
<tfoot id="subtotal" data-hook="order_details_subtotal">
|
106
|
+
<tr class="total" id="subtotal-row">
|
107
|
+
<td colspan="4">
|
108
|
+
<strong><%= Spree.t(:subtotal) %>:</strong>
|
109
|
+
</td>
|
110
|
+
<td class="total">
|
111
|
+
<span><%= order.display_item_total.to_html %></span>
|
112
|
+
</td>
|
113
|
+
</tr>
|
114
|
+
</tfoot>
|
90
115
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
116
|
+
<% if order.line_item_adjustments.exists? %>
|
117
|
+
<% if order.line_item_adjustments.promotion.eligible.exists? %>
|
118
|
+
<tfoot id="price-adjustments" data-hook="order_details_price_adjustments">
|
119
|
+
<% order.line_item_adjustments.promotion.eligible.group_by(&:label).each do |label, adjustments| %>
|
120
|
+
<tr class="total">
|
121
|
+
<td colspan="4">
|
122
|
+
<%= Spree.t(:promotion) %>: <strong><%= label %></strong>
|
123
|
+
</td>
|
124
|
+
<td class="total">
|
125
|
+
<span>
|
126
|
+
<%= Spree::Money.new(
|
127
|
+
adjustments.sum(&:amount), currency: order.currency
|
128
|
+
) %>
|
129
|
+
</span>
|
130
|
+
</td>
|
131
|
+
</tr>
|
132
|
+
<% end %>
|
133
|
+
</tfoot>
|
134
|
+
<% end %>
|
101
135
|
<% end %>
|
102
|
-
<% end %>
|
103
136
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
137
|
+
<tfoot id='shipment-total'>
|
138
|
+
<% order.shipments.group_by { |s| s.selected_shipping_rate.name }.each do |name, shipments| %>
|
139
|
+
<tr class="total" data-hook='shipment-row'>
|
140
|
+
<td colspan="4" align="right" class="text-muted">
|
141
|
+
<%= Spree.t(:shipping) %>: <strong><%= name %></strong>
|
142
|
+
</td>
|
143
|
+
<td class="total">
|
144
|
+
<span>
|
145
|
+
<%= Spree::Money.new(
|
146
|
+
shipments.sum(&:discounted_cost), currency: order.currency
|
147
|
+
).to_html %>
|
148
|
+
</span>
|
149
|
+
</td>
|
150
|
+
</tr>
|
151
|
+
<% end %>
|
152
|
+
</tfoot>
|
153
|
+
|
154
|
+
<% if order.all_adjustments.tax.exists? %>
|
155
|
+
<tfoot id="tax-adjustments" data-hook="order_details_tax_adjustments">
|
156
|
+
<% order.all_adjustments.tax.group_by(&:label).each do |label, adjustments| %>
|
157
|
+
<tr class="total">
|
158
|
+
<td colspan="4" align="right" class="text-muted">
|
159
|
+
<%= Spree.t(:tax) %>: <strong><%= label %></strong>
|
160
|
+
</td>
|
161
|
+
<td class="total">
|
162
|
+
<span>
|
163
|
+
<%= Spree::Money.new(
|
164
|
+
adjustments.sum(&:amount), currency: order.currency
|
165
|
+
) %>
|
166
|
+
</span>
|
167
|
+
</td>
|
168
|
+
</tr>
|
169
|
+
<% end %>
|
170
|
+
</tfoot>
|
110
171
|
<% end %>
|
111
|
-
</tfoot>
|
112
172
|
|
113
|
-
|
114
|
-
|
115
|
-
|
173
|
+
<tfoot id="order-charges" data-hook="order_details_adjustments">
|
174
|
+
<% order.adjustments.eligible.each do |adjustment| %>
|
175
|
+
<% next if (adjustment.source_type == 'Spree::TaxRate') and (adjustment.amount == 0) %>
|
116
176
|
<tr class="total">
|
117
|
-
<td colspan="4" align="right"
|
118
|
-
|
177
|
+
<td colspan="4" align="right">
|
178
|
+
<strong><%= adjustment.label %></strong>
|
179
|
+
</td>
|
180
|
+
<td class="total">
|
181
|
+
<span><%= adjustment.display_amount.to_html %></span>
|
182
|
+
</td>
|
119
183
|
</tr>
|
120
184
|
<% end %>
|
121
185
|
</tfoot>
|
122
|
-
|
123
|
-
|
124
|
-
<tfoot id="order-charges" data-hook="order_details_adjustments">
|
125
|
-
<% order.adjustments.eligible.each do |adjustment| %>
|
126
|
-
<% next if (adjustment.source_type == 'Spree::TaxRate') and (adjustment.amount == 0) %>
|
127
|
-
<tr class="total">
|
128
|
-
<td colspan="4" align="right"><strong><%= adjustment.label %></strong></td>
|
129
|
-
<td class="total"><span><%= adjustment.display_amount.to_html %></span></td>
|
130
|
-
</tr>
|
131
|
-
<% end %>
|
132
|
-
</tfoot>
|
133
|
-
</table>
|
186
|
+
</table>
|
187
|
+
</div>
|