spree_core 0.40.4 → 0.50.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.
Files changed (251) hide show
  1. data/README.md +6 -1
  2. data/app/controllers/admin/base_controller.rb +0 -57
  3. data/app/controllers/admin/configurations_controller.rb +1 -1
  4. data/app/controllers/admin/general_settings_controller.rb +1 -1
  5. data/app/controllers/admin/images_controller.rb +18 -8
  6. data/app/controllers/admin/inventory_settings_controller.rb +1 -1
  7. data/app/controllers/admin/mail_settings_controller.rb +1 -1
  8. data/app/controllers/admin/option_types_controller.rb +11 -0
  9. data/app/controllers/admin/orders_controller.rb +16 -20
  10. data/app/controllers/admin/overview_controller.rb +1 -1
  11. data/app/controllers/admin/payment_methods_controller.rb +6 -6
  12. data/app/controllers/admin/product_groups_controller.rb +10 -11
  13. data/app/controllers/admin/product_properties_controller.rb +5 -5
  14. data/app/controllers/admin/product_scopes_controller.rb +12 -4
  15. data/app/controllers/admin/products_controller.rb +17 -12
  16. data/app/controllers/admin/properties_controller.rb +7 -7
  17. data/app/controllers/admin/prototypes_controller.rb +15 -15
  18. data/app/controllers/admin/reports_controller.rb +12 -11
  19. data/app/controllers/admin/shipments_controller.rb +0 -5
  20. data/app/controllers/admin/shipping_categories_controller.rb +6 -6
  21. data/app/controllers/admin/shipping_methods_controller.rb +1 -2
  22. data/app/controllers/admin/states_controller.rb +12 -12
  23. data/app/controllers/admin/tax_categories_controller.rb +2 -2
  24. data/app/controllers/admin/tax_rates_controller.rb +8 -8
  25. data/app/controllers/admin/tax_settings_controller.rb +1 -1
  26. data/app/controllers/admin/taxonomies_controller.rb +3 -3
  27. data/app/controllers/admin/taxons_controller.rb +1 -8
  28. data/app/controllers/admin/trackers_controller.rb +1 -1
  29. data/app/controllers/admin/users_controller.rb +6 -9
  30. data/app/controllers/admin/variants_controller.rb +13 -2
  31. data/app/controllers/admin/zones_controller.rb +9 -9
  32. data/app/controllers/checkout_controller.rb +5 -5
  33. data/app/controllers/products_controller.rb +1 -1
  34. data/app/controllers/taxons_controller.rb +3 -1
  35. data/app/helpers/admin/navigation_helper.rb +36 -19
  36. data/app/helpers/admin/payments_helper.rb +1 -1
  37. data/app/helpers/admin/product_groups_helper.rb +1 -1
  38. data/app/helpers/admin/product_properties_helper.rb +5 -5
  39. data/app/helpers/admin/products_helper.rb +2 -2
  40. data/app/helpers/admin/users_helper.rb +5 -2
  41. data/app/helpers/hook_helper.rb +3 -3
  42. data/app/helpers/products_helper.rb +0 -19
  43. data/app/helpers/spree/base_helper.rb +33 -2
  44. data/app/helpers/taxons_helper.rb +3 -3
  45. data/app/mailers/order_mailer.rb +2 -2
  46. data/app/mailers/shipment_mailer.rb +2 -2
  47. data/app/models/address.rb +42 -9
  48. data/app/models/adjustment.rb +8 -8
  49. data/app/models/app_configuration.rb +0 -6
  50. data/app/models/billing_integration.rb +1 -1
  51. data/app/models/calculator/sales_tax.rb +3 -3
  52. data/app/models/configuration.rb +1 -1
  53. data/app/models/country.rb +4 -5
  54. data/app/models/creditcard.rb +38 -31
  55. data/app/models/gateway.rb +14 -14
  56. data/app/models/gateway/beanstream.rb +4 -4
  57. data/app/models/gateway/bogus.rb +6 -6
  58. data/app/models/gateway/braintree.rb +88 -0
  59. data/app/models/gateway/eway.rb +3 -3
  60. data/app/models/image.rb +5 -4
  61. data/app/models/option_type.rb +1 -0
  62. data/app/models/order.rb +60 -21
  63. data/app/models/payment.rb +5 -32
  64. data/app/models/preference.rb +7 -7
  65. data/app/models/product.rb +22 -7
  66. data/app/models/product_group.rb +22 -26
  67. data/app/models/product_property.rb +5 -5
  68. data/app/models/product_scope.rb +26 -6
  69. data/app/models/property.rb +1 -1
  70. data/app/models/state.rb +2 -3
  71. data/app/models/tax_category.rb +1 -0
  72. data/app/models/tax_rate.rb +1 -2
  73. data/app/models/taxon.rb +12 -10
  74. data/app/models/taxonomy.rb +7 -4
  75. data/app/models/tracker.rb +1 -1
  76. data/app/models/user.rb +4 -0
  77. data/app/models/variant.rb +1 -1
  78. data/app/models/zone.rb +1 -1
  79. data/app/models/zone_member.rb +3 -3
  80. data/app/views/admin/{shared → adjustments}/_adjustments_table.html.erb +7 -4
  81. data/app/views/admin/adjustments/edit.html.erb +1 -1
  82. data/app/views/admin/adjustments/index.html.erb +2 -2
  83. data/app/views/admin/adjustments/new.html.erb +2 -1
  84. data/app/views/admin/general_settings/edit.html.erb +4 -12
  85. data/app/views/admin/general_settings/show.html.erb +0 -5
  86. data/app/views/admin/images/index.html.erb +8 -5
  87. data/app/views/admin/inventory_settings/show.html.erb +1 -1
  88. data/app/views/admin/mail_methods/index.html.erb +4 -4
  89. data/app/views/admin/option_types/_form.html.erb +4 -4
  90. data/app/views/admin/option_types/_option_value_fields.html.erb +2 -2
  91. data/app/views/admin/option_types/edit.html.erb +4 -2
  92. data/app/views/admin/option_types/index.html.erb +5 -5
  93. data/app/views/admin/orders/_line_item.html.erb +2 -1
  94. data/app/views/admin/orders/history.html.erb +6 -2
  95. data/app/views/admin/orders/index.html.erb +22 -19
  96. data/app/views/admin/orders/show.html.erb +1 -1
  97. data/app/views/admin/orders/user.html.erb +1 -1
  98. data/app/views/admin/payment_methods/index.html.erb +7 -5
  99. data/app/views/admin/payments/_list.html.erb +3 -3
  100. data/app/views/admin/payments/index.html.erb +1 -1
  101. data/app/views/admin/payments/show.html.erb +2 -2
  102. data/app/views/admin/product_groups/edit.html.erb +7 -7
  103. data/app/views/admin/product_groups/index.html.erb +5 -3
  104. data/app/views/admin/product_groups/update.js.erb +4 -3
  105. data/app/views/admin/product_properties/_product_property_fields.html.erb +3 -3
  106. data/app/views/admin/product_properties/index.html.erb +10 -5
  107. data/app/views/admin/product_scopes/destroy.js.erb +1 -0
  108. data/app/views/admin/products/index.html.erb +32 -33
  109. data/app/views/admin/properties/_form.html.erb +2 -2
  110. data/app/views/admin/properties/index.html.erb +4 -4
  111. data/app/views/admin/prototypes/index.html.erb +4 -4
  112. data/app/views/admin/shared/_address_form.html.erb +1 -1
  113. data/app/views/admin/shared/_calculator_fields.html.erb +1 -1
  114. data/app/views/admin/shared/_destroy.js.erb +15 -2
  115. data/app/views/admin/shared/_order_tabs.html.erb +1 -1
  116. data/app/views/admin/shared/_report_criteria.html.erb +1 -1
  117. data/app/views/admin/shipments/_form.html.erb +6 -2
  118. data/app/views/admin/shipments/edit.html.erb +1 -1
  119. data/app/views/admin/shipments/index.html.erb +4 -2
  120. data/app/views/admin/shipping_methods/_form.html.erb +2 -0
  121. data/app/views/admin/shipping_methods/index.html.erb +3 -2
  122. data/app/views/admin/states/_state_list.html.erb +11 -5
  123. data/app/views/admin/tax_categories/index.html.erb +9 -4
  124. data/app/views/admin/tax_settings/show.html.erb +2 -2
  125. data/app/views/admin/taxonomies/_list.html.erb +4 -2
  126. data/app/views/admin/taxonomies/index.html.erb +2 -2
  127. data/app/views/admin/taxons/_form.html.erb +1 -1
  128. data/app/views/admin/trackers/index.html.erb +5 -5
  129. data/app/views/admin/users/_form.html.erb +3 -4
  130. data/app/views/admin/users/index.html.erb +7 -6
  131. data/app/views/admin/users/show.html.erb +3 -3
  132. data/app/views/admin/variants/index.html.erb +21 -6
  133. data/app/views/admin/zones/_form.html.erb +9 -9
  134. data/app/views/admin/zones/_member_type.html.erb +5 -5
  135. data/app/views/admin/zones/index.html.erb +7 -5
  136. data/app/views/checkout/_address.html.erb +2 -2
  137. data/app/views/checkout/_payment.html.erb +3 -6
  138. data/app/views/layouts/admin.html.erb +3 -9
  139. data/app/views/layouts/spree_application.html.erb +2 -1
  140. data/app/views/orders/_line_item.html.erb +1 -1
  141. data/app/views/orders/edit.html.erb +17 -16
  142. data/app/views/orders/show.html.erb +1 -1
  143. data/app/views/shared/_admin_head.html.erb +1 -1
  144. data/app/views/shared/_error_messages.html.erb +2 -2
  145. data/app/views/shared/_filters.html.erb +4 -4
  146. data/app/views/shared/_head.html.erb +2 -2
  147. data/app/views/shared/_nav_bar.html.erb +2 -2
  148. data/app/views/shared/_products.html.erb +4 -2
  149. data/app/views/shared/_taxonomies.html.erb +15 -8
  150. data/app/views/shipment_mailer/shipped_email.text.erb +2 -2
  151. data/config/cucumber.yml +10 -0
  152. data/config/initializers/form_builder.rb +1 -5
  153. data/config/initializers/workarounds_for_ruby19.rb +5 -5
  154. data/config/locales/en.yml +33 -6
  155. data/config/routes.rb +18 -13
  156. data/db/migrate/20090923100315_add_count_on_hand_to_variants_and_products.rb +5 -5
  157. data/db/migrate/20091213222815_creditcard_last_four_digits.rb +5 -5
  158. data/db/migrate/20100105132138_shipment_id_for_inventory_units.rb +2 -2
  159. data/db/migrate/20100209025806_create_payment_methods.rb +3 -3
  160. data/db/migrate/20100209144531_polymorphic_payments.rb +1 -1
  161. data/db/migrate/20100214212536_assign_creditcard_txns_to_payment.rb +2 -2
  162. data/db/migrate/20100224153127_deleted_at_for_payment_methods.rb +1 -1
  163. data/db/migrate/20100506185838_add_description_to_taxons.rb +1 -1
  164. data/db/migrate/20100816212146_shipping_method_id_for_orders.rb +1 -1
  165. data/db/migrate/20101026184808_migrate_checkout_to_orders.rb +2 -2
  166. data/db/migrate/20101223215658_add_position_to_variants.rb +9 -0
  167. data/db/migrate/20110110130847_add_next_state_to_state_events.rb +9 -0
  168. data/db/migrate/20110111122537_add_position_to_option_types.rb +9 -0
  169. data/db/migrate/20110314192118_remove_trailing_slashes_in_taxon_permalinks.rb +17 -0
  170. data/lib/custom_fixtures.rb +1 -1
  171. data/lib/{seo_assist.rb → middleware/seo_assist.rb} +14 -8
  172. data/lib/product_filters.rb +49 -43
  173. data/lib/redirect_legacy_product_url.rb +5 -5
  174. data/lib/scopes.rb +2 -2
  175. data/lib/scopes/dynamic.rb +9 -16
  176. data/lib/scopes/product.rb +33 -16
  177. data/lib/scopes/variant.rb +4 -3
  178. data/lib/spree/calculated_adjustments.rb +5 -2
  179. data/lib/spree/config.rb +2 -0
  180. data/lib/spree/current_order.rb +4 -4
  181. data/lib/spree/mail_settings.rb +3 -2
  182. data/lib/spree/search/base.rb +9 -10
  183. data/lib/spree_base.rb +22 -23
  184. data/lib/spree_core.rb +10 -69
  185. data/lib/spree_core/authorize_net_cim_hack.rb +1 -1
  186. data/lib/spree_core/delegate_belongs_to.rb +18 -24
  187. data/lib/spree_core/enumerable_constants.rb +38 -38
  188. data/lib/spree_core/find_by_param.rb +8 -6
  189. data/lib/spree_core/preferences/preference_definition.rb +7 -7
  190. data/lib/spree_core/railtie.rb +58 -0
  191. data/lib/spree_core/ssl_requirement.rb +4 -3
  192. data/lib/spree_core/testing_support/factories.rb +13 -0
  193. data/lib/spree_core/testing_support/factories/address_factory.rb +20 -0
  194. data/lib/spree_core/testing_support/factories/adjustment_factory.rb +6 -0
  195. data/lib/spree_core/testing_support/factories/calculator_factory.rb +5 -0
  196. data/lib/spree_core/testing_support/factories/configuraion_factory.rb +4 -0
  197. data/lib/spree_core/testing_support/factories/country_factory.rb +7 -0
  198. data/lib/spree_core/testing_support/factories/creditcard_factory.rb +11 -0
  199. data/lib/spree_core/testing_support/factories/inventory_unit_factory.rb +7 -0
  200. data/lib/spree_core/testing_support/factories/line_item_factory.rb +8 -0
  201. data/lib/spree_core/testing_support/factories/mail_method_factory.rb +4 -0
  202. data/lib/spree_core/testing_support/factories/options_factory.rb +10 -0
  203. data/lib/spree_core/testing_support/factories/order_factory.rb +18 -0
  204. data/lib/spree_core/testing_support/factories/payment_factory.rb +26 -0
  205. data/lib/spree_core/testing_support/factories/payment_method_factory.rb +17 -0
  206. data/lib/spree_core/testing_support/factories/product_factory.rb +16 -0
  207. data/lib/spree_core/testing_support/factories/product_group_factory.rb +3 -0
  208. data/lib/spree_core/testing_support/factories/product_option_type_factory.rb +4 -0
  209. data/lib/spree_core/testing_support/factories/product_property_factory.rb +4 -0
  210. data/lib/spree_core/testing_support/factories/product_scope_factory.rb +6 -0
  211. data/lib/spree_core/testing_support/factories/property_factory.rb +4 -0
  212. data/lib/spree_core/testing_support/factories/prototype_factory.rb +4 -0
  213. data/lib/spree_core/testing_support/factories/return_authorization_factory.rb +8 -0
  214. data/lib/spree_core/testing_support/factories/role_factory.rb +9 -0
  215. data/lib/spree_core/testing_support/factories/shipment_factory.rb +9 -0
  216. data/lib/spree_core/testing_support/factories/shipping_category_factory.rb +5 -0
  217. data/lib/spree_core/testing_support/factories/shipping_method_factory.rb +7 -0
  218. data/lib/spree_core/testing_support/factories/state_factory.rb +11 -0
  219. data/lib/spree_core/testing_support/factories/tax_category_factory.rb +8 -0
  220. data/lib/spree_core/testing_support/factories/tax_rate_factory.rb +5 -0
  221. data/lib/spree_core/testing_support/factories/taxon_factory.rb +5 -0
  222. data/lib/spree_core/testing_support/factories/taxonomy_factory.rb +3 -0
  223. data/lib/spree_core/testing_support/factories/tracker_factory.rb +5 -0
  224. data/lib/spree_core/testing_support/factories/user_factory.rb +15 -0
  225. data/lib/spree_core/testing_support/factories/variant_factory.rb +14 -0
  226. data/lib/spree_core/testing_support/factories/zone_factory.rb +18 -0
  227. data/lib/spree_core/theme_support/hook.rb +1 -1
  228. data/lib/spree_core/theme_support/more_patches.rb +20 -20
  229. data/lib/spree_core/version.rb +5 -0
  230. data/lib/tasks/common.rb +30 -0
  231. data/lib/tasks/install.rake +1 -1
  232. data/lib/tasks/rake_util.rb +19 -0
  233. data/lib/tasks/taxon.rake +14 -0
  234. data/public/images/reorder.jpg +0 -0
  235. data/public/javascripts/admin.js +0 -6
  236. data/public/javascripts/admin/unobtrusive_handlers.js +28 -0
  237. data/public/javascripts/checkout.js +3 -3
  238. data/public/stylesheets/admin/admin-forms.css +1 -6
  239. data/public/stylesheets/admin/admin.css +0 -28
  240. data/public/stylesheets/screen.css +0 -280
  241. metadata +81 -43
  242. data/app/controllers/countries_controller.rb +0 -11
  243. data/app/models/spree/alert.rb +0 -13
  244. data/app/models/state_monitor.rb +0 -25
  245. data/app/views/admin/shared/_alert.html.erb +0 -6
  246. data/app/views/countries/index.js.erb +0 -1
  247. data/app/views/shared/_doc_and_xmlns.html.erb +0 -2
  248. data/app/views/users/edit.html.erb +0 -9
  249. data/app/views/users/show.html.erb +0 -46
  250. data/lib/spree_core/validation_group.rb +0 -143
  251. data/public/stylesheets/scaffold.css +0 -54
