spree_bootstrap_frontend 1.0.1
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 +15 -0
- data/.gitignore +14 -0
- data/.rspec +1 -0
- data/Gemfile +7 -0
- data/LICENSE +23 -0
- data/README.md +109 -0
- data/Rakefile +15 -0
- data/app/assets/images/store/spree-header.jpg +0 -0
- data/app/assets/images/store/spree.png +0 -0
- data/app/assets/javascripts/spree/backend/spree_bootstrap_frontend.js +1 -0
- data/app/assets/javascripts/spree/frontend/spree_bootstrap_frontend.js +1 -0
- data/app/assets/stylesheets/spree/backend/spree_bootstrap_frontend.css +1 -0
- data/app/assets/stylesheets/spree/frontend/spree_bootstrap_frontend.css.scss +45 -0
- data/app/assets/stylesheets/spree/frontend/spree_frontend.css.scss +5 -0
- data/app/helpers/spree/base_helper_decorator.rb +57 -0
- data/app/helpers/spree/checkout_helper_decorator.rb +30 -0
- data/app/views/spree/address/_form.html.erb +75 -0
- data/app/views/spree/checkout/_address.html.erb +41 -0
- data/app/views/spree/checkout/_confirm.html.erb +13 -0
- data/app/views/spree/checkout/_delivery.html.erb +104 -0
- data/app/views/spree/checkout/_payment.html.erb +35 -0
- data/app/views/spree/checkout/_summary.html.erb +59 -0
- data/app/views/spree/checkout/edit.html.erb +38 -0
- data/app/views/spree/checkout/payment/_gateway.html.erb +32 -0
- data/app/views/spree/checkout/registration.html.erb +29 -0
- data/app/views/spree/layouts/spree_application.html.erb +40 -0
- data/app/views/spree/orders/_form.html.erb +30 -0
- data/app/views/spree/orders/_line_item.html.erb +36 -0
- data/app/views/spree/orders/edit.html.erb +45 -0
- data/app/views/spree/products/_cart_form.html.erb +62 -0
- data/app/views/spree/products/_promotions.html.erb +19 -0
- data/app/views/spree/products/_properties.html.erb +15 -0
- data/app/views/spree/products/_taxons.html.erb +14 -0
- data/app/views/spree/products/_thumbnails.html.erb +19 -0
- data/app/views/spree/products/show.html.erb +51 -0
- data/app/views/spree/shared/_error_messages.html.erb +12 -0
- data/app/views/spree/shared/_filters.html.erb +28 -0
- data/app/views/spree/shared/_footer.html.erb +10 -0
- data/app/views/spree/shared/_head.html.erb +15 -0
- data/app/views/spree/shared/_header.html.erb +13 -0
- data/app/views/spree/shared/_login.html.erb +19 -0
- data/app/views/spree/shared/_login_bar.html.erb +6 -0
- data/app/views/spree/shared/_main_nav_bar.html.erb +10 -0
- data/app/views/spree/shared/_nav_bar.html.erb +8 -0
- data/app/views/spree/shared/_order_details.html.erb +134 -0
- data/app/views/spree/shared/_products.html.erb +39 -0
- data/app/views/spree/shared/_search.html.erb +13 -0
- data/app/views/spree/shared/_sidebar.html.erb +3 -0
- data/app/views/spree/shared/_taxonomies.html.erb +6 -0
- data/app/views/spree/shared/_user_form.html.erb +12 -0
- data/app/views/spree/user_passwords/edit.html.erb +22 -0
- data/app/views/spree/user_passwords/new.html.erb +21 -0
- data/app/views/spree/user_registrations/new.html.erb +22 -0
- data/app/views/spree/user_sessions/new.html.erb +20 -0
- data/app/views/spree/users/edit.html.erb +10 -0
- data/app/views/spree/users/show.html.erb +43 -0
- data/bin/rails +7 -0
- data/config/locales/en.yml +5 -0
- data/config/routes.rb +3 -0
- data/lib/generators/spree_bootstrap_frontend/install/install_generator.rb +33 -0
- data/lib/spree_bootstrap_frontend.rb +3 -0
- data/lib/spree_bootstrap_frontend/engine.rb +24 -0
- data/lib/spree_bootstrap_frontend/factories.rb +6 -0
- data/spec/spec_helper.rb +82 -0
- data/spree_bootstrap_frontend.gemspec +33 -0
- metadata +289 -0
@@ -0,0 +1,62 @@
|
|
1
|
+
<%= form_for :order, :url => populate_orders_path do |f| %>
|
2
|
+
<div class="row" id="inside-product-cart-form" data-hook="inside_product_cart_form" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
3
|
+
|
4
|
+
<% if @product.variants_and_option_values(current_currency).any? %>
|
5
|
+
<div id="product-variants" class="col-md-6">
|
6
|
+
<h3 class="product-section-title"><%= Spree.t(:variants) %></h3>
|
7
|
+
<ul class="list-group">
|
8
|
+
<% @product.variants_and_option_values(current_currency).each_with_index do |variant, index| %>
|
9
|
+
<li class="list-group-item">
|
10
|
+
<%= radio_button_tag "products[#{@product.id}]", variant.id, index == 0, 'data-price' => display_price(variant) %>
|
11
|
+
<label for="<%= ['products', @product.id, variant.id].join('_') %>">
|
12
|
+
<span class="variant-description">
|
13
|
+
<%= variant_options variant %>
|
14
|
+
</span>
|
15
|
+
<% if variant_price variant %>
|
16
|
+
<span class="price diff"><%= variant_price variant %></span>
|
17
|
+
<% end %>
|
18
|
+
</label>
|
19
|
+
</li>
|
20
|
+
<% end%>
|
21
|
+
</ul>
|
22
|
+
</div>
|
23
|
+
<% end%>
|
24
|
+
|
25
|
+
<% if @product.price_in(current_currency) and !@product.price.nil? %>
|
26
|
+
<div data-hook="product_price" class="col-md-5">
|
27
|
+
|
28
|
+
<div id="product-price">
|
29
|
+
<h3 class="product-section-title"><%= Spree.t(:price) %></h3>
|
30
|
+
<div>
|
31
|
+
<span class="lead" itemprop="price">
|
32
|
+
<%= display_price(@product) %>
|
33
|
+
</span>
|
34
|
+
<span itemprop="priceCurrency" content="<%= @product.currency %>"></span>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<% if @product.master.in_stock? %>
|
38
|
+
<link itemprop="availability" href="http://schema.org/InStock" />
|
39
|
+
<% end %>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<div class="add-to-cart">
|
43
|
+
<br/>
|
44
|
+
<div class="input-group">
|
45
|
+
<%= number_field_tag (@product.variants_and_option_values.any? ? :quantity : "variants[#{@product.master.id}]"),
|
46
|
+
1, :class => 'title form-control', :min => 1 %>
|
47
|
+
<span class="input-group-btn">
|
48
|
+
<%= button_tag :class => 'btn btn-success', :id => 'add-to-cart-button', :type => :submit do %>
|
49
|
+
<%= Spree.t(:add_to_cart) %>
|
50
|
+
</span>
|
51
|
+
</div>
|
52
|
+
<% end %>
|
53
|
+
</div>
|
54
|
+
</div>
|
55
|
+
<% else %>
|
56
|
+
<div id="product-price">
|
57
|
+
<br>
|
58
|
+
<div><span class="price selling" itemprop="price"><%= Spree.t('product_not_available_in_this_currency') %></span></div>
|
59
|
+
</div>
|
60
|
+
<% end %>
|
61
|
+
</div>
|
62
|
+
<% end %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<% promotions = @product.possible_promotions %>
|
2
|
+
<% if promotions.any? %>
|
3
|
+
<div id="promotions">
|
4
|
+
<h3><%= Spree.t(:promotions) %></h3>
|
5
|
+
<% promotions.each do |promotion| %>
|
6
|
+
<div class="well well-sm">
|
7
|
+
<h4><%= promotion.name %></h4>
|
8
|
+
<p><%= promotion.description %></p>
|
9
|
+
<% if promotion.products.any? %>
|
10
|
+
<ul>
|
11
|
+
<% promotion.products.each do |product| %>
|
12
|
+
<li><%= link_to product.name, product_path(product) %></li>
|
13
|
+
<% end %>
|
14
|
+
</ul>
|
15
|
+
<% end %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
18
|
+
</div>
|
19
|
+
<% end %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<% unless @product_properties.empty? %>
|
2
|
+
<h3 class="product-section-title"><%= Spree.t('properties')%></h3>
|
3
|
+
<table id="product-properties" class="table table-striped" data-hook>
|
4
|
+
<tbody>
|
5
|
+
<% @product_properties.each do |product_property| %>
|
6
|
+
<% css_class = cycle('even', 'odd', :name => "properties") %>
|
7
|
+
<tr class="<%= css_class %>">
|
8
|
+
<td><strong><%= product_property.property.presentation %></strong></td>
|
9
|
+
<td><%= product_property.value %></td>
|
10
|
+
</tr>
|
11
|
+
<% end %>
|
12
|
+
<% reset_cycle('properties') %>
|
13
|
+
</tbody>
|
14
|
+
</table>
|
15
|
+
<% end %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<% if !@product.taxons.blank? %>
|
2
|
+
<div id="taxon-crumbs" data-hook class=" five ">
|
3
|
+
<h3 class="product-section-title"><%= Spree.t(:look_for_similar_items) %></h3>
|
4
|
+
|
5
|
+
<div data-hook="product_taxons">
|
6
|
+
<ul class="list-group" id="similar_items_by_taxon" data-hook>
|
7
|
+
<% @product.taxons.each do |taxon| %>
|
8
|
+
<li class="list-group-item"><%= link_to taxon.name, seo_url(taxon) %></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
</div>
|
14
|
+
<% end %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<%# no need for thumbnails unless there is more than one image %>
|
2
|
+
<% if (@product.images + @product.variant_images).uniq.size > 1 %>
|
3
|
+
<ul id="product-thumbnails" class="thumbnails list-inline" data-hook>
|
4
|
+
<% @product.images.each do |i| %>
|
5
|
+
<li class='tmb-all tmb-<%= i.viewable.id %>'>
|
6
|
+
<%= link_to(image_tag(i.attachment.url(:mini), class: "thumbnail"), i.attachment.url(:product)) %>
|
7
|
+
</li>
|
8
|
+
<% end %>
|
9
|
+
|
10
|
+
<% if @product.has_variants? %>
|
11
|
+
<% @product.variant_images.each do |i| %>
|
12
|
+
<% next if @product.images.include?(i) %>
|
13
|
+
<li class='vtmb tmb-<%= i.viewable.id %>'>
|
14
|
+
<%= link_to(image_tag(i.attachment.url(:mini), class: "thumbnail"), i.attachment.url(:product)) %>
|
15
|
+
</li>
|
16
|
+
<% end %>
|
17
|
+
<% end %>
|
18
|
+
</ul>
|
19
|
+
<% end %>
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<div data-hook="product_show" itemscope itemtype="http://schema.org/Product">
|
2
|
+
<% @body_id = 'product-details' %>
|
3
|
+
|
4
|
+
<div class="col-md-4" data-hook="product_left_part">
|
5
|
+
<div data-hook="product_left_part_wrap">
|
6
|
+
|
7
|
+
<div id="product-images" data-hook="product_images">
|
8
|
+
<div id="main-image" class="panel panel-default" data-hook>
|
9
|
+
<div class="panel-body text-center">
|
10
|
+
<%= render :partial => 'image' %>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
<div id="thumbnails" data-hook>
|
14
|
+
<%= render :partial => 'thumbnails' %>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div data-hook="product_properties">
|
19
|
+
<%= render :partial => 'properties' %>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div data-hook="promotions">
|
23
|
+
<%= render :partial => 'promotions' %>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<div class="col-md-8" data-hook="product_right_part">
|
30
|
+
<div data-hook="product_right_part_wrap">
|
31
|
+
|
32
|
+
<div id="product-description" data-hook="product_description">
|
33
|
+
|
34
|
+
<h1 class="product-title" itemprop="name"><%= accurate_title %></h1>
|
35
|
+
|
36
|
+
<div class="well" itemprop="description" data-hook="description">
|
37
|
+
<%= product_description(@product) rescue Spree.t(:product_has_no_description) %>
|
38
|
+
</div>
|
39
|
+
|
40
|
+
<div id="cart-form" data-hook="cart_form">
|
41
|
+
<%= render :partial => 'cart_form' %>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<%= render :partial => 'taxons' %>
|
47
|
+
|
48
|
+
</div>
|
49
|
+
</div>
|
50
|
+
|
51
|
+
</div>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<% if target && target.errors.any? %>
|
2
|
+
<div id="errorExplanation" class="alert alert-danger" data-hook>
|
3
|
+
<h3><%= Spree.t(:errors_prohibited_this_record_from_being_saved, :count => target.errors.count) %>:</h3>
|
4
|
+
<p><%= Spree.t(:there_were_problems_with_the_following_fields) %>:</p>
|
5
|
+
<ul>
|
6
|
+
<% target.errors.full_messages.each do |msg| %>
|
7
|
+
<li><%= msg %></li>
|
8
|
+
<% end %>
|
9
|
+
</ul>
|
10
|
+
<br/>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<% filters = @taxon ? @taxon.applicable_filters : [Spree::Core::ProductFilters.all_taxons] %>
|
2
|
+
<% unless filters.empty? %>
|
3
|
+
<%= form_tag '', :method => :get, :id => 'sidebar_products_search' do %>
|
4
|
+
<% params[:search] ||= {} %>
|
5
|
+
<%= hidden_field_tag 'per_page', params[:per_page] %>
|
6
|
+
<% filters.each do |filter| %>
|
7
|
+
<% labels = filter[:labels] || filter[:conds].map {|m,c| [m,m]} %>
|
8
|
+
<% next if labels.empty? %>
|
9
|
+
<div class="navigation" data-hook="navigation">
|
10
|
+
<h4 class="filter-title"> <%= filter[:name] %> </h4>
|
11
|
+
<ul class="list-group">
|
12
|
+
<% labels.each do |nm,val| %>
|
13
|
+
<% label = "#{filter[:name]}_#{nm}".gsub(/\s+/,'_') %>
|
14
|
+
<li class="list-group-item">
|
15
|
+
<input type="checkbox"
|
16
|
+
id="<%= label %>"
|
17
|
+
name="search[<%= filter[:scope].to_s %>][]"
|
18
|
+
value="<%= val %>"
|
19
|
+
<%= params[:search][filter[:scope]] && params[:search][filter[:scope]].include?(val.to_s) ? "checked" : "" %> />
|
20
|
+
<label class="nowrap" for="<%= label %>"> <%= nm %> </label>
|
21
|
+
</li>
|
22
|
+
<% end %>
|
23
|
+
</ul>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
26
|
+
<%= submit_tag Spree.t(:search), :name => nil, :class => 'btn btn-primary' %>
|
27
|
+
<% end %>
|
28
|
+
<% end %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<div id="spree-footer">
|
2
|
+
<div class="container">
|
3
|
+
<footer id="footer" class="row" data-hook>
|
4
|
+
<div id="footer-left" class="col-md-6" data-hook>
|
5
|
+
<p><%= Spree.t :powered_by %> <%= link_to 'Spree', 'http://spreecommerce.com/' %></p>
|
6
|
+
</div>
|
7
|
+
<div id="footer-right" class="col-md-6" data-hook></div>
|
8
|
+
</footer>
|
9
|
+
</div>
|
10
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<meta charset="utf-8">
|
2
|
+
<title><%= title %></title>
|
3
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
4
|
+
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1" name="viewport">
|
5
|
+
<%== meta_data_tags %>
|
6
|
+
<%= canonical_tag %>
|
7
|
+
<%= favicon_link_tag image_path('favicon.ico') %>
|
8
|
+
<%= stylesheet_link_tag 'spree/frontend/spree_frontend', :media => 'screen' %>
|
9
|
+
<%= csrf_meta_tags %>
|
10
|
+
<%= javascript_include_tag 'spree/frontend/all' %>
|
11
|
+
<!--[if lt IE 9]>
|
12
|
+
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6/html5shiv.min.js"></script>
|
13
|
+
<![endif]-->
|
14
|
+
<%= render "spree/shared/routes" %>
|
15
|
+
<%= yield :head %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div id="spree-header">
|
2
|
+
|
3
|
+
<header id="header" data-hook>
|
4
|
+
<div class="container">
|
5
|
+
<figure id="logo" class="text-center col-md-4" data-hook><a href="/"><img alt="Spree" src="/assets/store/spree.png"></a></figure>
|
6
|
+
<%= render :partial => 'spree/shared/nav_bar' %>
|
7
|
+
</div>
|
8
|
+
</header>
|
9
|
+
<div class="container">
|
10
|
+
<%= render :partial => 'spree/shared/main_nav_bar' if store_menu? %>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
</div>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<%= form_for Spree::User.new, :as => :spree_user, :url => spree.create_new_session_path do |f| %>
|
2
|
+
<fieldset id="password-credentials">
|
3
|
+
<div class="form-group">
|
4
|
+
<%= f.email_field :email, :class => 'form-control', :tabindex => 1, :placeholder => Spree.t(:email) %>
|
5
|
+
</div>
|
6
|
+
<div class="form-group">
|
7
|
+
<%= f.password_field :password, :class => 'form-control', :tabindex => 2, :placeholder => Spree.t(:password) %>
|
8
|
+
</div>
|
9
|
+
<div class="checkbox">
|
10
|
+
<label>
|
11
|
+
<%= f.check_box :remember_me %>
|
12
|
+
<%= f.label :remember_me, Spree.t(:remember_me) %>
|
13
|
+
</label>
|
14
|
+
</div>
|
15
|
+
<div class="form-group">
|
16
|
+
<%= f.submit Spree.t(:login), :class => 'btn btn-lg btn-success btn-block', :tabindex => 3 %>
|
17
|
+
</div>
|
18
|
+
</fieldset>
|
19
|
+
<% end %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<nav class="col-md-12">
|
2
|
+
<div id="main-nav-bar" class="navbar">
|
3
|
+
<ul class="nav navbar-nav" data-hook>
|
4
|
+
<li id="home-link" data-hook><%= link_to Spree.t(:home), spree.root_path %></li>
|
5
|
+
</ul>
|
6
|
+
<ul class="nav navbar-nav navbar-right" data-hook>
|
7
|
+
<li id="link-to-cart" data-hook><%= link_to_cart %></li>
|
8
|
+
</ul>
|
9
|
+
</div>
|
10
|
+
</nav>
|
@@ -0,0 +1,134 @@
|
|
1
|
+
<div class="row steps-data">
|
2
|
+
|
3
|
+
<% if order.has_step?("address") %>
|
4
|
+
|
5
|
+
<% if order.has_step?("delivery") %>
|
6
|
+
<div class="col-md-3" data-hook="order-ship-address">
|
7
|
+
<h4><%= Spree.t(:shipping_address) %> <%= link_to "(#{Spree.t(:edit)})", checkout_state_path(:address) unless @order.completed? %></h4>
|
8
|
+
<%= render :partial => 'spree/shared/address', :locals => { :address => order.ship_address } %>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<div class="col-md-3" data-hook="order-bill-address">
|
13
|
+
<h4><%= Spree.t(:billing_address) %> <%= link_to "(#{Spree.t(:edit)})", checkout_state_path(:address) unless @order.completed? %></h4>
|
14
|
+
<%= render :partial => 'spree/shared/address', :locals => { :address => order.bill_address } %>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<% if @order.has_step?("delivery") %>
|
18
|
+
<div class=" col-md-3">
|
19
|
+
<h4><%= Spree.t(:shipments) %> <%= link_to "(#{Spree.t(:edit)})", checkout_state_path(:delivery) unless @order.completed? %></h4>
|
20
|
+
<div class="delivery">
|
21
|
+
<% order.shipments.each do |shipment| %>
|
22
|
+
<div>
|
23
|
+
<i class='icon-truck'></i>
|
24
|
+
<%= Spree.t(:shipment_details, :stock_location => shipment.stock_location.name, :shipping_method => shipment.shipping_method.name) %>
|
25
|
+
</div>
|
26
|
+
<% end %>
|
27
|
+
</div>
|
28
|
+
<%= render(:partial => 'spree/shared/shipment_tracking', :locals => {:order => @order}) if @order.shipped? %>
|
29
|
+
</div>
|
30
|
+
<% end %>
|
31
|
+
<% end %>
|
32
|
+
|
33
|
+
<div class="col-md-3">
|
34
|
+
<h4><%= Spree.t(:payment_information) %> <%= link_to "(#{Spree.t(:edit)})", checkout_state_path(:payment) unless @order.completed? %></h4>
|
35
|
+
<div class="payment-info">
|
36
|
+
<% order.payments.valid.each do |payment| %>
|
37
|
+
<%= render payment%><br/>
|
38
|
+
<% end %>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
</div>
|
43
|
+
|
44
|
+
<hr />
|
45
|
+
|
46
|
+
<table id='line-items' class="table" data-hook="order_details">
|
47
|
+
<col width="15%" valign="middle" halign="center">
|
48
|
+
<col width="70%" valign="middle">
|
49
|
+
<col width="5%" valign="middle" halign="center">
|
50
|
+
<col width="5%" valign="middle" halign="center">
|
51
|
+
<col width="5%" valign="middle" halign="center">
|
52
|
+
|
53
|
+
<thead data-hook>
|
54
|
+
<tr class="active" data-hook="order_details_line_items_headers">
|
55
|
+
<th colspan="2"><%= Spree.t(:item) %></th>
|
56
|
+
<th class="price"><%= Spree.t(:price) %></th>
|
57
|
+
<th class="qty"><%= Spree.t(:qty) %></th>
|
58
|
+
<th class="total"><span><%= Spree.t(:total) %></span></th>
|
59
|
+
</tr>
|
60
|
+
</thead>
|
61
|
+
|
62
|
+
<tbody data-hook>
|
63
|
+
<% @order.line_items.each do |item| %>
|
64
|
+
<tr data-hook="order_details_line_item_row">
|
65
|
+
<td data-hook="order_item_image">
|
66
|
+
<% if item.variant.images.length == 0 %>
|
67
|
+
<%= link_to small_image(item.variant.product), item.variant.product %>
|
68
|
+
<% else %>
|
69
|
+
<%= link_to image_tag(item.variant.images.first.attachment.url(:small)), item.variant.product %>
|
70
|
+
<% end %>
|
71
|
+
</td>
|
72
|
+
<td data-hook="order_item_description">
|
73
|
+
<h4><%= item.variant.product.name %></h4>
|
74
|
+
<%= truncated_product_description(item.variant.product) %>
|
75
|
+
<%= "(" + item.variant.options_text + ")" unless item.variant.option_values.empty? %>
|
76
|
+
</td>
|
77
|
+
<td data-hook="order_item_price" class="lead text-primary price"><span><%= item.single_money.to_html %></span></td>
|
78
|
+
<td data-hook="order_item_qty"><%= item.quantity %></td>
|
79
|
+
<td data-hook="order_item_total" class="lead text-primary total"><span><%= item.display_amount.to_html %></span></td>
|
80
|
+
</tr>
|
81
|
+
<% end %>
|
82
|
+
</tbody>
|
83
|
+
<tfoot id="order-total" data-hook="order_details_total">
|
84
|
+
<tr class="warning total">
|
85
|
+
<td colspan="4" align="right"><b><%= Spree.t(:order_total) %>:</b></td>
|
86
|
+
<td class="total"><span id="order_total" class="lead text-primary"><%= @order.display_total.to_html %></span></td>
|
87
|
+
</tr>
|
88
|
+
</tfoot>
|
89
|
+
|
90
|
+
<tfoot id="subtotal" data-hook="order_details_subtotal">
|
91
|
+
<tr class="total" id="subtotal-row">
|
92
|
+
<td colspan="4" align="right"><b><%= Spree.t(:subtotal) %>:</b></td>
|
93
|
+
<td class="total"><span><%= @order.display_item_total.to_html %></span></td>
|
94
|
+
</tr>
|
95
|
+
</tfoot>
|
96
|
+
<% if order.all_adjustments.promotion.eligible.exists? %>
|
97
|
+
<tfoot id="price-adjustments" data-hook="order_details_price_adjustments">
|
98
|
+
<% order.all_adjustments.promotion.eligible.group_by(&:label).each do |label, adjustments| %>
|
99
|
+
<tr class="total">
|
100
|
+
<td colspan="4" align="right"><%= Spree.t(:promotion) %>: <strong><%= label %></strong></td>
|
101
|
+
<td class="total"><span><%= Spree::Money.new(adjustments.sum(&:amount)) %></span></td>
|
102
|
+
</tr>
|
103
|
+
<% end %>
|
104
|
+
</tfoot>
|
105
|
+
<% end %>
|
106
|
+
|
107
|
+
<% if order.all_adjustments.tax.exists? %>
|
108
|
+
<tfoot id="tax-adjustments" data-hook="order_details_tax_adjustments">
|
109
|
+
<% order.all_adjustments.tax.group_by(&:label).each do |label, adjustments| %>
|
110
|
+
<tr class="total">
|
111
|
+
<td colspan="4" align="right" class="text-muted"><%= Spree.t(:tax) %>: <strong><%= label %></strong></td>
|
112
|
+
<td class="total"><span><%= Spree::Money.new(adjustments.sum(&:amount)) %></span></td>
|
113
|
+
</tr>
|
114
|
+
<% end %>
|
115
|
+
</tfoot>
|
116
|
+
<% end %>
|
117
|
+
<tfoot id='shipment-total'>
|
118
|
+
<% order.shipments.group_by { |s| s.shipping_method.name }.each do |name, shipments| %>
|
119
|
+
<tr class="total" data-hook='shipment-row'>
|
120
|
+
<td colspan="4" align="right" class="text-muted"><%= Spree.t(:shipping) %>: <strong><%= name %></strong></td>
|
121
|
+
<td class="total"><span><%= Spree::Money.new(shipments.sum(&:discounted_cost)).to_html %></span></td>
|
122
|
+
</tr>
|
123
|
+
<% end %>
|
124
|
+
</tfoot>
|
125
|
+
<tfoot id="order-charges" data-hook="order_details_adjustments">
|
126
|
+
<% @order.adjustments.eligible.each do |adjustment| %>
|
127
|
+
<% next if (adjustment.source_type == 'Spree::TaxRate') and (adjustment.amount == 0) %>
|
128
|
+
<tr class="total">
|
129
|
+
<td colspan="4" align="right"><strong><%= adjustment.label %></strong></td>
|
130
|
+
<td class="total"><span><%= adjustment.display_amount.to_html %></span></td>
|
131
|
+
</tr>
|
132
|
+
<% end %>
|
133
|
+
</tfoot>
|
134
|
+
</table>
|