spree_core 4.4.0 → 4.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (212) hide show
  1. checksums.yaml +4 -4
  2. data/app/finders/spree/option_values/find_available.rb +1 -1
  3. data/app/finders/spree/product_properties/find_available.rb +1 -1
  4. data/app/finders/spree/products/find.rb +21 -15
  5. data/app/finders/spree/taxons/find.rb +11 -8
  6. data/app/helpers/spree/base_helper.rb +14 -11
  7. data/app/helpers/spree/locale_helper.rb +6 -2
  8. data/app/helpers/spree/products_helper.rb +9 -4
  9. data/app/jobs/spree/variants/remove_from_incomplete_orders_job.rb +9 -0
  10. data/app/jobs/spree/variants/remove_line_item_job.rb +9 -0
  11. data/app/models/concerns/spree/calculated_adjustments.rb +1 -1
  12. data/app/models/concerns/spree/display_link.rb +17 -29
  13. data/app/models/concerns/spree/image_methods.rb +21 -9
  14. data/app/models/concerns/spree/metadata.rb +2 -2
  15. data/app/models/concerns/spree/product_scopes.rb +34 -28
  16. data/app/models/concerns/spree/translatable_resource.rb +25 -0
  17. data/app/models/concerns/spree/translatable_resource_scopes.rb +24 -0
  18. data/app/models/concerns/spree/translatable_resource_slug.rb +17 -0
  19. data/app/models/spree/address.rb +7 -1
  20. data/app/models/spree/asset/support/active_storage.rb +3 -2
  21. data/app/models/spree/asset.rb +3 -0
  22. data/app/models/spree/base.rb +1 -0
  23. data/app/models/spree/cms_page.rb +4 -0
  24. data/app/models/spree/cms_section.rb +12 -12
  25. data/app/models/spree/cms_section_image.rb +15 -0
  26. data/app/models/spree/cms_section_image_one.rb +4 -0
  27. data/app/models/spree/cms_section_image_three.rb +4 -0
  28. data/app/models/spree/cms_section_image_two.rb +4 -0
  29. data/app/models/spree/credit_card.rb +10 -4
  30. data/app/models/spree/customer_return.rb +3 -0
  31. data/app/models/spree/data_feed/google.rb +15 -0
  32. data/app/models/spree/data_feed.rb +40 -0
  33. data/app/models/spree/digital.rb +4 -0
  34. data/app/models/spree/digital_link.rb +7 -0
  35. data/app/models/spree/fulfilment_changer.rb +1 -1
  36. data/app/models/spree/gateway/bogus.rb +1 -1
  37. data/app/models/spree/icon.rb +5 -1
  38. data/app/models/spree/image/configuration/active_storage.rb +5 -1
  39. data/app/models/spree/image.rb +3 -3
  40. data/app/models/spree/inventory_unit.rb +5 -2
  41. data/app/models/spree/legacy_user.rb +1 -2
  42. data/app/models/spree/line_item.rb +4 -1
  43. data/app/models/spree/linkable/homepage.rb +3 -0
  44. data/app/models/spree/linkable/uri.rb +3 -0
  45. data/app/models/spree/log_entry.rb +9 -1
  46. data/app/models/spree/menu.rb +3 -0
  47. data/app/models/spree/menu_item.rb +7 -11
  48. data/app/models/spree/option_type.rb +8 -0
  49. data/app/models/spree/option_value.rb +9 -0
  50. data/app/models/spree/order/address_book.rb +1 -0
  51. data/app/models/spree/order.rb +12 -3
  52. data/app/models/spree/order_merger.rb +1 -1
  53. data/app/models/spree/payment/processing.rb +1 -1
  54. data/app/models/spree/payment.rb +7 -1
  55. data/app/models/spree/payment_capture_event.rb +4 -0
  56. data/app/models/spree/payment_method/store_credit.rb +1 -1
  57. data/app/models/spree/payment_method.rb +3 -0
  58. data/app/models/spree/payment_source.rb +10 -0
  59. data/app/models/spree/preference.rb +4 -0
  60. data/app/models/spree/price.rb +3 -0
  61. data/app/models/spree/product.rb +97 -24
  62. data/app/models/spree/product_property.rb +13 -3
  63. data/app/models/spree/promotion/rules/option_value.rb +2 -2
  64. data/app/models/spree/promotion.rb +6 -0
  65. data/app/models/spree/promotion_rule.rb +1 -1
  66. data/app/models/spree/promotion_rule_user.rb +1 -1
  67. data/app/models/spree/property.rb +10 -1
  68. data/app/models/spree/prototype.rb +3 -0
  69. data/app/models/spree/refund.rb +8 -0
  70. data/app/models/spree/reimbursement.rb +3 -0
  71. data/app/models/spree/return_authorization.rb +3 -0
  72. data/app/models/spree/return_item.rb +4 -0
  73. data/app/models/spree/role.rb +1 -1
  74. data/app/models/spree/role_user.rb +1 -1
  75. data/app/models/spree/shipment.rb +8 -1
  76. data/app/models/spree/shipping_category.rb +3 -0
  77. data/app/models/spree/shipping_method.rb +6 -0
  78. data/app/models/spree/state_change.rb +1 -1
  79. data/app/models/spree/stock/availability_validator.rb +9 -3
  80. data/app/models/spree/stock/content_item.rb +1 -1
  81. data/app/models/spree/stock/quantifier.rb +1 -1
  82. data/app/models/spree/stock_item.rb +5 -0
  83. data/app/models/spree/stock_location.rb +19 -5
  84. data/app/models/spree/stock_movement.rb +4 -0
  85. data/app/models/spree/stock_transfer.rb +3 -0
  86. data/app/models/spree/store.rb +39 -15
  87. data/app/models/spree/store_credit.rb +4 -1
  88. data/app/models/spree/store_favicon_image.rb +17 -0
  89. data/app/models/spree/store_logo.rb +9 -0
  90. data/app/models/spree/store_mailer_logo.rb +13 -0
  91. data/app/models/spree/tax_category.rb +6 -0
  92. data/app/models/spree/tax_rate.rb +6 -1
  93. data/app/models/spree/taxon.rb +26 -7
  94. data/app/models/spree/taxon_image/configuration/active_storage.rb +5 -1
  95. data/app/models/spree/taxon_image.rb +3 -2
  96. data/app/models/spree/taxonomy.rb +8 -1
  97. data/app/models/spree/variant.rb +47 -21
  98. data/app/models/spree/wished_item.rb +4 -0
  99. data/app/models/spree/wishlist.rb +4 -1
  100. data/app/models/spree/zone.rb +3 -0
  101. data/app/services/spree/addresses/create.rb +1 -1
  102. data/app/services/spree/addresses/update.rb +7 -2
  103. data/app/services/spree/cart/remove_line_item.rb +1 -0
  104. data/app/services/spree/data_feeds/google/optional_attributes.rb +23 -0
  105. data/app/services/spree/data_feeds/google/optional_sub_attributes.rb +21 -0
  106. data/app/services/spree/data_feeds/google/products_list.rb +14 -0
  107. data/app/services/spree/data_feeds/google/required_attributes.rb +67 -0
  108. data/app/services/spree/data_feeds/google/rss.rb +107 -0
  109. data/app/services/spree/variants/remove_line_items.rb +15 -0
  110. data/app/sorters/spree/products/sort.rb +23 -0
  111. data/brakeman.ignore +326 -18
  112. data/config/initializers/friendly_id.rb +2 -0
  113. data/config/initializers/mobility.rb +18 -0
  114. data/config/locales/en.yml +6 -2
  115. data/config/routes.rb +43 -0
  116. data/db/migrate/20211201202851_update_linkable_resource_types.rb +10 -0
  117. data/db/migrate/20211203082008_add_settings_to_payment_methods.rb +11 -0
  118. data/db/migrate/20211229162122_disable_propagate_all_variants_by_default.rb +5 -0
  119. data/db/migrate/20220103082046_add_status_and_make_active_at_to_spree_products.rb +7 -0
  120. data/db/migrate/20220106230929_add_internal_note_to_spree_orders.rb +5 -0
  121. data/db/migrate/20220113052823_create_payment_sources.rb +22 -0
  122. data/db/migrate/20220117100333_add_make_active_at_to_spree_products.rb +17 -0
  123. data/db/migrate/20220120092821_add_metadata_to_spree_tax_rates.rb +13 -0
  124. data/db/migrate/20220201103922_add_first_name_and_last_name_to_spree_users.rb +9 -0
  125. data/db/migrate/20220222083546_add_barcode_to_spree_variants.rb +6 -0
  126. data/db/migrate/20220329113557_fix_cms_pages_unique_indexes.rb +8 -0
  127. data/db/migrate/20220613133029_add_metadata_to_spree_stock_items.rb +13 -0
  128. data/db/migrate/20220706112554_create_product_name_and_description_translations_for_mobility_table_backend.rb +27 -0
  129. data/db/migrate/20220715083542_create_spree_product_translations_for_mobility.rb +7 -0
  130. data/db/migrate/20220715120222_change_product_name_null_to_true.rb +5 -0
  131. data/db/migrate/20220718100743_create_spree_taxon_name_and_description_translations_for_mobility_table_backend.rb +27 -0
  132. data/db/migrate/20220718100948_change_taxon_name_null_to_true.rb +5 -0
  133. data/db/migrate/20220802070609_add_locale_to_friendly_id_slugs.rb +11 -0
  134. data/db/migrate/20220802073225_create_spree_product_slug_translations_for_mobility_table_backend.rb +5 -0
  135. data/db/migrate/20220804073928_transfer_data_to_translatable_tables.rb +66 -0
  136. data/db/migrate/20221215151408_add_selected_locale_to_spree_users.rb +8 -0
  137. data/db/migrate/20221219123957_add_deleted_at_to_product_translations.rb +6 -0
  138. data/db/migrate/20221220133432_add_uniqueness_constraint_to_product_translations.rb +5 -0
  139. data/db/migrate/20221229132350_create_spree_data_feed_settings.rb +14 -0
  140. data/db/migrate/20230103144439_create_option_type_translations.rb +26 -0
  141. data/db/migrate/20230103151034_create_option_value_translations.rb +26 -0
  142. data/db/migrate/20230109084253_create_product_property_translations.rb +25 -0
  143. data/db/migrate/20230109094907_transfer_options_data_to_translatable_tables.rb +58 -0
  144. data/db/migrate/20230109105943_create_property_translations.rb +26 -0
  145. data/db/migrate/20230109110840_transfer_property_data_to_translatable_tables.rb +59 -0
  146. data/db/migrate/20230110142344_backfill_friendly_id_slug_locale.rb +15 -0
  147. data/db/migrate/20230111121534_add_additional_taxon_translation_fields.rb +8 -0
  148. data/db/migrate/20230111122511_transfer_product_and_taxon_data_to_translatable_tables.rb +82 -0
  149. data/db/migrate/20230117115531_create_taxonomy_translations.rb +24 -0
  150. data/db/migrate/20230117120430_allow_null_taxonomy_name.rb +5 -0
  151. data/db/migrate/20230117121303_transfer_taxonomy_data_to_translatable_tables.rb +11 -0
  152. data/db/migrate/20230210142732_create_store_translations.rb +50 -0
  153. data/db/migrate/20230210142849_transfer_store_data_to_translatable_tables.rb +11 -0
  154. data/db/migrate/20230210230434_add_deleted_at_to_store_translations.rb +6 -0
  155. data/db/migrate/20230415155958_rename_data_feed_settings_table.rb +5 -0
  156. data/db/migrate/20230415160828_rename_data_feed_table_columns.rb +7 -0
  157. data/db/migrate/20230415161226_add_indexes_to_data_feeds_table.rb +5 -0
  158. data/db/migrate/20230512094803_rename_data_feeds_column_provider_to_type.rb +5 -0
  159. data/db/migrate/20230514162157_add_index_on_locale_and_permalink_to_spree_taxons.rb +5 -0
  160. data/lib/friendly_id/paranoia.rb +4 -0
  161. data/lib/generators/spree/dummy/dummy_generator.rb +13 -2
  162. data/lib/generators/spree/dummy/templates/package.json +12 -0
  163. data/lib/generators/spree/dummy/templates/rails/test.rb +2 -0
  164. data/lib/spree/core/configuration.rb +91 -0
  165. data/lib/spree/core/controller_helpers/auth.rb +3 -1
  166. data/lib/spree/core/controller_helpers/currency.rb +7 -5
  167. data/lib/spree/core/controller_helpers/locale.rb +34 -8
  168. data/lib/spree/core/controller_helpers/order.rb +4 -2
  169. data/lib/spree/core/controller_helpers/search.rb +1 -1
  170. data/lib/spree/core/controller_helpers/store.rb +5 -3
  171. data/lib/spree/core/dependencies.rb +106 -0
  172. data/lib/spree/core/dependencies_helper.rb +19 -0
  173. data/lib/spree/core/engine.rb +53 -38
  174. data/{app/models/spree → lib/spree/core}/preferences/configuration.rb +3 -0
  175. data/{app/models/spree → lib/spree/core}/preferences/preferable.rb +3 -0
  176. data/lib/spree/core/product_duplicator.rb +1 -1
  177. data/lib/spree/core/product_filters.rb +7 -4
  178. data/lib/spree/core/search/base.rb +10 -6
  179. data/lib/spree/core/version.rb +1 -1
  180. data/lib/spree/core.rb +27 -5
  181. data/lib/spree/permitted_attributes.rb +9 -7
  182. data/lib/spree/testing_support/common_rake.rb +1 -0
  183. data/lib/spree/testing_support/factories/favicon_image_factory.rb +9 -0
  184. data/lib/spree/testing_support/factories/google_data_feed_factory.rb +8 -0
  185. data/lib/spree/testing_support/factories/icon_factory.rb +3 -1
  186. data/lib/spree/testing_support/factories/image_factory.rb +3 -1
  187. data/lib/spree/testing_support/factories/menu_item_factory.rb +1 -1
  188. data/lib/spree/testing_support/factories/order_factory.rb +2 -1
  189. data/lib/spree/testing_support/factories/product_factory.rb +12 -1
  190. data/lib/spree/testing_support/factories/product_property_factory.rb +1 -0
  191. data/lib/spree/testing_support/factories/product_translation_factory.rb +6 -0
  192. data/lib/spree/testing_support/factories/refund_factory.rb +1 -1
  193. data/lib/spree/testing_support/factories/return_authorization_factory.rb +1 -1
  194. data/lib/spree/testing_support/factories/role_factory.rb +1 -1
  195. data/lib/spree/testing_support/factories/shipping_category_factory.rb +1 -1
  196. data/lib/spree/testing_support/factories/stock_location_factory.rb +3 -2
  197. data/lib/spree/testing_support/factories/store_factory.rb +2 -1
  198. data/lib/spree/testing_support/factories/taxon_image_factory.rb +3 -1
  199. data/lib/spree/testing_support/factories/user_factory.rb +4 -0
  200. data/lib/spree/testing_support/factories/variant_factory.rb +8 -0
  201. data/lib/spree/translation_migrations.rb +40 -0
  202. data/lib/spree_core.rb +2 -1
  203. data/lib/tasks/core.rake +12 -0
  204. data/spree_core.gemspec +5 -3
  205. metadata +152 -52
  206. data/app/models/friendly_id/slug_decorator.rb +0 -9
  207. data/app/models/spree/app_configuration.rb +0 -86
  208. data/lib/friendly_id/slug_rails5_patch.rb +0 -11
  209. data/lib/spree/core/app_dependencies.rb +0 -126
  210. /data/{app/models/spree → lib/spree/core}/preferences/preferable_class_methods.rb +0 -0
  211. /data/{app/models/spree → lib/spree/core}/preferences/scoped_store.rb +0 -0
  212. /data/{app/models/spree → lib/spree/core}/preferences/store.rb +0 -0