@@ -2,10 +2,6 @@
2
2
  # Allow some application_helper methods to be used in the scoped form_for manner
3
3
  #
4
4
  class ActionView::Helpers::FormBuilder
5
- def label(method, text = nil, options={})
6
- @template.label(@object_name,method,text,options)
7
- end
8
-
9
5
  def field_container(method, options = {}, &block)
10
6
  @template.field_container(@object_name,method,options,&block)
11
7
  end
@@ -13,7 +9,7 @@ class ActionView::Helpers::FormBuilder
13
9
  def error_message_on(method, options = {})
14
10
  @template.error_message_on(@object_name, method, objectify_options(options))
15
11
  end
16
-
12
+
17
13
  def spree_date_picker(method, options = {}, html_options = {})
18
14
  @template.spree_date_picker(@object_name, method, options, html_options)
19
15
  end
@@ -5,10 +5,10 @@ if RUBY_VERSION.to_f >= 1.9
5
5
  def mb_chars
6
6
  self.force_encoding(Encoding::UTF_8)
7
7
  end
8
-
8
+
9
9
  alias_method(:orig_concat, :concat)
10
10
  def concat(value)
11
- orig_concat value.force_encoding(Encoding::UTF_8)
11
+ orig_concat value.frozen? ? value : value.force_encoding(Encoding::UTF_8)
12
12
  end
