spree_core 2.1.12 → 2.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/helpers/spree/base_helper.rb +4 -7
- data/app/helpers/spree/products_helper.rb +11 -9
- data/app/helpers/spree/store_helper.rb +5 -0
- data/app/models/spree/ability.rb +4 -0
- data/app/models/spree/address.rb +6 -6
- data/app/models/spree/adjustment.rb +40 -61
- data/app/models/spree/app_configuration.rb +1 -14
- data/app/models/spree/calculator.rb +12 -4
- data/app/models/spree/calculator/default_tax.rb +42 -38
- data/app/models/spree/calculator/flat_percent_item_total.rb +2 -4
- data/app/models/spree/calculator/free_shipping.rb +5 -2
- data/app/models/spree/calculator/percent_on_line_item.rb +15 -0
- data/app/models/spree/calculator/percent_per_item.rb +3 -0
- data/app/models/spree/classification.rb +3 -2
- data/app/models/spree/credit_card.rb +7 -25
- data/app/models/spree/gateway/bogus.rb +5 -5
- data/app/models/spree/gateway/bogus_simple.rb +0 -8
- data/app/models/spree/image.rb +0 -9
- data/app/models/spree/inventory_unit.rb +10 -4
- data/app/models/spree/item_adjustments.rb +65 -0
- data/app/models/spree/legacy_user.rb +1 -0
- data/app/models/spree/line_item.rb +33 -13
- data/app/models/spree/option_type.rb +2 -2
- data/app/models/spree/option_value.rb +1 -1
- data/app/models/spree/order.rb +109 -89
- data/app/models/spree/order/checkout.rb +48 -0
- data/app/models/spree/order_contents.rb +72 -37
- data/app/models/spree/order_inventory.rb +65 -68
- data/app/models/spree/order_populator.rb +3 -17
- data/app/models/spree/order_updater.rb +63 -44
- data/app/models/spree/payment.rb +20 -5
- data/app/models/spree/payment/processing.rb +19 -25
- data/app/models/spree/payment_capture_event.rb +9 -0
- data/app/models/spree/payment_method/check.rb +0 -2
- data/app/models/spree/price.rb +1 -1
- data/app/models/spree/product.rb +14 -16
- data/app/models/spree/product/scopes.rb +4 -6
- data/app/models/spree/product_option_type.rb +2 -2
- data/app/models/spree/product_property.rb +2 -2
- data/app/models/spree/promotion.rb +71 -50
- data/app/models/spree/promotion/actions/create_adjustment.rb +31 -32
- data/app/models/spree/promotion/actions/create_item_adjustments.rb +83 -0
- data/app/models/spree/promotion/actions/free_shipping.rb +36 -0
- data/app/models/spree/promotion/rules/first_order.rb +4 -0
- data/app/models/spree/promotion/rules/item_total.rb +5 -1
- data/app/models/spree/promotion/rules/product.rb +4 -0
- data/app/models/spree/promotion/rules/user.rb +5 -6
- data/app/models/spree/promotion/rules/user_logged_in.rb +4 -0
- data/app/models/spree/promotion_action.rb +1 -5
- data/app/models/spree/promotion_handler/cart.rb +38 -0
- data/app/models/spree/promotion_handler/coupon.rb +76 -0
- data/app/models/spree/promotion_handler/free_shipping.rb +31 -0
- data/app/models/spree/promotion_handler/page.rb +24 -0
- data/app/models/spree/promotion_rule.rb +15 -7
- data/app/models/spree/property.rb +1 -1
- data/app/models/spree/return_authorization.rb +7 -1
- data/app/models/spree/shipment.rb +113 -49
- data/app/models/spree/shipping_calculator.rb +4 -5
- data/app/models/spree/shipping_category.rb +2 -2
- data/app/models/spree/shipping_method.rb +12 -6
- data/app/models/spree/shipping_rate.rb +27 -7
- data/app/models/spree/stock/availability_validator.rb +1 -1
- data/app/models/spree/stock/estimator.rb +13 -1
- data/app/models/spree/stock/package.rb +11 -7
- data/app/models/spree/stock/packer.rb +3 -3
- data/app/models/spree/stock/quantifier.rb +9 -1
- data/app/models/spree/stock_item.rb +11 -6
- data/app/models/spree/stock_movement.rb +1 -2
- data/app/models/spree/tax_category.rb +6 -1
- data/app/models/spree/tax_rate.rb +57 -49
- data/app/models/spree/taxon.rb +10 -5
- data/app/models/spree/taxonomy.rb +5 -2
- data/app/models/spree/variant.rb +33 -16
- data/app/models/spree/zone.rb +24 -24
- data/app/views/spree/shared/_routes.html.erb +3 -0
- data/config/locales/en.yml +42 -26
- data/db/migrate/20130213191427_create_default_stock.rb +3 -3
- data/db/migrate/20130413230529_add_name_to_spree_credit_cards.rb +5 -0
- data/db/migrate/20130414000512_update_name_fields_on_spree_credit_cards.rb +13 -0
- data/db/migrate/20130417120035_update_adjustment_states.rb +2 -2
- data/db/migrate/20130417123427_add_shipping_rates_to_shipments.rb +1 -1
- data/db/migrate/20130509115210_add_number_to_stock_transfer.rb +1 -1
- data/db/migrate/20130611054351_rename_shipping_methods_zones_to_spree_shipping_methods_zones.rb +0 -5
- data/db/migrate/20130802022321_migrate_tax_categories_to_line_items.rb +7 -5
- data/db/migrate/20130807024301_upgrade_adjustments.rb +39 -0
- data/db/migrate/20130807024302_rename_adjustment_fields.rb +17 -0
- data/db/migrate/20130813004002_add_shipment_total_to_spree_orders.rb +5 -0
- data/db/migrate/20130813232134_rename_activators_to_promotions.rb +5 -0
- data/db/migrate/20130815000406_add_adjustment_total_to_line_items.rb +5 -0
- data/db/migrate/20130815024413_add_adjustment_total_to_shipments.rb +5 -0
- data/db/migrate/20130828234942_add_tax_total_to_line_items_shipments_and_orders.rb +8 -0
- data/db/migrate/20130830001159_migrate_old_shipping_calculators.rb +1 -1
- data/db/migrate/20130903183026_add_code_to_spree_promotion_rules.rb +5 -0
- data/db/migrate/20130917024658_remove_promotions_event_name_field.rb +5 -0
- data/db/migrate/20130924040529_add_promo_total_to_line_items_and_shipments_and_orders.rb +7 -0
- data/db/migrate/20131001013410_remove_unused_credit_card_fields.rb +7 -3
- data/db/migrate/20131107132123_add_tax_category_to_variants.rb +6 -0
- data/db/migrate/20131118043959_add_included_to_adjustments.rb +5 -0
- data/db/migrate/20131118050234_rename_tax_total_fields.rb +11 -0
- data/db/migrate/20131118183431_add_line_item_id_to_spree_inventory_units.rb +21 -0
- data/db/migrate/20131127001002_add_position_to_classifications.rb +5 -0
- data/db/migrate/20131211112807_create_spree_orders_promotions.rb +8 -0
- data/db/migrate/20131218054603_add_item_count_to_spree_orders.rb +5 -0
- data/db/migrate/20140106224208_rename_permalink_to_slug_for_products.rb +5 -0
- data/db/migrate/20140124023232_rename_activator_id_in_rules_and_actions_to_promotion_id.rb +6 -0
- data/db/migrate/20140203161722_add_approver_id_and_approved_at_to_orders.rb +6 -0
- data/db/migrate/20140204115338_add_confirmation_delivered_to_spree_orders.rb +5 -0
- data/db/migrate/20140205120320_create_spree_payment_capture_events.rb +12 -0
- data/db/migrate/20140205144710_add_uncaptured_amount_to_payments.rb +5 -0
- data/db/migrate/20140207085910_add_tax_category_id_to_shipping_methods.rb +5 -0
- data/db/migrate/20140207093021_add_tax_rate_id_to_shipping_rates.rb +5 -0
- data/db/migrate/20140211040159_add_pre_tax_amount_to_line_items_and_shipments.rb +6 -0
- data/db/migrate/20140213184916_add_more_indexes.rb +13 -0
- data/db/migrate/20140219060952_add_considered_risky_to_orders.rb +5 -0
- data/lib/generators/spree/dummy/dummy_generator.rb +1 -6
- data/lib/generators/spree/install/install_generator.rb +6 -6
- data/lib/generators/spree/install/templates/{app/assets/javascripts/admin → vendor/assets/javascripts/spree/backend}/all.js +3 -3
- data/lib/generators/spree/install/templates/{app/assets/javascripts/store → vendor/assets/javascripts/spree/frontend}/all.js +3 -3
- data/lib/generators/spree/install/templates/{app/assets/stylesheets/store → vendor/assets/stylesheets/spree/backend}/all.css +3 -3
- data/lib/generators/spree/install/templates/{app/assets/stylesheets/admin → vendor/assets/stylesheets/spree/frontend}/all.css +3 -3
- data/lib/spree/core.rb +21 -8
- data/lib/spree/core/calculated_adjustments.rb +0 -40
- data/lib/spree/core/controller_helpers.rb +5 -0
- data/lib/spree/core/controller_helpers/auth.rb +2 -2
- data/lib/spree/core/controller_helpers/common.rb +0 -5
- data/lib/spree/core/controller_helpers/order.rb +8 -9
- data/lib/spree/core/engine.rb +10 -17
- data/lib/spree/core/permalinks.rb +1 -1
- data/lib/spree/core/product_duplicator.rb +3 -8
- data/lib/spree/core/user_address.rb +1 -1
- data/lib/spree/core/validators/email.rb +23 -1
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/money.rb +1 -1
- data/lib/spree/permitted_attributes.rb +2 -2
- data/lib/spree/testing_support/caching.rb +47 -0
- data/lib/spree/testing_support/factories/adjustment_factory.rb +11 -2
- data/lib/spree/testing_support/factories/credit_card_factory.rb +2 -1
- data/lib/spree/testing_support/factories/order_factory.rb +10 -5
- data/lib/spree/testing_support/factories/payment_factory.rb +2 -2
- data/lib/spree/testing_support/factories/payment_method_factory.rb +3 -3
- data/lib/spree/testing_support/factories/promotion_factory.rb +16 -1
- data/lib/spree/testing_support/factories/shipment_factory.rb +8 -4
- data/lib/spree/testing_support/factories/shipping_method_factory.rb +1 -3
- data/lib/spree/testing_support/factories/stock_factory.rb +1 -1
- data/lib/spree/testing_support/factories/tax_rate_factory.rb +2 -2
- data/lib/spree/testing_support/order_walkthrough.rb +1 -1
- data/lib/tasks/core.rake +2 -2
- data/vendor/assets/fonts/FontAwesome.otf +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.svg +399 -0
- data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
- data/vendor/assets/stylesheets/font-awesome.scss +1475 -0
- metadata +73 -44
- data/app/assets/javascripts/admin/handlebar_extensions.js +0 -9
- data/app/helpers/spree/admin/adjustments_helper.rb +0 -26
- data/app/helpers/spree/admin/images_helper.rb +0 -18
- data/app/helpers/spree/promotion_rules_helper.rb +0 -13
- data/app/models/spree/activator.rb +0 -29
- data/app/models/spree/calculator/per_item.rb +0 -41
- data/app/models/spree/stock/remaining_packer.rb +0 -22
- data/app/views/spree/payments/_payment.html.erb +0 -18
- data/db/migrate/20131118041203_add_tax_total_to_spree_orders.rb +0 -5
- data/db/migrate/20131118043021_add_order_id_to_spree_adjustments.rb +0 -6
- data/db/migrate/20131118074808_add_included_to_spree_adjustments.rb +0 -5
- data/db/migrate/20140415041315_add_user_id_created_by_id_index_to_order.rb +0 -5
- data/lib/spree/core/gateway_error.rb +0 -5
- data/lib/spree/core/preference_rescue.rb +0 -25
- data/lib/spree/core/s3_support.rb +0 -25
- data/lib/spree/promo/coupon_applicator.rb +0 -71
- data/lib/spree/testing_support/factories/activator_factory.rb +0 -8
data/app/models/spree/zone.rb
CHANGED
@@ -11,6 +11,25 @@ module Spree
|
|
11
11
|
alias :members :zone_members
|
12
12
|
accepts_nested_attributes_for :zone_members, allow_destroy: true, reject_if: proc { |a| a['zoneable_id'].blank? }
|
13
13
|
|
14
|
+
def self.default_tax
|
15
|
+
where(default_tax: true).first
|
16
|
+
end
|
17
|
+
|
18
|
+
# Returns the matching zone with the highest priority zone type (State, Country, Zone.)
|
19
|
+
# Returns nil in the case of no matches.
|
20
|
+
def self.match(address)
|
21
|
+
return unless matches = self.includes(:zone_members).
|
22
|
+
order('zone_members_count', 'created_at').
|
23
|
+
select { |zone| zone.include? address }
|
24
|
+
|
25
|
+
['state', 'country'].each do |zone_kind|
|
26
|
+
if match = matches.detect { |zone| zone_kind == zone.kind }
|
27
|
+
return match
|
28
|
+
end
|
29
|
+
end
|
30
|
+
matches.first
|
31
|
+
end
|
32
|
+
|
14
33
|
def kind
|
15
34
|
if members.any? && !members.any? { |member| member.try(:zoneable_type).nil? }
|
16
35
|
members.last.zoneable_type.demodulize.underscore
|
@@ -36,21 +55,6 @@ module Spree
|
|
36
55
|
end
|
37
56
|
end
|
38
57
|
|
39
|
-
# Returns the matching zone with the highest priority zone type (State, Country, Zone.)
|
40
|
-
# Returns nil in the case of no matches.
|
41
|
-
def self.match(address)
|
42
|
-
return unless matches = self.includes(:zone_members).
|
43
|
-
order('zone_members_count', 'created_at').
|
44
|
-
select { |zone| zone.include? address }
|
45
|
-
|
46
|
-
['state', 'country'].each do |zone_kind|
|
47
|
-
if match = matches.detect { |zone| zone_kind == zone.kind }
|
48
|
-
return match
|
49
|
-
end
|
50
|
-
end
|
51
|
-
matches.first
|
52
|
-
end
|
53
|
-
|
54
58
|
# convenience method for returning the countries contained within a zone
|
55
59
|
def country_list
|
56
60
|
@countries ||= case kind
|
@@ -67,12 +71,12 @@ module Spree
|
|
67
71
|
# All zoneables belonging to the zone members. Will be a collection of either
|
68
72
|
# countries or states depending on the zone type.
|
69
73
|
def zoneables
|
70
|
-
members.
|
74
|
+
members.collect(&:zoneable)
|
71
75
|
end
|
72
76
|
|
73
77
|
def country_ids
|
74
78
|
if kind == 'country'
|
75
|
-
members.
|
79
|
+
members.collect(&:zoneable_id)
|
76
80
|
else
|
77
81
|
[]
|
78
82
|
end
|
@@ -80,7 +84,7 @@ module Spree
|
|
80
84
|
|
81
85
|
def state_ids
|
82
86
|
if kind == 'state'
|
83
|
-
members.
|
87
|
+
members.collect(&:zoneable_id)
|
84
88
|
else
|
85
89
|
[]
|
86
90
|
end
|
@@ -106,10 +110,6 @@ module Spree
|
|
106
110
|
end
|
107
111
|
end
|
108
112
|
|
109
|
-
def self.default_tax
|
110
|
-
where(default_tax: true).first
|
111
|
-
end
|
112
|
-
|
113
113
|
# Indicates whether the specified zone falls entirely within the zone performing
|
114
114
|
# the check.
|
115
115
|
def contains?(target)
|
@@ -117,9 +117,9 @@ module Spree
|
|
117
117
|
return false if zone_members.empty? || target.zone_members.empty?
|
118
118
|
|
119
119
|
if kind == target.kind
|
120
|
-
return false if
|
120
|
+
return false if target.zoneables.any? { |target_zoneable| zoneables.exclude?(target_zoneable) }
|
121
121
|
else
|
122
|
-
return false if
|
122
|
+
return false if target.zoneables.any? { |target_state| zoneables.exclude?(target_state.country) }
|
123
123
|
end
|
124
124
|
true
|
125
125
|
end
|
@@ -6,5 +6,8 @@
|
|
6
6
|
Spree.routes = {}
|
7
7
|
}
|
8
8
|
Spree.routes.states_search = "<%= spree.api_states_path(:format => 'json') %>"
|
9
|
+
Spree.routes.apply_coupon_code = function(order_id) {
|
10
|
+
return "<%= spree.api_orders_path %>/" + order_id + "/apply_coupon_code"
|
11
|
+
}
|
9
12
|
Spree.routes.root = "<%= spree.root_url if spree.respond_to? :root_url %>"
|
10
13
|
</script>
|
data/config/locales/en.yml
CHANGED
@@ -24,6 +24,7 @@ en:
|
|
24
24
|
number: Number
|
25
25
|
verification_value: Verification Value
|
26
26
|
year: Year
|
27
|
+
name: Name
|
27
28
|
spree/inventory_unit:
|
28
29
|
state: State
|
29
30
|
spree/line_item:
|
@@ -143,6 +144,12 @@ en:
|
|
143
144
|
spree/line_item:
|
144
145
|
one: Line Item
|
145
146
|
other: Line Items
|
147
|
+
spree/option_type:
|
148
|
+
one: Option Type
|
149
|
+
other: Option Types
|
150
|
+
spree/option_value:
|
151
|
+
one: Option Value
|
152
|
+
other: Option Values
|
146
153
|
spree/order:
|
147
154
|
one: Order
|
148
155
|
other: Orders
|
@@ -182,9 +189,6 @@ en:
|
|
182
189
|
spree/state:
|
183
190
|
one: State
|
184
191
|
other: States
|
185
|
-
spree/stock_movement:
|
186
|
-
one: Stock Movement
|
187
|
-
other: Stock Movements
|
188
192
|
spree/stock_location:
|
189
193
|
one: Stock Location
|
190
194
|
other: Stock Locations
|
@@ -225,7 +229,6 @@ en:
|
|
225
229
|
attributes:
|
226
230
|
base:
|
227
231
|
card_expired: "Card has expired"
|
228
|
-
expiry_invalid: "Card expiration is invalid"
|
229
232
|
devise:
|
230
233
|
confirmations:
|
231
234
|
confirmed: Your account was successfully confirmed. You are now signed in.
|
@@ -293,6 +296,7 @@ en:
|
|
293
296
|
add: Add
|
294
297
|
add_action_of_type: Add action of type
|
295
298
|
add_country: Add Country
|
299
|
+
add_coupon_code: Add Coupon Code
|
296
300
|
add_new_header: Add New Header
|
297
301
|
add_new_style: Add New Style
|
298
302
|
add_one: Add One
|
@@ -308,6 +312,7 @@ en:
|
|
308
312
|
additional_item: Additional Item Cost
|
309
313
|
address1: Address
|
310
314
|
address2: Address (contd.)
|
315
|
+
adjustable: Adjustable
|
311
316
|
adjustment: Adjustment
|
312
317
|
adjustment_amount: Amount
|
313
318
|
adjustment_successfully_closed: Adjustment has been successfully closed!
|
@@ -356,14 +361,12 @@ en:
|
|
356
361
|
analytics_desc_list_4: It's completely free!
|
357
362
|
analytics_trackers: Analytics Trackers
|
358
363
|
and: and
|
364
|
+
approve: approve
|
365
|
+
approver: Approver
|
366
|
+
approved_at: Approved at
|
359
367
|
are_you_sure: Are you sure?
|
360
368
|
are_you_sure_delete: Are you sure you want to delete this record?
|
361
369
|
associated_adjustment_closed: The associated adjustment is closed, and will not be recalculated. Do you want to open it?
|
362
|
-
attachment_default_style: Attachments Style
|
363
|
-
attachment_default_url: Attachments Default URL
|
364
|
-
attachment_path: Attachments Path
|
365
|
-
attachment_styles: Paperclip Styles
|
366
|
-
attachment_url: Attachments URL
|
367
370
|
authorization_failure: Authorization Failure
|
368
371
|
auto_capture: Auto Capture
|
369
372
|
available_on: Available On
|
@@ -384,7 +387,6 @@ en:
|
|
384
387
|
back_to_prototypes_list: Back To Prototypes List
|
385
388
|
back_to_reports_list: Back To Reports List
|
386
389
|
back_to_shipping_categories: Back To Shipping Categories
|
387
|
-
back_to_shipping_categories_list: Back To Shipping Categories List
|
388
390
|
back_to_shipping_methods_list: Back To Shipping Methods List
|
389
391
|
back_to_states_list: Back To States List
|
390
392
|
back_to_stock_locations_list: Back to Stock Locations List
|
@@ -411,16 +413,21 @@ en:
|
|
411
413
|
cannot_perform_operation: Cannot perform requested operation
|
412
414
|
cannot_set_shipping_method_without_address: Cannot set shipping method until customer details are provided.
|
413
415
|
capture: Capture
|
416
|
+
capture_events: Capture events
|
414
417
|
card_code: Card Code
|
415
418
|
card_number: Card Number
|
416
419
|
card_type: Brand
|
417
420
|
card_type_is: Card type is
|
418
421
|
cart: Cart
|
422
|
+
cart_subtotal:
|
423
|
+
one: 'Subtotal (1 item)'
|
424
|
+
other: 'Subtotal (%{count} items)'
|
419
425
|
categories: Categories
|
420
426
|
category: Category
|
421
427
|
check_for_spree_alerts: Check for Spree alerts
|
422
428
|
checkout: Checkout
|
423
429
|
choose_a_customer: Choose a customer
|
430
|
+
choose_a_taxon_to_sort_products_for: "Choose a taxon to sort products for"
|
424
431
|
choose_currency: Choose Currency
|
425
432
|
choose_dashboard_locale: Choose Dashboard Locale
|
426
433
|
city: City
|
@@ -432,7 +439,6 @@ en:
|
|
432
439
|
complete: complete
|
433
440
|
configuration: Configuration
|
434
441
|
configurations: Configurations
|
435
|
-
configure_s3: Configure S3
|
436
442
|
confirm: Confirm
|
437
443
|
confirm_delete: Confirm Deletion
|
438
444
|
confirm_password: Password Confirmation
|
@@ -570,15 +576,17 @@ en:
|
|
570
576
|
fill_in_customer_info: Please fill in customer info
|
571
577
|
filter_results: Filter Results
|
572
578
|
finalize: Finalize
|
579
|
+
find_a_taxon: Find a Taxon
|
580
|
+
finalized: Finalized
|
573
581
|
first_item: First Item Cost
|
574
582
|
first_name: First Name
|
575
583
|
first_name_begins_with: First Name Begins With
|
576
584
|
flat_percent: Flat Percent
|
577
|
-
|
578
|
-
flat_rate_per_order: Flat Rate (per order)
|
585
|
+
flat_rate_per_order: Flat Rate
|
579
586
|
flexible_rate: Flexible Rate
|
580
587
|
forgot_password: Forgot Password?
|
581
588
|
free_shipping: Free Shipping
|
589
|
+
free_shipping_amount: "-"
|
582
590
|
front_end: Front End
|
583
591
|
gateway: Gateway
|
584
592
|
gateway_config_unavailable: Gateway unavailable for environment
|
@@ -607,9 +615,6 @@ en:
|
|
607
615
|
translations: Translations
|
608
616
|
icon: Icon
|
609
617
|
image: Image
|
610
|
-
image_settings: Image Settings
|
611
|
-
image_settings_updated: Image Settings successfully updated.
|
612
|
-
image_settings_warning: You will need to regenerate thumbnails if you update the paperclip styles. Use rake paperclip:refresh:thumbnails CLASS=Spree::Image to do this.
|
613
618
|
images: Images
|
614
619
|
inactive: Inactive
|
615
620
|
included_in_price: Included in Price
|
@@ -641,6 +646,7 @@ en:
|
|
641
646
|
last_name: Last Name
|
642
647
|
last_name_begins_with: Last Name Begins With
|
643
648
|
learn_more: Learn More
|
649
|
+
line_item_adjustments: "Line item adjustments"
|
644
650
|
list: List
|
645
651
|
listing_countries: Listing Countries
|
646
652
|
listing_orders: Listing Orders
|
@@ -690,6 +696,7 @@ en:
|
|
690
696
|
my_account: My Account
|
691
697
|
my_orders: My Orders
|
692
698
|
name: Name
|
699
|
+
name_on_card: Name on card
|
693
700
|
name_or_sku: Name or SKU (enter at least first 4 characters of product name)
|
694
701
|
new: New
|
695
702
|
new_adjustment: New Adjustment
|
@@ -731,6 +738,7 @@ en:
|
|
731
738
|
no_rules_added: No rules added
|
732
739
|
no_resource_found: ! 'No %{resource} found'
|
733
740
|
no_shipping_methods_found: No shipping methods found
|
741
|
+
no_shipping_method_selected: No shipping method selected.
|
734
742
|
no_trackers_found: No Trackers Found
|
735
743
|
no_stock_locations_found: No stock locations found
|
736
744
|
no_tracking_present: No tracking details provided.
|
@@ -761,6 +769,8 @@ en:
|
|
761
769
|
or_over_price: ! '%{price} or over'
|
762
770
|
order: Order
|
763
771
|
order_adjustments: Order adjustments
|
772
|
+
order_approved: Order approved
|
773
|
+
order_canceled: Order canceled
|
764
774
|
order_details: Order Details
|
765
775
|
order_email_resent: Order Email Resent
|
766
776
|
order_information: Order Information
|
@@ -787,11 +797,13 @@ en:
|
|
787
797
|
selected_quantity_not_available: ! 'Selected quantity of %{item} is not available.'
|
788
798
|
please_enter_reasonable_quantity: Please enter a reasonable quantity.
|
789
799
|
order_processed_successfully: Your order has been processed successfully
|
800
|
+
order_resumed: Order resumed
|
790
801
|
order_state:
|
791
802
|
address: address
|
792
803
|
awaiting_return: awaiting return
|
793
804
|
canceled: canceled
|
794
805
|
cart: cart
|
806
|
+
considered_risky: considered risky
|
795
807
|
complete: complete
|
796
808
|
confirm: confirm
|
797
809
|
delivery: delivery
|
@@ -815,6 +827,7 @@ en:
|
|
815
827
|
path: Path
|
816
828
|
pay: pay
|
817
829
|
payment: Payment
|
830
|
+
payment_could_not_be_created: Payment could not be created.
|
818
831
|
payment_information: Payment Information
|
819
832
|
payment_method: Payment Method
|
820
833
|
payment_methods: Payment Methods
|
@@ -868,13 +881,16 @@ en:
|
|
868
881
|
promotion_action_types:
|
869
882
|
create_adjustment:
|
870
883
|
description: Creates a promotion credit adjustment on the order
|
871
|
-
name: Create adjustment
|
884
|
+
name: Create whole-order adjustment
|
885
|
+
create_item_adjustments:
|
886
|
+
description: Creates a promotion credit adjustment on a line item
|
887
|
+
name: Create per-line-item adjustment
|
872
888
|
create_line_items:
|
873
889
|
description: Populates the cart with the specified quantity of variant
|
874
890
|
name: Create line items
|
875
|
-
|
876
|
-
description:
|
877
|
-
name:
|
891
|
+
free_shipping:
|
892
|
+
description: Makes all shipments for the order free
|
893
|
+
name: Free shipping
|
878
894
|
promotion_actions: Actions
|
879
895
|
promotion_form:
|
880
896
|
match_policies:
|
@@ -901,6 +917,7 @@ en:
|
|
901
917
|
description: Available only to logged in users
|
902
918
|
name: User Logged In
|
903
919
|
promotions: Promotions
|
920
|
+
promotion_uses: Promotion uses
|
904
921
|
properties: Properties
|
905
922
|
property: Property
|
906
923
|
prototype: Prototype
|
@@ -944,11 +961,6 @@ en:
|
|
944
961
|
rma_value: RMA Value
|
945
962
|
roles: Roles
|
946
963
|
rules: Rules
|
947
|
-
s3_access_key: Access Key
|
948
|
-
s3_bucket: Bucket
|
949
|
-
s3_headers: S3 Headers
|
950
|
-
s3_protocol: S3 Protocol
|
951
|
-
s3_secret: Secret Key
|
952
964
|
sales_total: Sales Total
|
953
965
|
sales_total_description: Sales Total For All Orders
|
954
966
|
sales_totals: Sales Totals
|
@@ -974,6 +986,8 @@ en:
|
|
974
986
|
ship_address: Ship Address
|
975
987
|
ship_total: Ship Total
|
976
988
|
shipment: Shipment
|
989
|
+
shipment_adjustments: "Shipment adjustments"
|
990
|
+
shipment_details: "From %{stock_location} via %{shipping_method}"
|
977
991
|
shipment_inc_vat: Shipment including VAT
|
978
992
|
shipment_mailer:
|
979
993
|
shipped_email:
|
@@ -1005,6 +1019,7 @@ en:
|
|
1005
1019
|
shipping_method: Shipping Method
|
1006
1020
|
shipping_methods: Shipping Methods
|
1007
1021
|
shipping_price_sack: Price sack
|
1022
|
+
shipping_total: Shipping total
|
1008
1023
|
shop_by_taxonomy: Shop by %{taxonomy}
|
1009
1024
|
shopping_cart: Shopping Cart
|
1010
1025
|
show: Show
|
@@ -1015,6 +1030,7 @@ en:
|
|
1015
1030
|
site_name: Site Name
|
1016
1031
|
site_url: Site URL
|
1017
1032
|
sku: SKU
|
1033
|
+
slug: Slug
|
1018
1034
|
smtp: SMTP
|
1019
1035
|
smtp_authentication_type: SMTP Authentication Type
|
1020
1036
|
smtp_domain: SMTP Domain
|
@@ -1058,12 +1074,12 @@ en:
|
|
1058
1074
|
successfully_signed_up_for_analytics: Successfully signed up for Spree Analytics
|
1059
1075
|
successfully_updated: ! '%{resource} has been successfully updated!'
|
1060
1076
|
tax: Tax
|
1077
|
+
tax_included: "Tax (incl.)"
|
1061
1078
|
tax_categories: Tax Categories
|
1062
1079
|
tax_category: Tax Category
|
1063
1080
|
tax_rate_amount_explanation: Tax rates are a decimal amount to aid in calculations, (i.e. if the tax rate is 5% then enter 0.05)
|
1064
1081
|
tax_rates: Tax Rates
|
1065
1082
|
tax_settings: Tax Settings
|
1066
|
-
tax_total: Tax Total
|
1067
1083
|
taxon: Taxon
|
1068
1084
|
taxon_edit: Edit Taxon
|
1069
1085
|
taxon_placeholder: Add a Taxon
|
@@ -5,11 +5,11 @@ class CreateDefaultStock < ActiveRecord::Migration
|
|
5
5
|
location = Spree::StockLocation.new(name: 'default')
|
6
6
|
location.save(validate: false)
|
7
7
|
|
8
|
-
Spree::Variant.
|
8
|
+
Spree::Variant.all.each do |variant|
|
9
9
|
stock_item = Spree::StockItem.unscoped.build(stock_location: location, variant: variant)
|
10
10
|
stock_item.send(:count_on_hand=, variant.count_on_hand)
|
11
11
|
# Avoid running default_scope defined by acts_as_paranoid, related to #3805,
|
12
|
-
# validations would run a query with a delete_at column
|
12
|
+
# validations would run a query with a delete_at column tha might not be present yet
|
13
13
|
stock_item.save! validate: false
|
14
14
|
end
|
15
15
|
|
@@ -19,7 +19,7 @@ class CreateDefaultStock < ActiveRecord::Migration
|
|
19
19
|
def down
|
20
20
|
add_column :spree_variants, :count_on_hand, :integer
|
21
21
|
|
22
|
-
Spree::StockItem.
|
22
|
+
Spree::StockItem.all.each do |stock_item|
|
23
23
|
stock_item.variant.update_column :count_on_hand, stock_item.count_on_hand
|
24
24
|
end
|
25
25
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class UpdateNameFieldsOnSpreeCreditCards < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
if ActiveRecord::Base.connection.adapter_name.downcase.include? "mysql"
|
4
|
+
execute "UPDATE spree_credit_cards SET name = CONCAT(first_name, ' ', last_name)"
|
5
|
+
else
|
6
|
+
execute "UPDATE spree_credit_cards SET name = first_name || ' ' || last_name"
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
def down
|
11
|
+
execute "UPDATE spree_credit_cards SET name = NULL"
|
12
|
+
end
|
13
|
+
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
class UpdateAdjustmentStates < ActiveRecord::Migration
|
2
2
|
def up
|
3
|
-
Spree::Order.complete.
|
3
|
+
Spree::Order.complete.each do |order|
|
4
4
|
order.adjustments.update_all(:state => 'closed')
|
5
5
|
end
|
6
6
|
|
7
|
-
Spree::Shipment.shipped.
|
7
|
+
Spree::Shipment.shipped.each do |shipment|
|
8
8
|
shipment.adjustment.update_column(:state, 'finalized') if shipment.adjustment
|
9
9
|
end
|
10
10
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class AddShippingRatesToShipments < ActiveRecord::Migration
|
2
2
|
def up
|
3
|
-
Spree::Shipment.
|
3
|
+
Spree::Shipment.all.each do |shipment|
|
4
4
|
shipment.shipping_rates.create(:shipping_method_id => shipment.shipping_method_id,
|
5
5
|
:cost => shipment.cost,
|
6
6
|
:selected => true)
|
@@ -6,7 +6,7 @@ class AddNumberToStockTransfer < ActiveRecord::Migration
|
|
6
6
|
rename_column :spree_stock_transfers, :reference_number, :reference
|
7
7
|
add_column :spree_stock_transfers, :number, :string
|
8
8
|
|
9
|
-
Spree::StockTransfer.
|
9
|
+
Spree::StockTransfer.all.each do |transfer|
|
10
10
|
transfer.send(:generate_stock_transfer_number)
|
11
11
|
transfer.save!
|
12
12
|
end
|
data/db/migrate/20130611054351_rename_shipping_methods_zones_to_spree_shipping_methods_zones.rb
CHANGED
@@ -1,10 +1,5 @@
|
|
1
1
|
class RenameShippingMethodsZonesToSpreeShippingMethodsZones < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
rename_table :shipping_methods_zones, :spree_shipping_methods_zones
|
4
|
-
# If Spree::ShippingMethod zones association was patched in
|
5
|
-
# CreateShippingMethodZone migrations, it needs to be patched back
|
6
|
-
Spree::ShippingMethod.has_and_belongs_to_many :zones, :join_table => 'spree_shipping_methods_zones',
|
7
|
-
:class_name => 'Spree::Zone',
|
8
|
-
:foreign_key => 'shipping_method_id'
|
9
4
|
end
|
10
5
|
end
|