synergy_default_theme 1.0.0
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.
- data/LICENSE +23 -0
- data/README.md +4 -0
- data/Rakefile +31 -0
- data/app/controllers/home_controller.rb +10 -0
- data/app/controllers/products_controller_decorator.rb +3 -0
- data/app/helpers/base_helper_decorator.rb +14 -0
- data/app/helpers/orders_helper_decorator.rb +5 -0
- data/app/helpers/product_helper_decorator.rb +22 -0
- data/app/helpers/taxons_helper_decorator.rb +7 -0
- data/app/models/page_sweeper.rb +20 -0
- data/app/models/tracker_sweeper.rb +20 -0
- data/app/views/admin/reviews/index.html.erb +42 -0
- data/app/views/admin/taxonomies/_list.html.erb +19 -0
- data/app/views/admin/taxonomies/_show_on_homepage_field.html.erb +4 -0
- data/app/views/checkout/_delivery.html.erb +25 -0
- data/app/views/checkout/_payment.html.erb +34 -0
- data/app/views/gateway/robokassa/show.html.erb +22 -0
- data/app/views/home/index.html.erb +11 -0
- data/app/views/layouts/spree_application.html.erb +110 -0
- data/app/views/orders/_advanced_cart.html.erb +45 -0
- data/app/views/products/_cart_form.html.erb +59 -0
- data/app/views/products/_eot_includes.html.erb +27 -0
- data/app/views/products/_image.html.erb +8 -0
- data/app/views/products/_properties.html.erb +12 -0
- data/app/views/products/_thumbnails.html.erb +36 -0
- data/app/views/products/show.html.erb +146 -0
- data/app/views/shared/_like_buttons.html.erb +27 -0
- data/app/views/shared/_login_bar.html.erb +26 -0
- data/app/views/shared/_order_details.html.erb +50 -0
- data/app/views/shared/_products.html.erb +42 -0
- data/app/views/shared/_rating.html.erb +8 -0
- data/app/views/shared/_reviews.html.erb +40 -0
- data/app/views/shared/_search.html.erb +3 -0
- data/app/views/shared/_synergy_compare_products_js.html.erb +51 -0
- data/app/views/shared/_taxonomies.html.erb +16 -0
- data/config/initializers/advanced_cart.rb +3 -0
- data/config/initializers/constants.rb +3 -0
- data/config/initializers/like_buttons.rb +1 -0
- data/config/locales/ru.yml +22 -0
- data/config/routes.rb +4 -0
- data/db/migrate/20110330125354_add_show_on_main_page_flag_to_taxonomies.rb +9 -0
- data/db/migrate/20110404120925_change_column_title_in_reviews.rb +13 -0
- data/lib/spree_compare_products_hooks.rb +15 -0
- data/lib/spree_reviews_hook.rb +24 -0
- data/lib/synergy_default_theme.rb +39 -0
- data/lib/synergy_default_theme_hooks.rb +5 -0
- data/lib/tasks/install.rake +25 -0
- data/lib/tasks/synergy_default_theme.rake +1 -0
- data/public/images/bubblepopup_bg.png +0 -0
- data/public/images/bubblepopup_bottom.png +0 -0
- data/public/images/bubblepopup_top.png +0 -0
- data/public/images/button_long.png +0 -0
- data/public/images/button_short.png +0 -0
- data/public/images/cart.png +0 -0
- data/public/images/cart_th_bg.png +0 -0
- data/public/images/checkout.png +0 -0
- data/public/images/close_button.png +0 -0
- data/public/images/facebook_32.png +0 -0
- data/public/images/footer_panel.png +0 -0
- data/public/images/google_32.png +0 -0
- data/public/images/header_panel.png +0 -0
- data/public/images/libra.png +0 -0
- data/public/images/login_bar_bg.png +0 -0
- data/public/images/logo.png +0 -0
- data/public/images/noimage/product.jpg +0 -0
- data/public/images/noimage/small.jpg +0 -0
- data/public/images/red_button_bg.png +0 -0
- data/public/images/remove_comparable.png +0 -0
- data/public/images/search_button.png +0 -0
- data/public/images/search_textinput.png +0 -0
- data/public/images/search_textinput_active.png +0 -0
- data/public/images/star.png +0 -0
- data/public/images/star_orange.png +0 -0
- data/public/images/star_white.png +0 -0
- data/public/images/table_th1_34.png +0 -0
- data/public/images/twitter_32.png +0 -0
- data/public/images/vkontakte_32.png +0 -0
- data/public/images/zoom.png +0 -0
- data/public/javascripts/jquery.tools.min.js +23 -0
- data/public/javascripts/product.js +64 -0
- data/public/javascripts/product_simple.js +54 -0
- data/public/stylesheets/style.css +965 -0
- data/spec/spec_helper.rb +30 -0
- data/synergy_default_theme.gemspec +23 -0
- metadata +177 -0
@@ -0,0 +1,45 @@
|
|
1
|
+
<%= form_for(@order, :url => update_cart_path, :html=>{:id=>'updatecart'}, :remote => true) do |order_form| %>
|
2
|
+
<%= hook :inside_cart_form do %>
|
3
|
+
|
4
|
+
<%= hook :cart_items do %>
|
5
|
+
<%= render :partial => 'form', :locals => {:order_form => order_form} %>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<% if Spree::AdvancedCart::Config[:enable_coupon_applying] %>
|
9
|
+
<table id="order-charges">
|
10
|
+
<tbody>
|
11
|
+
<% @order.adjustments.each do |adjustment| %>
|
12
|
+
<tr>
|
13
|
+
<td><strong><%= adjustment.label %></strong></td>
|
14
|
+
<td class="total"><span><%= number_to_currency adjustment.amount %></span></td>
|
15
|
+
</tr>
|
16
|
+
<% end %>
|
17
|
+
</tbody>
|
18
|
+
</table>
|
19
|
+
|
20
|
+
<div id="applying_coupon">
|
21
|
+
<h3><%= t(:apply_coupon) %></h3>
|
22
|
+
<label><%= t(:coupon_code) %></label>
|
23
|
+
<%= order_form.text_field :coupon_code, :size => 19 %>
|
24
|
+
<span class="ajax_loader"><%= image_tag 'ajax_loader.gif', :alt => t('loading') %></span>
|
25
|
+
<%= order_form.submit t("apply") %>
|
26
|
+
</div>
|
27
|
+
<% end %>
|
28
|
+
|
29
|
+
<div id="subtotal">
|
30
|
+
<%= hook :advanced_cart_subtotal do %>
|
31
|
+
<h3><%= "#{t("subtotal")}: #{order_price(@order)}" %></h3>
|
32
|
+
<% if Spree::AdvancedCart::Config[:enable_coupon_applying] %>
|
33
|
+
<h3><%= "#{t("total")}: #{number_to_currency @order.total}" %></h3>
|
34
|
+
<% end %>
|
35
|
+
<% end %>
|
36
|
+
<%= hook :advanced_cart_subtotal_links do %>
|
37
|
+
<div class="links">
|
38
|
+
<%= link_to image_tag('/images/update.png') + t("recalculate"), '#', :class => 'button checkout primary', :onclick => "$('form#updatecart').submit(); return false;" %>
|
39
|
+
<%= link_to image_tag('/images/checkout.png') + t("checkout"), checkout_path, :class => 'button checkout primary' %>
|
40
|
+
</div>
|
41
|
+
<% end %>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
<% end %>
|
45
|
+
<% end %>
|
@@ -0,0 +1,59 @@
|
|
1
|
+
<%= form_for :order, :url => populate_orders_url do |f| %>
|
2
|
+
<%= hook :inside_product_cart_form do %>
|
3
|
+
<div id="cart_wrapper">
|
4
|
+
|
5
|
+
<% if product_price(@product) %>
|
6
|
+
<%= hook :product_price do %>
|
7
|
+
<p class="prices">
|
8
|
+
<span class="price selling"><%= product_price(@product) %></span>
|
9
|
+
</p>
|
10
|
+
<% end %>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<% if @product.has_variants? %>
|
14
|
+
<div id="product-variants">
|
15
|
+
<% if defined?(SpreeEnhancedOptionTypes) %>
|
16
|
+
<%= render :partial => (Spree::Config[:eot_presentation_type] || 'radio_sets'), :locals => {:f => f} %>
|
17
|
+
<% else %>
|
18
|
+
<h2><%= t('variants') %></h2>
|
19
|
+
<ul>
|
20
|
+
<% has_checked = false
|
21
|
+
@product.variants.active.each_with_index do |v,index|
|
22
|
+
next if v.option_values.empty? || (!v.in_stock && !Spree::Config[:show_zero_stock_products])
|
23
|
+
checked = !has_checked && (v.in_stock || Spree::Config[:allow_backorders])
|
24
|
+
has_checked = true if checked %>
|
25
|
+
<li>
|
26
|
+
<label>
|
27
|
+
<%= radio_button_tag "products[#{@product.id}]", v.id, checked, :disabled => !v.in_stock && !Spree::Config[:allow_backorders] %>
|
28
|
+
<span class="variant-description">
|
29
|
+
<%= variant_options v %>
|
30
|
+
</span>
|
31
|
+
<% if variant_price_diff v %>
|
32
|
+
<span class="price diff"><%= variant_price_diff v %></span>
|
33
|
+
<% end %>
|
34
|
+
</label>
|
35
|
+
</li>
|
36
|
+
<% end%>
|
37
|
+
</ul>
|
38
|
+
<% end %>
|
39
|
+
</div>
|
40
|
+
<% end%>
|
41
|
+
<% if @product.has_stock? || Spree::Config[:allow_backorders] %>
|
42
|
+
<%= hidden_field_tag (@product.has_variants? ? :quantity : "variants[#{@product.master.id}]"),
|
43
|
+
1, :class => "title", :size => 3 %>
|
44
|
+
|
45
|
+
<button type='submit' class='add-to-cart'>
|
46
|
+
<%= t('add_to_cart') %>
|
47
|
+
</button>
|
48
|
+
<% else %>
|
49
|
+
<%= content_tag('strong', t('out_of_stock')) %>
|
50
|
+
<% end %>
|
51
|
+
|
52
|
+
</div>
|
53
|
+
|
54
|
+
<% end %>
|
55
|
+
<% end %>
|
56
|
+
|
57
|
+
<% content_for :head do %>
|
58
|
+
<%= javascript_include_tag 'product' %>
|
59
|
+
<% end %>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<%
|
2
|
+
js_ov_to_variant_map = {}
|
3
|
+
variant_attributes_hash = {}
|
4
|
+
|
5
|
+
ov_to_variant_map(@product).each_pair do |k,v|
|
6
|
+
js_ov_to_variant_map[k.join(',')] = v.id
|
7
|
+
variant_attributes_hash[v.id] = v.attributes.merge(:on_hand => v.on_hand, :description => variant_options(v))
|
8
|
+
end
|
9
|
+
|
10
|
+
%>
|
11
|
+
<script type="text/javascript">
|
12
|
+
// set of all possible combination of option values
|
13
|
+
var ov_combinations = <%= ov_combinations.to_json.html_safe %>;
|
14
|
+
// maps variant attributes to variant id
|
15
|
+
var ov_to_variant = <%= js_ov_to_variant_map.to_json.html_safe %>;
|
16
|
+
// mapping from variant id to variant attributes
|
17
|
+
var variant_attributes = <%= variant_attributes_hash.to_json.html_safe %>;
|
18
|
+
|
19
|
+
var default_variant_id = <%= @product.default_variant.id %>;
|
20
|
+
</script>
|
21
|
+
<%#
|
22
|
+
WARNING! This scripts are inlined here on purpose! for ease of embeding and customization.
|
23
|
+
If you plan to extract them and put them into header, don't.
|
24
|
+
And if you really really really want to please make sure they are wrapped into
|
25
|
+
document ready event (it's not needed here as we put script AFTER everything we need is in DOM and loaded)
|
26
|
+
%>
|
27
|
+
<%= javascript_include_tag('enhanced-option-types.js') %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<% unless @product_properties.empty? %>
|
2
|
+
<h3>Характеристики:</h3>
|
3
|
+
|
4
|
+
<table id="product-properties" class="table-display">
|
5
|
+
<% for product_property in @product_properties %>
|
6
|
+
<tr class="property-row <%= cycle 'odd', 'even' %>">
|
7
|
+
<td class="property-type"><%= product_property.property.presentation %></td>
|
8
|
+
<td class="property-value"><%= product_property.value %></td>
|
9
|
+
</tr>
|
10
|
+
<% end %>
|
11
|
+
</table>
|
12
|
+
<% end %>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<!-- no need for thumnails unless there is more then one image -->
|
2
|
+
<% if product.images.size > 1 %>
|
3
|
+
<ul id="product-thumbnails" class="thumbnails">
|
4
|
+
<% product.images.each do |i| %>
|
5
|
+
<li><%= link_to(image_tag(i.attachment.url(:mini)), i.attachment.url(:product), :large => i.attachment.url(:large)) %></li>
|
6
|
+
<% end %>
|
7
|
+
</ul>
|
8
|
+
<% end %>
|
9
|
+
|
10
|
+
<% if @product.has_variants?
|
11
|
+
has_checked = false %>
|
12
|
+
<ul id="variant-thumbnails" class="thumbnails">
|
13
|
+
<% @variants.each do |v|
|
14
|
+
checked = !has_checked && (v.available?)
|
15
|
+
has_checked = true if checked
|
16
|
+
|
17
|
+
if checked
|
18
|
+
v.images.each do |i| %>
|
19
|
+
<li><%= link_to(image_tag(i.attachment.url(:mini)), i.attachment.url(:product), :large => i.attachment.url(:large)) %></li>
|
20
|
+
<% end %>
|
21
|
+
<% end %>
|
22
|
+
<% end %>
|
23
|
+
</ul>
|
24
|
+
<% end %>
|
25
|
+
|
26
|
+
<% content_for :head do %>
|
27
|
+
<script type="text/javascript" charset="utf-8">
|
28
|
+
var images = new Array();
|
29
|
+
<% @variants.each do |v| %>
|
30
|
+
images[<%= v.id.to_s %>] = new Array();
|
31
|
+
<% v.images.each_with_index do |image, i| %>
|
32
|
+
images[<%= v.id.to_s %>][<%= i %>] = <%== link_to(image_tag(image.attachment.url(:mini)), image.attachment.url(:product), :large => image.attachment.url(:large)).to_json %>;
|
33
|
+
<% end %>
|
34
|
+
<% end %>
|
35
|
+
</script>
|
36
|
+
<% end %>
|
@@ -0,0 +1,146 @@
|
|
1
|
+
<% content_for :sidebar do %>
|
2
|
+
<%= hook :taxon_sidebar_navigation do %>
|
3
|
+
<%= render :partial => "shared/taxonomies" %>
|
4
|
+
<% end %>
|
5
|
+
<% end %>
|
6
|
+
<script type="text/javascript">
|
7
|
+
$(function() {
|
8
|
+
<% if defined?(SpreeReviews) %>
|
9
|
+
|
10
|
+
$('#description_add_review_link').click(function() {
|
11
|
+
show_add_review_container();
|
12
|
+
$('#add_review_link').slideUp();
|
13
|
+
});
|
14
|
+
|
15
|
+
$('#add_review_link').click(function(e) {
|
16
|
+
show_add_review_container();
|
17
|
+
$(this).slideUp();
|
18
|
+
e.preventDefault();
|
19
|
+
});
|
20
|
+
<% end %>
|
21
|
+
|
22
|
+
add_image_handlers();
|
23
|
+
});
|
24
|
+
|
25
|
+
function show_add_review_container() {
|
26
|
+
$('#add_review_container').slideDown();
|
27
|
+
}
|
28
|
+
|
29
|
+
</script>
|
30
|
+
<% @body_id = 'product-details' %>
|
31
|
+
|
32
|
+
<h1><%= @product.name %></h1>
|
33
|
+
<div id="product-show">
|
34
|
+
<div id="product-images">
|
35
|
+
<%= hook :product_images do %>
|
36
|
+
<div id="main-image">
|
37
|
+
<%= render 'image' %>
|
38
|
+
</div>
|
39
|
+
<% if @product.images.any? %>
|
40
|
+
<div class="simple_overlay" id="large_image_overlay" style="display: none;">
|
41
|
+
<div class="overlay_container">
|
42
|
+
<div class="large_image" style="width: <%= large_sizes[:width] %>px; height: <%= large_sizes[:height] %>px">
|
43
|
+
<img src="<%= @product.images.first.attachment.url(:large) %>"/>
|
44
|
+
</div>
|
45
|
+
<div class="thumbs_gallery">
|
46
|
+
<ul></ul>
|
47
|
+
</div>
|
48
|
+
</div>
|
49
|
+
</div>
|
50
|
+
<% end %>
|
51
|
+
|
52
|
+
<% end %>
|
53
|
+
|
54
|
+
<div id="product-variants-container">
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<div id="product-description">
|
59
|
+
<%= hook :cart_form do %>
|
60
|
+
<div id="cart-form">
|
61
|
+
<%= render 'cart_form' %>
|
62
|
+
</div>
|
63
|
+
<% end %>
|
64
|
+
|
65
|
+
<div id="product_description_menu">
|
66
|
+
<table cellpadding="0" cellspacing="0" style="width: 300px">
|
67
|
+
<% if defined?(SpreeReviews) %>
|
68
|
+
<tr>
|
69
|
+
<td><%= render 'shared/rating', :product => @product %></td>
|
70
|
+
<td><a href="#reviews_anc">Отзывы (<%= @product.reviews.approved.count %>)</a></td>
|
71
|
+
</tr>
|
72
|
+
<% end %>
|
73
|
+
<tr>
|
74
|
+
<% if defined?(SpreeCompareProducts) %>
|
75
|
+
<td><%= render 'compare' if @comparable_products %></td>
|
76
|
+
<% end %>
|
77
|
+
<% if defined?(SpreeReviews) %>
|
78
|
+
<td><a id="description_add_review_link" href="#reviews_anc">Добавить отзыв</a></td>
|
79
|
+
<% end %>
|
80
|
+
</tr>
|
81
|
+
</table>
|
82
|
+
</div>
|
83
|
+
|
84
|
+
<%= render :partial => 'shared/like_buttons' %>
|
85
|
+
|
86
|
+
<div id="thumbnails">
|
87
|
+
<%= render 'thumbnails', :product => @product %>
|
88
|
+
</div>
|
89
|
+
|
90
|
+
</div>
|
91
|
+
</div>
|
92
|
+
<div style="clear: left"></div>
|
93
|
+
<div id="product_description">
|
94
|
+
<%= hook :product_description do %>
|
95
|
+
<h3>Описание:</h3>
|
96
|
+
|
97
|
+
<div class="description-content">
|
98
|
+
<% if @product.description %>
|
99
|
+
<%= product_description(@product) %>
|
100
|
+
<% else %>
|
101
|
+
<%= t("product_has_no_description") %>
|
102
|
+
<% end %>
|
103
|
+
</div>
|
104
|
+
<% end %>
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<div id="product_parameters">
|
108
|
+
<%= hook :product_properties do %>
|
109
|
+
<%= render 'properties' %>
|
110
|
+
<% end %>
|
111
|
+
</div>
|
112
|
+
|
113
|
+
<% if defined?(RecentlyViewedConfiguration) && get_recently_viewed_products.count > 1 %>
|
114
|
+
<div id="recently_viewed">
|
115
|
+
<h3>Вы недавно смотрели:</h3>
|
116
|
+
|
117
|
+
<ul class="similar_product_list">
|
118
|
+
<% get_recently_viewed_products.each do |p| %>
|
119
|
+
<% next if p.id == @product.id %>
|
120
|
+
<li>
|
121
|
+
<div class="similar_product_image_container">
|
122
|
+
<%= small_image(p) %>
|
123
|
+
</div>
|
124
|
+
<div>
|
125
|
+
<div><%= link_to p.name, p %></div>
|
126
|
+
<div><%= render 'shared/rating', :product => p if defined?(SpreeReviews) %></div>
|
127
|
+
<div class="similar_product_price"><%= product_price(p) %></div>
|
128
|
+
</div>
|
129
|
+
</li>
|
130
|
+
<% end %>
|
131
|
+
</ul>
|
132
|
+
</div>
|
133
|
+
<% end %>
|
134
|
+
|
135
|
+
<% unless defined?(SpreeEnhancedOptionTypes) %>
|
136
|
+
<%= javascript_include_tag 'product_simple' %>
|
137
|
+
<% else %>
|
138
|
+
<script type="text/javascript">
|
139
|
+
$(function() {
|
140
|
+
variant_changed(default_variant_id);
|
141
|
+
});
|
142
|
+
</script>
|
143
|
+
<% end %>
|
144
|
+
|
145
|
+
<%= render 'taxons' %>
|
146
|
+
<%= render 'shared/reviews' if defined?(SpreeReviews) %>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<% if Spree::Config[:vkontakte_app_id] %>
|
2
|
+
<div id="product_like_buttons">
|
3
|
+
<% content_for :head do %>
|
4
|
+
<style>
|
5
|
+
#vk_like {
|
6
|
+
display: inline-block !important;
|
7
|
+
clear: none !important;
|
8
|
+
width: 173px !important;
|
9
|
+
}
|
10
|
+
</style>
|
11
|
+
<% end %>
|
12
|
+
<!-- Put this script tag to the <head> of your page -->
|
13
|
+
<script type="text/javascript" src="http://userapi.com/js/api/openapi.js?25"></script>
|
14
|
+
|
15
|
+
<script type="text/javascript">
|
16
|
+
VK.init({apiId: <%= Spree::Config[:vkontakte_app_id] %>, onlyWidgets: true});
|
17
|
+
</script>
|
18
|
+
|
19
|
+
<!-- Put this div tag to the place, where the Like block will be -->
|
20
|
+
<div id="vk_like" style=""></div>
|
21
|
+
<script type="text/javascript">
|
22
|
+
VK.Widgets.Like("vk_like", {type: "button"});
|
23
|
+
</script>
|
24
|
+
|
25
|
+
<iframe src="http://www.facebook.com/plugins/like.php?href=<%= CGI::escape(request.url) %>&send=false&layout=button_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:150px; height:21px;" allowTransparency="true"></iframe>
|
26
|
+
</div>
|
27
|
+
<% end %>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<% if current_user %>
|
2
|
+
Добро пожаловать, <%= link_to current_user.email, account_path %>!
|
3
|
+
<%= link_to t('logout'), destroy_user_session_path, {:id => 'log_out_link'} %>
|
4
|
+
<% else %>
|
5
|
+
Добро пожаловать, <%= link_to t('log_in'), login_path, {:id => 'log_in_link', :rel => '#login_overlay'} %>.
|
6
|
+
<div class="simple_overlay" id="login_overlay" style="display: none">
|
7
|
+
<% if defined?(SpreeSocial) %>
|
8
|
+
<div class="login_social_bar">
|
9
|
+
<div style="margin: 6px 0">Войти в магазин с помощью:</div>
|
10
|
+
<div style="margin: 6px 0">
|
11
|
+
<%= image_tag 'twitter_32.png' %>
|
12
|
+
<%= image_tag 'vkontakte_32.png' %>
|
13
|
+
<%= image_tag 'facebook_32.png' %>
|
14
|
+
<%= image_tag 'google_32.png' %>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
18
|
+
<div class="login_link_bar">
|
19
|
+
<div style="padding: 6px 0"><%= link_to t("create_a_new_account"), signup_path %></div>
|
20
|
+
<div style="padding: 6px 0"><%= link_to t("forgot_password"), new_user_password_path %></div>
|
21
|
+
</div>
|
22
|
+
<div class="login_form_bar">
|
23
|
+
<%= render :partial => "shared/login" %>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
<% end %>
|
@@ -0,0 +1,50 @@
|
|
1
|
+
<table id="order_details" class="index">
|
2
|
+
<tbody id='line-items'>
|
3
|
+
<tr>
|
4
|
+
<%= hook :order_details_line_items_headers do %>
|
5
|
+
<th><%= t('item_description') %></th>
|
6
|
+
<th class="price"><%= t('price') %></th>
|
7
|
+
<th class="qty"><%= t('qty') %></th>
|
8
|
+
<th class="total"><span><%= t('total') %></span></th>
|
9
|
+
<% end %>
|
10
|
+
</tr>
|
11
|
+
|
12
|
+
<% @order.line_items.each do |item| %>
|
13
|
+
<tr>
|
14
|
+
<%- locals = {:item => item} %>
|
15
|
+
<%= hook :order_details_line_item_row, locals do %>
|
16
|
+
<td width="300"><%=item.variant.product.name%> <%= "(" + variant_options(item.variant) + ")" unless item.variant .option_values.empty? %></td>
|
17
|
+
<td class="price"><%= number_to_currency item.price %></td>
|
18
|
+
<td class="qty"><%=item.quantity%></td>
|
19
|
+
<td class="total"><span><%= number_to_currency (item.price * item.quantity)%></span></td>
|
20
|
+
<% end %>
|
21
|
+
</tr>
|
22
|
+
<% end %>
|
23
|
+
</tbody>
|
24
|
+
<%= hook :order_details_subtotal do %>
|
25
|
+
<tbody id='subtotal'>
|
26
|
+
<tr class="total" id="subtotal-row">
|
27
|
+
<td colspan="3"><b><%= t('subtotal') %>:</b></td>
|
28
|
+
<td class="total"><span><%= number_to_currency @order.item_total %></span></td>
|
29
|
+
</tr>
|
30
|
+
</tbody>
|
31
|
+
<% end %>
|
32
|
+
<%= hook :order_details_adjustments do %>
|
33
|
+
<tbody id="order-charges">
|
34
|
+
<% @order.adjustments.each do |adjustment| %>
|
35
|
+
<tr class="total">
|
36
|
+
<td colspan="3"><strong><%= adjustment.label %></strong></td>
|
37
|
+
<td class="total"><span><%= number_to_currency adjustment.amount %></span></td>
|
38
|
+
</tr>
|
39
|
+
<% end %>
|
40
|
+
</tbody>
|
41
|
+
<% end %>
|
42
|
+
<%= hook :order_details_total do %>
|
43
|
+
<tbody id='order-total'>
|
44
|
+
<tr class="total">
|
45
|
+
<td colspan="3"><b><%= t('order_total') %>:</b></td>
|
46
|
+
<td class="total"><span id="order_total"><%= number_to_currency @order.total %></span></td>
|
47
|
+
</tr>
|
48
|
+
</tbody>
|
49
|
+
<% end %>
|
50
|
+
</table>
|