13
13
  end
14
14
 
@@ -49,7 +49,7 @@ if RUBY_VERSION.to_f >= 1.9
49
49
  def encode(value, encoding = "utf-8")
50
50
  String === value ? value.force_encoding(encoding) : value
51
51
  end
52
-
52
+
53
53
  def each_utf8(&block)
54
54
  each_orig do |row|
55
55
  yield row.map {|col| encode(col) }
@@ -57,7 +57,7 @@ if RUBY_VERSION.to_f >= 1.9
57
57
  end
58
58
  alias each_orig each
59
59
  alias each each_utf8
60
-
60
+
61
61
  def each_hash_utf8(&block)
62
62
  each_hash_orig do |row|
63
63
  row.each {|k, v| row[k] = encode(v) }
@@ -68,5 +68,5 @@ if RUBY_VERSION.to_f >= 1.9
68
68
  alias each_hash each_hash_utf8
69
69
  end
70
70
  end
71
-
71
+
72
72
  end
@@ -25,9 +25,9 @@ en:
25
25
  address2: "Address (contd.)"
26
26
  city: City
27
27
  country: "Country"
28
- first_name: "First Name"
28
+ firstname: "First Name"
29
29
  first_name_begins_with: "First Name Begins With"
30
- last_name: "Last Name"
30
+ lastname: "Last Name"
31
31
  last_name_begins_with: "Last Name Begins With"