@@ -1,86 +0,0 @@
1
- # This is the primary location for defining spree preferences
2
- #
3
- # The expectation is that this is created once and stored in
4
- # the spree environment
5
- #
6
- # setters:
7
- # a.color = :blue
8
- # a[:color] = :blue
9
- # a.set :color = :blue
10
- # a.preferred_color = :blue
11
- #
12
- # getters:
13
- # a.color
14
- # a[:color]
15
- # a.get :color
16
- # a.preferred_color
17
- #
18
- require 'spree/core/search/base'
19
-
20
- module Spree
21
- class AppConfiguration < Preferences::Configuration
22
- # Alphabetized to more easily lookup particular preferences
23
- preference :address_requires_state, :boolean, default: true # should state/state_name be required
24
- preference :address_requires_phone, :boolean, default: true # Determines whether we require phone in address
25
- preference :admin_path, :string, deprecated: true
26
- preference :admin_products_per_page, :integer, deprecated: true
27
- preference :admin_orders_per_page, :integer, deprecated: true
28
- preference :admin_properties_per_page, :integer, deprecated: true
29
- preference :admin_promotions_per_page, :integer, deprecated: true
30
- preference :admin_customer_returns_per_page, :integer, deprecated: true
31
- preference :admin_users_per_page, :integer, deprecated: true
32
- preference :admin_show_version, :boolean, deprecated: true
33
- preference :allow_checkout_on_gateway_error, :boolean, default: false
34
- preference :allow_guest_checkout, :boolean, default: true
35
- preference :alternative_shipping_phone, :boolean, default: false # Request extra phone for ship addr
36
- preference :always_include_confirm_step, :boolean, default: false # Ensures confirmation step is always in checkout_progress bar, but does not force a confirm step if your payment methods do not support it.
37
- preference :always_put_site_name_in_title, :boolean, deprecated: true
38
- preference :title_site_name_separator, :string, deprecated: true
39
- preference :auto_capture, :boolean, default: false # automatically capture the credit card (as opposed to just authorize and capture later)
40
- preference :auto_capture_on_dispatch, :boolean, default: false # Captures payment for each shipment in Shipment#after_ship callback, and makes Shipment.ready when payment authorized.
41
- preference :binary_inventory_cache, :boolean, default: false # only invalidate product cache when a stock item changes whether it is in_stock
42
- preference :checkout_zone, :string, default: nil, deprecated: true # replace with the name of a zone if you would like to limit the countries
43
- preference :company, :boolean, default: false # Request company field for billing and shipping addr
44
- preference :currency, :string, default: 'USD', deprecated: true
45
- preference :default_country_id, :integer, deprecated: true
46
- preference :disable_sku_validation, :boolean, default: false # when turned off disables the built-in SKU uniqueness validation
47
- preference :disable_store_presence_validation, :boolean, default: false # when turned off disables Store presence validation for Products and Payment Methods
48
- preference :expedited_exchanges, :boolean, default: false # NOTE this requires payment profiles to be supported on your gateway of choice as well as a delayed job handler to be configured with activejob. kicks off an exchange shipment upon return authorization save. charge customer if they do not return items within timely manner.
49
- preference :expedited_exchanges_days_window, :integer, default: 14 # the amount of days the customer has to return their item after the expedited exchange is shipped in order to avoid being charged
50
- preference :layout, :string, deprecated: 'Please use Spree::Frontend::Config[:layout] instead'
51
- preference :logo, :string, deprecated: true
52
- preference :mailer_logo, :string, deprecated: true
53
- preference :max_level_in_taxons_menu, :integer, deprecated: true
54
- preference :products_per_page, :integer, default: 12
55
- preference :require_master_price, :boolean, default: true
56
- preference :restock_inventory, :boolean, default: true # Determines if a return item is restocked automatically once it has been received
57
- preference :return_eligibility_number_of_days, :integer, default: 365
58
- preference :send_core_emails, :boolean, default: true # Default mail headers settings
59
- preference :shipping_instructions, :boolean, deprecated: true
60
- preference :show_only_complete_orders_by_default, :boolean, deprecated: true
61
- preference :show_variant_full_price, :boolean, default: false # Displays variant full price or difference with product price. Default false to be compatible with older behavior
62
- preference :show_products_without_price, :boolean, default: false
63
- preference :show_raw_product_description, :boolean, deprecated: true
64
- preference :tax_using_ship_address, :boolean, default: true
65
- preference :track_inventory_levels, :boolean, default: true # Determines whether to track on_hand values for variants / products.
66
-
67
- # Store credits configurations
68
- preference :non_expiring_credit_types, :array, default: []
69
- preference :credit_to_new_allocation, :boolean, default: false
70
-
71
- # Multi store configurations
72
- preference :show_store_selector, :boolean, deprecated: true
73
-
74
- # searcher_class allows spree extension writers to provide their own Search class
75
- def searcher_class
76
- @searcher_class ||= Spree::Core::Search::Base
77
- end
78
-
79
- # Sets the path used for products, taxons and pages.
80
- preference :storefront_products_path, :string, default: 'products'
81
- preference :storefront_taxons_path, :string, default: 't'
82
- preference :storefront_pages_path, :string, default: 'pages'
83
-
84
- attr_writer :searcher_class
85
- end
86
- end
@@ -1,11 +0,0 @@
1
- # Temporary fix to FriendlyId in Rails5, so that we don't
2
- # encounter any validation errors when creating slugs via
3
- # FriendlyId::History on a paranoid model.
4
- # See: https://github.com/norman/friendly_id/issues/822
5
- if Rails::VERSION::STRING >= '5.0'
6
- module FriendlyId
7
- class Slug < ActiveRecord::Base
8
- belongs_to :sluggable, polymorphic: true, optional: true
9
- end
10
- end
11
- end
@@ -1,126 +0,0 @@
1
- module Spree
2
- class AppDependencies
3
- include Spree::DependenciesHelper
4
-
5
- INJECTION_POINTS = [
6
- :ability_class,
7
- :cart_create_service, :cart_add_item_service, :cart_remove_item_service,
8
- :cart_remove_line_item_service, :cart_set_item_quantity_service, :cart_recalculate_service,
9
- :cms_page_finder, :cart_update_service, :checkout_next_service, :checkout_advance_service, :checkout_update_service,
10
- :checkout_complete_service, :checkout_add_store_credit_service, :checkout_remove_store_credit_service, :checkout_get_shipping_rates_service,
11
- :coupon_handler, :menu_finder, :country_finder, :current_order_finder, :credit_card_finder,
12
- :completed_order_finder, :order_sorter, :cart_compare_line_items_service, :collection_paginator, :products_sorter,
13
- :products_finder, :taxon_finder, :line_item_by_variant_finder, :cart_estimate_shipping_rates_service,
14
- :account_create_address_service, :account_update_address_service, :account_create_service, :account_update_service,
15
- :address_finder, :collection_sorter, :error_handler, :current_store_finder, :cart_empty_service, :cart_destroy_service,
16
- :classification_reposition_service, :credit_cards_destroy_service, :cart_associate_service, :cart_change_currency_service,
17
- :line_item_create_service, :line_item_update_service, :line_item_destroy_service,
18
- :order_approve_service, :order_cancel_service, :shipment_change_state_service, :shipment_update_service,
19
- :shipment_create_service, :shipment_add_item_service, :shipment_remove_item_service,
20
- :payment_create_service, :address_create_service, :address_update_service,
21
- :checkout_select_shipping_method_service
22
- ].freeze
23
-
24
- attr_accessor *INJECTION_POINTS
25
-
26
- def initialize
27
- set_default_ability
28
- set_default_services
29
- set_default_finders
30
- end
31
-
32
- private
33
-
34
- def set_default_ability
35
- @ability_class = 'Spree::Ability'
36
- end
37
-
38
- def set_default_services
39
- # cart
40
- @cart_compare_line_items_service = 'Spree::CompareLineItems'
41
- @cart_create_service = 'Spree::Cart::Create'
42
- @cart_add_item_service = 'Spree::Cart::AddItem'
43
- @cart_update_service = 'Spree::Cart::Update'
44
- @cart_recalculate_service = 'Spree::Cart::Recalculate'
45
- @cart_remove_item_service = 'Spree::Cart::RemoveItem'
46
- @cart_remove_line_item_service = 'Spree::Cart::RemoveLineItem'
47
- @cart_set_item_quantity_service = 'Spree::Cart::SetQuantity'
48
- @cart_estimate_shipping_rates_service = 'Spree::Cart::EstimateShippingRates'
49
- @cart_empty_service = 'Spree::Cart::Empty'
50
- @cart_destroy_service = 'Spree::Cart::Destroy'
51
- @cart_associate_service = 'Spree::Cart::Associate'
52
- @cart_change_currency_service = 'Spree::Cart::ChangeCurrency'
53
-
54
- # checkout
55
- @checkout_next_service = 'Spree::Checkout::Next'
56
- @checkout_advance_service = 'Spree::Checkout::Advance'
57
- @checkout_update_service = 'Spree::Checkout::Update'
58
- @checkout_complete_service = 'Spree::Checkout::Complete'
59
- @checkout_add_store_credit_service = 'Spree::Checkout::AddStoreCredit'
60
- @checkout_remove_store_credit_service = 'Spree::Checkout::RemoveStoreCredit'
61
- @checkout_get_shipping_rates_service = 'Spree::Checkout::GetShippingRates'
62
- @checkout_select_shipping_method_service = 'Spree::Checkout::SelectShippingMethod'
63
-
64
- # order
65
- @order_approve_service = 'Spree::Orders::Approve'
66
- @order_cancel_service = 'Spree::Orders::Cancel'
67
-
68
- # shipment
69
- @shipment_change_state_service = 'Spree::Shipments::ChangeState'
70
- @shipment_create_service = 'Spree::Shipments::Create'
71
- @shipment_update_service = 'Spree::Shipments::Update'
72
- @shipment_add_item_service = 'Spree::Shipments::AddItem'
73
- @shipment_remove_item_service = 'Spree::Shipments::RemoveItem'
74
-
75
- # sorter
76
- @collection_sorter = 'Spree::BaseSorter'
77
- @order_sorter = 'Spree::BaseSorter'
78
- @products_sorter = 'Spree::Products::Sort'
79
-
80
- # paginator
81
- @collection_paginator = 'Spree::Shared::Paginate'
82
-
83
- # coupons
84
- # TODO: we should split this service into 2 separate - Add and Remove
85
- @coupon_handler = 'Spree::PromotionHandler::Coupon'
86
-
87
- # account
88
- @account_create_service = 'Spree::Account::Create'
89
- @account_update_service = 'Spree::Account::Update'
90
-
91
- # addresses
92
- @address_create_service = 'Spree::Addresses::Create'
93
- @address_update_service = 'Spree::Addresses::Update'
94
-
95
- # credit cards
96
- @credit_cards_destroy_service = 'Spree::CreditCards::Destroy'
97
-
98
- # classifications
99
- @classification_reposition_service = 'Spree::Classifications::Reposition'
100
-
101
- # line items
102
- @line_item_create_service = 'Spree::LineItems::Create'
103
- @line_item_update_service = 'Spree::LineItems::Update'
104
- @line_item_destroy_service = 'Spree::LineItems::Destroy'
105
-
106
- @payment_create_service = 'Spree::Payments::Create'
107
-
108
- # errors
109
- @error_handler = 'Spree::ErrorReporter'
110
- end
111
-
112
- def set_default_finders
113
- @address_finder = 'Spree::Addresses::Find'
114
- @country_finder = 'Spree::Countries::Find'
115
- @cms_page_finder = 'Spree::CmsPages::Find'
116
- @menu_finder = 'Spree::Menus::Find'
117
- @current_order_finder = 'Spree::Orders::FindCurrent'
118
- @current_store_finder = 'Spree::Stores::FindCurrent'
119
- @completed_order_finder = 'Spree::Orders::FindComplete'
120
- @credit_card_finder = 'Spree::CreditCards::Find'
121
- @products_finder = 'Spree::Products::Find'
122
- @taxon_finder = 'Spree::Taxons::Find'
123
- @line_item_by_variant_finder = 'Spree::LineItems::FindByVariant'
124
- end
125
- end
126
- end