spree_core 1.1.3 → 1.1.4
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/app/assets/images/noimage/large.png +0 -0
- data/app/assets/javascripts/admin/admin.js.erb +14 -14
- data/app/assets/javascripts/admin/checkouts/edit.js +1 -1
- data/app/assets/javascripts/admin/spree_core.js +0 -2
- data/app/assets/javascripts/store/checkout.js +2 -2
- data/app/assets/stylesheets/store/screen.css.scss +1 -1
- data/app/controllers/spree/admin/images_controller.rb +5 -13
- data/app/controllers/spree/admin/mail_methods_controller.rb +7 -0
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +1 -1
- data/app/controllers/spree/admin/payment_methods_controller.rb +7 -1
- data/app/controllers/spree/admin/products_controller.rb +5 -13
- data/app/controllers/spree/admin/prototypes_controller.rb +2 -2
- data/app/controllers/spree/checkout_controller.rb +10 -0
- data/app/controllers/spree/orders_controller.rb +9 -5
- data/app/helpers/spree/base_helper.rb +17 -4
- data/app/helpers/spree/checkout_helper.rb +1 -9
- data/app/helpers/spree/products_helper.rb +0 -4
- data/app/models/spree/address.rb +1 -1
- data/app/models/spree/app_configuration.rb +1 -0
- data/app/models/spree/calculator/price_sack.rb +5 -3
- data/app/models/spree/image.rb +3 -1
- data/app/models/spree/inventory_unit.rb +8 -6
- data/app/models/spree/line_item.rb +2 -1
- data/app/models/spree/order.rb +23 -2
- data/app/models/spree/payment/processing.rb +22 -20
- data/app/models/spree/preferences/preferable_class_methods.rb +2 -0
- data/app/models/spree/preferences/store.rb +20 -2
- data/app/models/spree/product.rb +35 -29
- data/app/models/spree/product/scopes.rb +21 -6
- data/app/models/spree/return_authorization.rb +1 -0
- data/app/models/spree/shipping_method.rb +3 -0
- data/app/models/spree/variant.rb +19 -9
- data/app/views/spree/admin/images/_form.html.erb +4 -8
- data/app/views/spree/admin/return_authorizations/_form.html.erb +17 -33
- data/app/views/spree/admin/shared/_head.html.erb +2 -15
- data/app/views/spree/admin/shared/_order_details.html.erb +1 -1
- data/app/views/spree/admin/shared/_routes.html.erb +8 -0
- data/app/views/spree/admin/shared/_translations.html.erb +17 -0
- data/app/views/spree/admin/tax_rates/index.html.erb +2 -2
- data/app/views/spree/admin/variants/_form.html.erb +2 -2
- data/app/views/spree/checkout/payment/_gateway.html.erb +1 -1
- data/app/views/spree/order_mailer/cancel_email.text.erb +5 -5
- data/app/views/spree/order_mailer/confirm_email.text.erb +7 -6
- data/app/views/spree/products/_thumbnails.html.erb +1 -1
- data/app/views/spree/shared/_google_analytics.html.erb +17 -16
- data/app/views/spree/shared/_head.html.erb +0 -3
- data/app/views/spree/shared/_order_details.html.erb +2 -3
- data/app/views/spree/shipment_mailer/shipped_email.text.erb +7 -7
- data/config/initializers/check_for_orphaned_preferences.rb +1 -1
- data/config/initializers/rails_5868.rb +8 -0
- data/config/locales/en.yml +17 -0
- data/config/routes.rb +7 -0
- data/db/migrate/20121017010007_remove_not_null_constraint_from_products_on_hand.rb +11 -0
- data/lib/generators/spree/dummy/dummy_generator.rb +1 -1
- data/lib/generators/spree/dummy/templates/rails/database.yml +1 -1
- data/lib/generators/spree/install/templates/app/assets/javascripts/admin/all.js +2 -0
- data/lib/spree/core/mail_settings.rb +2 -1
- data/lib/spree/core/search/base.rb +5 -2
- data/lib/spree/core/testing_support/factories/tax_category_factory.rb +5 -2
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/product_filters.rb +1 -1
- metadata +41 -42
- data/app/helpers/spree/account_helper.rb +0 -4
- data/app/helpers/spree/orders_helper.rb +0 -5
- data/app/helpers/spree/trackers_helper.rb +0 -4
- data/config/initializers/workarounds_for_ruby19.rb +0 -72
- data/lib/spree/core/relation_serialization.rb +0 -9
- data/lib/spree/core/testing_support/env.rb +0 -2
@@ -20,8 +20,8 @@
|
|
20
20
|
<% elsif units.select(&:shipped?).empty? %>
|
21
21
|
0
|
22
22
|
<% else %>
|
23
|
-
<%=
|
24
|
-
@return_authorization.inventory_units.group_by(&:variant)[variant].try(:size) || 0, {:style => 'width:
|
23
|
+
<%= number_field_tag "return_quantity[#{variant.id}]",
|
24
|
+
@return_authorization.inventory_units.group_by(&:variant)[variant].try(:size) || 0, {:style => 'width:50px;', :min => 0} %>
|
25
25
|
<% end %>
|
26
26
|
</td>
|
27
27
|
</tr>
|
@@ -33,7 +33,7 @@
|
|
33
33
|
<% if @return_authorization.received? %>
|
34
34
|
<%= number_to_currency @return_authorization.amount %>
|
35
35
|
<% else %>
|
36
|
-
<%= f.text_field :amount, {:style => 'width:80px;'} %> <%= t(:rma_value) %>: <span id="rma_value"
|
36
|
+
<%= f.text_field :amount, {:style => 'width:80px;'} %> <%= t(:rma_value) %>: <span id="rma_value">0.00</span>
|
37
37
|
<%= f.error_message_on :amount %>
|
38
38
|
<% end %>
|
39
39
|
<% end %>
|
@@ -45,35 +45,19 @@
|
|
45
45
|
<% end %>
|
46
46
|
|
47
47
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
$.each($("td.return_quantity input"), function(i, inpt){
|
59
|
-
var variant_id = $(inpt).attr('id').replace("return_quantity_", "");
|
60
|
-
rma_amount += variant_prices[variant_id] * $(inpt).val()
|
61
|
-
});
|
48
|
+
<script>
|
49
|
+
$(document).ready(function(){
|
50
|
+
var rma_amount = 0;
|
51
|
+
$("td.return_quantity input").on('change', function() {
|
52
|
+
var rma_amount = 0;
|
53
|
+
$.each($("td.return_quantity input"), function(i, input) {
|
54
|
+
var variant_id = $(input).attr('id').replace("return_quantity_", "");
|
55
|
+
rma_amount += variant_prices[variant_id] * $(input).val()
|
56
|
+
});
|
62
57
|
|
63
|
-
|
64
|
-
|
65
|
-
}
|
58
|
+
if(!isNaN(rma_amount)){
|
59
|
+
$("span#rma_value").html(rma_amount.toFixed(2));
|
66
60
|
}
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
$(inpt).delayedObserver(function() {
|
71
|
-
calculate_rma_price();
|
72
|
-
}, 0.5);
|
73
|
-
});
|
74
|
-
|
75
|
-
calculate_rma_price();
|
76
|
-
});
|
77
|
-
<% end -%>
|
78
|
-
<% end %>
|
79
|
-
</div>
|
61
|
+
})
|
62
|
+
});
|
63
|
+
</script>
|
@@ -6,21 +6,8 @@
|
|
6
6
|
<%= stylesheet_link_tag 'admin/all' %>
|
7
7
|
<%= javascript_include_tag 'admin/all' %>
|
8
8
|
|
9
|
-
<%=
|
10
|
-
|
11
|
-
routes: <%== {
|
12
|
-
:product_search => spree.admin_products_path(:format => 'json'),
|
13
|
-
:product_search_basic => spree.admin_products_path(:format => 'json', :json_format => 'basic', :limit => 10),
|
14
|
-
:user_search => spree.admin_users_path(:format => 'json', :limit => 10)
|
15
|
-
}.to_json %>,
|
16
|
-
|
17
|
-
strings: {
|
18
|
-
no_results: '<%== t(:no_results) %>',
|
19
|
-
type_to_search: '<%== t(:type_to_search) %>',
|
20
|
-
searching: '<%== t(:searching) %>'
|
21
|
-
}
|
22
|
-
}
|
23
|
-
<% end %>
|
9
|
+
<%= render "spree/admin/shared/translations" %>
|
10
|
+
<%= render "spree/admin/shared/routes" %>
|
24
11
|
|
25
12
|
<%= javascript_tag do -%>
|
26
13
|
jQuery.alerts.dialogClass = 'spree';
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<% @order.adjustments.eligible.each do |adjustment| %>
|
27
27
|
<% next if (adjustment.originator_type == 'Spree::TaxRate') and (adjustment.amount == 0) %>
|
28
28
|
<tr class="total">
|
29
|
-
<td colspan="3"><strong><%= adjustment.label
|
29
|
+
<td colspan="3"><strong><%= adjustment.label %>:</strong></td>
|
30
30
|
<td class="total"><span><%= number_to_currency adjustment.amount %></span></td>
|
31
31
|
</tr>
|
32
32
|
<% end %>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<script>
|
2
|
+
Spree.routes = <%== {
|
3
|
+
:product_search => spree.admin_products_path(:format => 'json'),
|
4
|
+
:product_search_basic => spree.admin_products_path(:format => 'json', :json_format => 'basic', :limit => 10),
|
5
|
+
:user_search => spree.admin_users_path(:format => 'json', :limit => 10)
|
6
|
+
}.to_json
|
7
|
+
%>
|
8
|
+
</script>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<script>
|
2
|
+
Spree.translations = <%==
|
3
|
+
{ :date_picker => I18n.t(:format,
|
4
|
+
:scope => 'spree.date_picker',
|
5
|
+
:default => 'yy/mm/dd'),
|
6
|
+
:abbr_day_names => I18n.t(:abbr_day_names, :scope => :date),
|
7
|
+
:month_names => I18n.t(:month_names, :scope => :date).delete_if(&:blank?),
|
8
|
+
:previous => I18n.t(:previous),
|
9
|
+
:next => I18n.t(:next),
|
10
|
+
:no_results => I18n.t(:no_results),
|
11
|
+
:type_to_search => I18n.t(:type_to_search),
|
12
|
+
:searching => I18n.t(:searching),
|
13
|
+
:sku => I18n.t(:sku),
|
14
|
+
:on_hand => I18n.t(:on_hand)
|
15
|
+
}.to_json
|
16
|
+
%>
|
17
|
+
</script>
|
@@ -21,8 +21,8 @@
|
|
21
21
|
<tbody>
|
22
22
|
<% @tax_rates.each do |tax_rate|%>
|
23
23
|
<tr id="<%= spree_dom_id tax_rate %>" data-hook="rate_row">
|
24
|
-
<td><%=tax_rate.zone.name %></td>
|
25
|
-
<td><%=tax_rate.tax_category.try(:name) ||
|
24
|
+
<td><%=tax_rate.zone.try(:name) || t(:not_available) %></td>
|
25
|
+
<td><%=tax_rate.tax_category.try(:name) || t(:not_available) %></td>
|
26
26
|
<td><%=tax_rate.amount %></td>
|
27
27
|
<td><%=tax_rate.included_in_price %></td>
|
28
28
|
<td><%=tax_rate.calculator.to_s %></td>
|
@@ -21,10 +21,10 @@
|
|
21
21
|
<%= f.text_field :sku %></p>
|
22
22
|
|
23
23
|
<p data-hook="price"><%= f.label :price, t(:price) %>:<br />
|
24
|
-
<%= f.text_field :price, :value =>
|
24
|
+
<%= f.text_field :price, :value => number_to_currency(@variant.price, :unit => '') %></p>
|
25
25
|
|
26
26
|
<p data-hook="cost_price"><%= f.label :cost_price, t(:cost_price) %>:<br />
|
27
|
-
<%= f.text_field :cost_price, :value =>
|
27
|
+
<%= f.text_field :cost_price, :value => number_to_currency(@variant.cost_price, :unit => '') %></p>
|
28
28
|
|
29
29
|
<% if Spree::Config[:track_inventory_levels] %>
|
30
30
|
<p data-hook="on_hand"><%= f.label :on_hand, t(:on_hand) %>: <br />
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<%= select_year(Date.today, :prefix => param_prefix, :field_name => 'year', :start_year => Date.today.year, :end_year => Date.today.year + 15, :class => 'required') %>
|
20
20
|
<span class="required">*</span>
|
21
21
|
</p>
|
22
|
-
<p class="field" data-hook="
|
22
|
+
<p class="field" data-hook="card_code">
|
23
23
|
<%= label_tag nil, t(:card_code) %><br />
|
24
24
|
<%= text_field_tag "#{param_prefix}[verification_value]", '', options_hash.merge(:id => 'card_code', :class => 'required', :size => 5) %>
|
25
25
|
<span class="required">*</span>
|
@@ -1,16 +1,16 @@
|
|
1
|
-
|
1
|
+
<%= t('order_mailer.cancel_email.dear_customer') %>
|
2
2
|
|
3
|
-
|
3
|
+
<%= t('order_mailer.cancel_email.instructions') %>
|
4
4
|
|
5
5
|
============================================================
|
6
|
-
|
6
|
+
<%= t('order_mailer.cancel_email.order_summary_canceled') %>
|
7
7
|
============================================================
|
8
8
|
<% @order.line_items.each do |item| %>
|
9
9
|
<%= item.variant.sku %> <%= raw(item.variant.product.name) %> <%= raw(item.variant.options_text) -%> (<%=item.quantity%>) @ <%= number_to_currency item.price %> = <%= number_to_currency(item.price * item.quantity) %>
|
10
10
|
<% end %>
|
11
11
|
============================================================
|
12
|
-
|
12
|
+
<%= t('order_mailer.cancel_email.subtotal') %> <%= number_to_currency @order.item_total %>
|
13
13
|
<% @order.adjustments.eligible.each do |adjustment| %>
|
14
14
|
<%= raw(adjustment.label) %> <%= number_to_currency(adjustment.amount) %>
|
15
15
|
<% end %>
|
16
|
-
|
16
|
+
<%= t('order_mailer.cancel_email.total') %> <%= number_to_currency(@order.total) %>
|
@@ -1,19 +1,20 @@
|
|
1
|
-
|
1
|
+
<%= t('order_mailer.confirm_email.dear_customer') %>
|
2
2
|
|
3
|
-
|
3
|
+
<%= t('order_mailer.confirm_email.instructions') %>
|
4
4
|
|
5
5
|
============================================================
|
6
|
-
|
6
|
+
<%= t('order_mailer.confirm_email.order_summary') %>
|
7
7
|
============================================================
|
8
8
|
<% @order.line_items.each do |item| %>
|
9
9
|
<%= item.variant.sku %> <%= raw(item.variant.product.name) %> <%= raw(item.variant.options_text) -%> (<%=item.quantity%>) @ <%= number_to_currency item.price %> = <%= number_to_currency(item.price * item.quantity) %>
|
10
10
|
<% end %>
|
11
11
|
============================================================
|
12
|
-
|
12
|
+
<%= t('order_mailer.confirm_email.subtotal') %>: <%= number_to_currency @order.item_total %>
|
13
|
+
|
13
14
|
<% @order.adjustments.eligible.each do |adjustment| %>
|
14
15
|
<%= raw(adjustment.label) %> <%= number_to_currency(adjustment.amount) %>
|
15
16
|
<% end %>
|
16
|
-
Order Total: <%= number_to_currency(@order.total) %>
|
17
17
|
|
18
|
+
<%= t('order_mailer.confirm_email.total') %>: <%= number_to_currency(@order.total) %>
|
18
19
|
|
19
|
-
|
20
|
+
<%= t('order_mailer.confirm_email.thanks') %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<!-- no need for thumnails unless there is more then one image -->
|
2
|
-
<% if product.images.size > 1 %>
|
2
|
+
<% if product.images.size > 1 || product.variant_images.size > 0 %>
|
3
3
|
<ul id="product-thumbnails" class="thumbnails inline" data-hook>
|
4
4
|
<% product.images.each do |i| %>
|
5
5
|
<li class="tmb-all" id="tmb-<%= i.id.to_s %>"><%= link_to image_tag(i.attachment.url(:mini)), i.attachment.url(:product) %></li>
|
@@ -6,27 +6,28 @@
|
|
6
6
|
_gaq.push(['_trackPageview']);
|
7
7
|
|
8
8
|
<% if flash[:commerce_tracking] %>
|
9
|
-
|
9
|
+
<%# more info: https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiEcommerce %>
|
10
10
|
_gaq.push(['_addTrans',
|
11
|
-
"<%= @order.number %>",
|
12
|
-
"",
|
13
|
-
"<%= @order.total %>",
|
14
|
-
"<%= @order.adjustments.tax.sum(:amount) %>",
|
15
|
-
"<%= @order.adjustments.shipping.sum(:amount) %>"
|
16
|
-
"
|
17
|
-
"
|
18
|
-
"
|
11
|
+
"<%= @order.number %>",
|
12
|
+
"",
|
13
|
+
"<%= @order.total %>",
|
14
|
+
"<%= @order.adjustments.tax.sum(:amount) %>",
|
15
|
+
"<%= @order.adjustments.shipping.sum(:amount) %>",
|
16
|
+
"<%= @order.bill_address.city %>",
|
17
|
+
"<%= @order.bill_address.state_text %>",
|
18
|
+
"<%= @order.bill_address.country.name %>"
|
19
19
|
]);
|
20
20
|
<% @order.line_items.each do |line_item| %>
|
21
21
|
_gaq.push(['_addItem',
|
22
|
-
"<%= @order.number %>",
|
23
|
-
"<%= line_item.variant.sku %>",
|
24
|
-
"<%= line_item.variant.product.name %>"
|
25
|
-
"",
|
26
|
-
"<%= line_item.price %>",
|
27
|
-
"<%= line_item.quantity %>"
|
22
|
+
"<%= @order.number %>",
|
23
|
+
"<%= line_item.variant.sku %>",
|
24
|
+
"<%= line_item.variant.product.name %>",
|
25
|
+
"",
|
26
|
+
"<%= line_item.price %>",
|
27
|
+
"<%= line_item.quantity %>"
|
28
28
|
]);
|
29
29
|
<% end %>
|
30
|
+
_gaq.push(['_trackTrans']);
|
30
31
|
<% end %>
|
31
32
|
|
32
33
|
(function() {
|
@@ -35,4 +36,4 @@
|
|
35
36
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
36
37
|
})();
|
37
38
|
<% end %>
|
38
|
-
<% end %>
|
39
|
+
<% end %>
|
@@ -1,8 +1,5 @@
|
|
1
1
|
<meta charset="utf-8">
|
2
2
|
|
3
|
-
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
|
4
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
5
|
-
|
6
3
|
<title><%= title %></title>
|
7
4
|
|
8
5
|
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
@@ -1,5 +1,4 @@
|
|
1
1
|
<div class="row steps-data">
|
2
|
-
|
3
2
|
<div class="columns alpha four">
|
4
3
|
<h6><%= t(:shipping_address) %> <%= link_to "(#{t(:edit)})", checkout_state_path(:address) unless @order.completed? %></h6>
|
5
4
|
<div class="address">
|
@@ -71,7 +70,7 @@
|
|
71
70
|
<td data-hook="order_item_description">
|
72
71
|
<h4><%= item.variant.product.name %></h4>
|
73
72
|
<%= truncate(item.variant.product.description, :length => 100, :omission => "...") %>
|
74
|
-
<%= "(" +
|
73
|
+
<%= "(" + item.variant.options_text + ")" unless item.variant.option_values.empty? %>
|
75
74
|
</td>
|
76
75
|
<td data-hook="order_item_price" class="price"><span><%= number_to_currency item.price %></span></td>
|
77
76
|
<td data-hook="order_item_qty"><%= item.quantity %></td>
|
@@ -110,4 +109,4 @@
|
|
110
109
|
</tr>
|
111
110
|
<% end %>
|
112
111
|
</tfoot>
|
113
|
-
</table>
|
112
|
+
</table>
|
@@ -1,15 +1,15 @@
|
|
1
|
-
|
1
|
+
<%= t('shipment_mailer.shipped_email.dear_customer') %>
|
2
2
|
|
3
|
-
|
3
|
+
<%= t('shipment_mailer.shipped_email.instructions') %>
|
4
4
|
|
5
5
|
============================================================
|
6
|
-
|
6
|
+
<%= t('shipment_mailer.shipped_email.shipment_summary') %>
|
7
7
|
============================================================
|
8
|
-
<% @shipment.
|
9
|
-
<%= item.variant.sku %> <%= item.variant.product.name %> <%= variant_options(item.variant) %> (<%= item.quantity %>)
|
8
|
+
<% @shipment.manifest.each do |item| %>
|
9
|
+
<%= item.variant.sku %> <%= item.variant.product.name %> <%= variant_options(item.variant) %> (<%= item.quantity %>)
|
10
10
|
<% end %>
|
11
11
|
============================================================
|
12
12
|
|
13
|
-
<%=
|
13
|
+
<%= t('shipment_mailer.shipped_email.track_information', :tracking => @shipment.tracking) if @shipment.tracking %>
|
14
14
|
|
15
|
-
|
15
|
+
<%= t('shipment_mailer.shipped_email.thanks') %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
begin
|
2
|
-
ActiveRecord::Base.connection.execute("
|
2
|
+
ActiveRecord::Base.connection.execute("SELECT owner_id, owner_type, name, value FROM spree_preferences WHERE 'key' IS NULL").each do |pref|
|
3
3
|
warn "[WARNING] Orphaned preference `#{pref[2]}` with value `#{pref[3]}` for #{pref[1]} with id of: #{pref[0]}, you should reset the preference value manually."
|
4
4
|
end
|
5
5
|
rescue
|
data/config/locales/en.yml
CHANGED
@@ -603,8 +603,19 @@ en:
|
|
603
603
|
order_mailer:
|
604
604
|
confirm_email:
|
605
605
|
subject: "Order Confirmation"
|
606
|
+
dear_customer: "Dear Customer,"
|
607
|
+
instructions: "Please review and retain the following order information for your records."
|
608
|
+
order_summary: "Order Summary"
|
609
|
+
subtotal: "Subtotal:"
|
610
|
+
total: "Order Total:"
|
611
|
+
thanks: "Thank you for your business."
|
606
612
|
cancel_email:
|
607
613
|
subject: "Cancellation of Order"
|
614
|
+
dear_customer: "Dear Customer,"
|
615
|
+
instructions: "Your order has been CANCELED. Please retain this cancellation information for your records."
|
616
|
+
order_summary_canceled: "Order Summary [CANCELED]"
|
617
|
+
subtotal: "Subtotal:"
|
618
|
+
total: "Order Total:"
|
608
619
|
order_not_in_system: That order number is not valid on this site.
|
609
620
|
order_number: Order
|
610
621
|
order_operation_authorize: Authorize
|
@@ -679,6 +690,7 @@ en:
|
|
679
690
|
please_create_user: "Please create a user account"
|
680
691
|
please_define_payment_methods: "Please define some payment methods first."
|
681
692
|
powered_by: "Powered by"
|
693
|
+
populate_get_error: "Something went wrong. Please try adding the item again."
|
682
694
|
presentation: Presentation
|
683
695
|
preview: Preview
|
684
696
|
previous: Previous
|
@@ -892,6 +904,11 @@ en:
|
|
892
904
|
shipment_mailer:
|
893
905
|
shipped_email:
|
894
906
|
subject: "Shipment Notification"
|
907
|
+
dear_customer: "Dear Customer,"
|
908
|
+
instructions: "Your order has been shipped"
|
909
|
+
shipment_summary: "Shipment Summary"
|
910
|
+
track_information: "Tracking Information: %{tracking}"
|
911
|
+
thanks: "Thank you for your business."
|
895
912
|
shipment_number: "Shipment #"
|
896
913
|
shipment_state: Shipment State
|
897
914
|
shipment_states:
|
data/config/routes.rb
CHANGED
@@ -15,6 +15,13 @@ Spree::Core::Engine.routes.draw do
|
|
15
15
|
match '/checkout/:state', :to => 'checkout#edit', :as => :checkout_state, :via => :get
|
16
16
|
match '/checkout', :to => 'checkout#edit', :state => 'address', :as => :checkout, :via => :get
|
17
17
|
|
18
|
+
populate_redirect = redirect do |params, request|
|
19
|
+
request.flash[:error] = I18n.t(:populate_get_error)
|
20
|
+
request.referer || '/cart'
|
21
|
+
end
|
22
|
+
|
23
|
+
get '/orders/populate', :via => :get, :to => populate_redirect
|
24
|
+
|
18
25
|
resources :orders do
|
19
26
|
post :populate, :on => :collection
|
20
27
|
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class RemoveNotNullConstraintFromProductsOnHand < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
change_column :spree_products, :count_on_hand, :integer, :null => true
|
4
|
+
change_column :spree_variants, :count_on_hand, :integer, :null => true
|
5
|
+
end
|
6
|
+
|
7
|
+
def down
|
8
|
+
change_column :spree_products, :count_on_hand, :integer, :null => false
|
9
|
+
change_column :spree_variants, :count_on_hand, :integer, :null => false
|
10
|
+
end
|
11
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require "rails/generators/rails/app/app_generator"
|
2
2
|
|
3
3
|
module Spree
|
4
|
-
class DummyGenerator
|
4
|
+
class DummyGenerator < Rails::Generators::Base
|
5
5
|
desc "Creates blank Rails application, installs Spree and all sample data"
|
6
6
|
|
7
7
|
class_option :lib_name, :default => ''
|
@@ -4,6 +4,8 @@
|
|
4
4
|
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
5
5
|
// the compiled file.
|
6
6
|
//
|
7
|
+
//= require jquery
|
8
|
+
//= require jquery_ujs
|
7
9
|
<% if options[:lib_name] == 'spree' %>
|
8
10
|
//= require admin/spree_core
|
9
11
|
//= require admin/spree_auth
|