32
32
  phone: Phone
33
33
  state: "State"
@@ -68,6 +68,7 @@ en:
68
68
  quantity: Quantity
69
69
  order:
70
70
  checkout_complete: "Checkout Complete"
71
+ completed_at: "Completed At"
71
72
  ip_address: "IP Address"
72
73
  item_total: "Item Total"
73
74
  number: Number
@@ -333,6 +334,7 @@ en:
333
334
  debit: Debit
334
335
  default: Default
335
336
  delete: Delete
337
+ delivery: Delivery
336
338
  depth: Depth
337
339
  description: Description
338
340
  destroy: Destroy
@@ -368,9 +370,16 @@ en:
368
370
  enable_login_via_openid: "Use OpenID instead"
369
371
  enable_mail_delivery: Enable Mail Delivery
370
372
  enter_exactly_as_shown_on_card: Please enter exactly as shown on the card
373
+ enter_atleast_five_letters: Enter atleast five letters of customer name
371
374
  enter_password_to_confirm: "(we need your current password to confirm your changes)"
372
375
  environment: "Environment"
373
376
  error: error
377
+ errors:
378
+ messages:
379
+ no_shipping_methods_available: "No shipping methods available for selected location, please change your address and try again."
380
+ errors_prohibited_this_record_from_being_saved:
381
+ one: "1 error prohibited this record from being saved"
382
+ other: "%{count} errors prohibited this record from being saved"
374
383
  event: Event
375
384
  existing_customer: "Existing Customer"
376
385
  expiration: "Expiration"
@@ -391,15 +400,18 @@ en:
391
400
  flat_rate_per_order: "Flat Rate (per order)"
392
401
  flexible_rate: "Flexible Rate"
393
402
  forgot_password: "Forgot Password?"
403
+ from_state: From State
394
404
  front_end: Front End
395
405
  full_name: "Full Name"
396
406
  gateway: Gateway
397
407
  gateway_configuration: "Gateway configuration"
408
+ gateway_config_unavailable: "Gateway unavailable for environment"
398
409
  gateway_error: "Gateway Error"
399
410
  gateway_setting_description: "Select a payment gateway and configure its settings."
400
411
  gateway_settings_warning: "If you are changing the gateway type, you must save first before you can edit the gateway settings"
401
412
  general: "General"
402
413
  general_settings: "General Settings"
414
+ edit_general_settings: "Edit General Settings"
403
415
  general_settings_description: "Configure general Spree settings."
404
416
  google_analytics: "Google Analytics"
405
417
  google_analytics_active: "Active"
@@ -522,7 +534,6 @@ en:
522
534
  no_payment_methods_available: "Can't check out, no payment methods are configured for this environment"
523
535
  no_products_found: "No products found"
524
536
  no_results: "No results"
525
- no_shipping_methods_available: "No shipping methods available, please change your address and try again."
526
537
  no_user_found: "No user was found with that email address"
527
538
  none: None
528
539
  none_available: "None Available"
@@ -540,8 +551,9 @@ en:
540
551
  variant_not_deleted: "Variant could not be deleted"
541
552
  on_hand: "On Hand"
542
553
  operation: Operation
543
- option_Values: "Option Values"
554
+ option_type: "Option Type"
544
555
  option_types: "Option Types"
556
+ option_value: "Option Value"
545
557
  option_values: "Option Values"
546
558
  options: Options
547
559
  or: or
@@ -552,6 +564,11 @@ en:
552
564
  order_date: "Order Date"
553
565
  order_details: "Order Details"
554
566
  order_email_resent: "Order Email Resent"
567
+ order_mailer:
568
+ confirm_email:
569
+ subject: "Order Confirmation"
570
+ cancel_email:
571
+ subject: "Cancellation of Order"
555
572
  order_not_in_system: That order number is not valid on this site.
556
573
  order_number: Order
557
574
  order_operation_authorize: Authorize
@@ -594,6 +611,7 @@ en:
594
611
  path: Path
595
612
  pay: pay
596
613
  payment: Payment
614
+ payment_actions: "Actions"
597
615
  payment_gateway: "Payment Gateway"
598
616
  payment_information: "Payment Information"
599
617
  payment_method: Payment Method
@@ -603,9 +621,14 @@ en:
603
621
  payment_state: Payment State
604
622
  payment_states:
605
623
  balance_due: balance due
624
+ completed: completed
625
+ checkout: checkout
606
626
  credit_owed: credit owed
607
627
  failed: failed
608
628
  paid: paid
629
+ pending: pending
630
+ processing: processing
631
+ void: void
609
632
  payment_updated: Payment Updated
610
633
  payments: Payments
611
634
  pending_payments: Pending Payments
@@ -824,6 +847,9 @@ en:
824
847
  ship_address: "Ship Address"
825
848
  shipment: Shipment
826
849
  shipment_details: Shipment Details
850
+ shipment_mailer:
851
+ shipped_email:
852
+ subject: "Shipment Notification"
827
853
  shipment_number: "Shipment #"
828
854
  shipment_state: Shipment State
829
855
  shipment_states:
@@ -881,8 +907,6 @@ en:
881
907
  ssl_will_be_used_in_production_mode: "SSL will be used in production mode"
882
908
  ssl_will_not_be_used_in_development_and_test_modes: "SSL will not be used in development and test mode if necessary."
883
909
  ssl_will_not_be_used_in_production_mode: "SSL will not be used in production mode"
884
- spree_alert_checking: "Check for Spree security and release alerts"
885
- spree_alert_not_checking: "Not checking for Spree security and release alerts"
886
910
  start: Start
887
911
  start_date: Valid from
888
912
  state: State
@@ -918,11 +942,13 @@ en:
918
942
  test: "Test"
919
943
  test_mode: Test Mode
920
944
  thank_you_for_your_order: "Thank you for your business. Please print out a copy of this confirmation page for your records."
945
+ there_were_problems_with_the_following_fields: "There were problems with the following fields"
921
946
  this_file_language: "English (US)"
922
947
  this_month: "This Month"
923
948
  this_year: "This Year"
924
949
  thumbnail: "Thumbnail"
925
950
  to_add_variants_you_must_first_define: "To add variants, you must first define"
951
+ to_state: "To State"
926
952
  top_grossing_products: "Top Grossing Products"
927
953
  total: Total
928
954
  tracking: Tracking
@@ -975,6 +1001,7 @@ en:
975
1001
  width: Width
976
1002
  year: "Year"
977
1003
  you_have_been_logged_out: "You have been logged out."
1004
+ you_have_no_orders_yet: "You have no orders yet."
978
1005
  your_cart_is_empty: "Your cart is empty"
979
1006
  zip: Zip
980
1007
  zone: Zone
data/config/routes.rb CHANGED
@@ -8,10 +8,6 @@ Rails.application.routes.draw do
8
8
 
9
9
  resources :tax_categories
10
10
 
11
- resources :countries, :only => :index do
12
- resources :states
13
- end
14
-
15
11
  resources :states, :only => :index
16
12
 
17
13
  # non-restful checkout stuff
@@ -49,7 +45,7 @@ Rails.application.routes.draw do
49
45
  end
50
46
 
51
47
  # # Search routes
52
- match 's/:product_group_query' => 'products#index', :as => :simple_search
48
+ match 's/*product_group_query' => 'products#index', :as => :simple_search
53
49
  match '/pg/:product_group_name' => 'products#index', :as => :pg_search
54
50
  match '/t/*id/s/*product_group_query' => 'taxons#show', :as => :taxons_search
55
51
  match 't/*id/pg/:product_group_name' => 'taxons#show', :as => :taxons_pg_search
@@ -75,11 +71,19 @@ Rails.application.routes.draw do
75
71
  resources :configurations
76
72
  resources :products do
77
73
  resources :product_properties
78
- resources :images
74
+ resources :images do
75
+ collection do
76
+ post :update_positions
77
+ end
78
+ end
79
79
  member do
80
80
  get :clone
81
81
  end
82
- resources :variants
82
+ resources :variants do
83
+ collection do
84
+ post :update_positions
85
+ end
86
+ end
83
87
  resources :option_types do
84
88
  member do
85
89
  get :select
@@ -101,7 +105,12 @@ Rails.application.routes.draw do
101
105
  end
102
106
  end
103
107
  end
104
- resources :option_types
108
+ resources :option_types do
109
+ collection do
110
+ post :update_positions
111
+ end
112
+ end
113
+
105
114
  resources :properties do
106
115
  collection do
107
116
  get :filtered
@@ -149,11 +158,7 @@ Rails.application.routes.draw do
149
158
  end
150
159
  end
151
160
 
152
- resource :general_settings do
153
- collection do
154
- post :dismiss_alert
155
- end
156
- end
161
+ resource :general_settings
157
162
 
158
163
  resources :taxonomies do
159
164
  member do
@@ -2,18 +2,18 @@ class AddCountOnHandToVariantsAndProducts < ActiveRecord::Migration
2
2
  def self.up
3
3
  add_column :variants, :count_on_hand, :integer, :default => 0, :null => false
4
4
  add_column :products, :count_on_hand, :integer, :default => 0, :null => false
5
-
5
+
6
6
  # In some cases needed to reflect changes in table structure
7
7
  Variant.reset_column_information
8
8
  Product.reset_column_information
9
-
10
- say_with_time 'Transfering inventory units with status on_hand to variants table...' do
9
+
10
+ say_with_time 'Transfering inventory units with status on_hand to variants table...' do
11
11
  Variant.all.each do |v|
12
12
  v.update_attribute(:count_on_hand, v.inventory_units.with_state("on_hand").size)
13
13
  InventoryUnit.destroy_all(:variant_id => v.id, :state => "on_hand")
14
14
  end
15
15
  end
16
-
16
+
17
17
  say_with_time 'Updating products count on hand' do
18
18
  Product.all.each do |p|
19
19
  product_count_on_hand = p.has_variants? ?
@@ -29,7 +29,7 @@ class AddCountOnHandToVariantsAndProducts < ActiveRecord::Migration
29
29
  v.count_on_hand.times do
30
30
  InventoryUnit.create(:variant => variant, :state => 'on_hand')
31
31
  end
32
- end
32
+ end
33
33
  remove_column :variants, :count_on_hand
34
34
  remove_column :products, :count_on_hand
35
35
  end
@@ -1,19 +1,19 @@
1
1
  class CreditcardLastFourDigits < ActiveRecord::Migration
2
-
2
+
3
3
  # Hack to allow for legacy migrations
4
4
  class Creditcard < ActiveRecord::Base
5
5
  end
6
-
6
+
7
7
  def self.up
8
8
  rename_column :creditcards, :display_number, :last_digits
9
-
9
+
10
10
  Creditcard.reset_column_information
11
11
  Creditcard.all.each do |card|
12
12
  card.update_attribute(:last_digits, card.last_digits.gsub("XXXX-XXXX-XXXX-", "")) if card.last_digits.present?
13
- end
13
+ end
14
14
  end
15
15
 
16
16
  def self.down
17
- rename_column :creditcards, :last_digits, :display_number
17
+ rename_column :creditcards, :last_digits, :display_number
18
18
  end
19
19
  end
@@ -1,8 +1,8 @@
1
1
  class ShipmentIdForInventoryUnits < ActiveRecord::Migration
2
2
  def self.up
3
3
  add_column "inventory_units", "shipment_id", :integer
4
- add_index(:inventory_units, :shipment_id)
5
-
4
+ add_index(:inventory_units, :shipment_id)
5
+
6
6
  # migrate legacy shipments
7
7
  Shipment.all.each do |shipment|
8
8
  unless shipment.order
@@ -1,5 +1,5 @@
1
1
  class CreatePaymentMethods < ActiveRecord::Migration
2
- def self.up
2
+ def self.up
3
3
  create_table :payment_methods do |t|
4
4
  t.string :type
5
5
  t.string :name
@@ -8,10 +8,10 @@ class CreatePaymentMethods < ActiveRecord::Migration
8
8
  t.string :environment, :default => "development"
9
9
  t.timestamps
10
10
  end
11
- # TODO - also migrate any legacy configurations for gateways and billing integrations before dropping the old tables
11
+ # TODO - also migrate any legacy configurations for gateways and billing integrations before dropping the old tables
12
12
  # we probably also need to do this inside the payment_gateway extension b/c table won't exist yet in fresh bootstrap
13
13
  #drop_table :billing_integrations
14
- #drop_table :gateways
14
+ #drop_table :gateways
15
15
  end
16
16
 
17
17
  def self.down
@@ -20,7 +20,7 @@ class PolymorphicPayments < ActiveRecord::Migration
20
20
 
21
21
  change_table :creditcards do |t|
22
22
  t.remove :checkout_id
23
- end
23
+ end
24
24
  end
25
25
 
26
26
  def self.down
@@ -1,6 +1,6 @@
1
1
  class AssignCreditcardTxnsToPayment < ActiveRecord::Migration
2
2
  def self.up
3
- add_column "creditcard_txns", "payment_id", :integer
3
+ add_column "creditcard_txns", "payment_id", :integer
4
4
  ActiveRecord::Base.connection.select_all("SELECT * FROM creditcard_txns").each do |txn_attrs|
5
5
  if creditcard = Creditcard.find_by_id(txn_attrs["creditcard_id"]) and creditcard.payments.first
6
6
  execute "UPDATE creditcard_txns SET payment_id = #{creditcard.payments.first.id} WHERE id = #{txn_attrs['id']}"
@@ -11,6 +11,6 @@ class AssignCreditcardTxnsToPayment < ActiveRecord::Migration
11
11
 
12
12
  def self.down
13
13
  remove_column "creditcard_txns", "payment_id"
14
- add_column "creditcard_txns", "creditcard_payment_id", :integer
14
+ add_column "creditcard_txns", "creditcard_payment_id", :integer
15
15
  end
16
16
  end
@@ -1,5 +1,5 @@
1
1
  class DeletedAtForPaymentMethods < ActiveRecord::Migration
2
- def self.up
2
+ def self.up
3
3
  change_table :payment_methods do |t|
4
4
  t.timestamp :deleted_at, :default => nil
5
5
  end
@@ -1,7 +1,7 @@
1
1
  class AddDescriptionToTaxons < ActiveRecord::Migration
2
2
  def self.up
3
3
  # skip this migration if the attribute already exists because of advanced taxon extension
4
- return if Taxon.new.respond_to? :description
4
+ return if column_exists?(:taxons, :description)
5
5
  add_column :taxons, :description, :text
6
6
  end
7
7
 
@@ -1,6 +1,6 @@
1
1
  class ShippingMethodIdForOrders < ActiveRecord::Migration
2
2
  def self.up
3
- add_column :orders, :shipping_method_id, :integer
3
+ add_column :orders, :shipping_method_id, :integer
4
4
  end
5
5
 
6
6
  def self.down
@@ -1,8 +1,8 @@
1
1
  class MigrateCheckoutToOrders < ActiveRecord::Migration
2
-
2
+
3
3
  class Checkout < ActiveRecord::Base
4
4
  end
5
-
5
+
6
6
  def self.up
7
7
  Order.find_each do |order|
8
8
  checkout = update_order(order)
@@ -0,0 +1,9 @@
1
+ class AddPositionToVariants < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :variants, :position, :integer
4
+ end
5
+
6
+ def self.down
7
+ remove_column :variants, :position
8
+ end
9
+ end