solidus_legacy_promotions 4.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +345 -0
  3. data/Rakefile +43 -0
  4. data/app/assets/config/solidus_legacy_promotions/manifest.js +2 -0
  5. data/app/assets/javascripts/spree/backend/edit_promotion.js +7 -0
  6. data/app/assets/javascripts/spree/backend/promotions/activation.js +26 -0
  7. data/app/assets/javascripts/spree/backend/promotions.js +35 -0
  8. data/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_flat_rate.hbs +23 -0
  9. data/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_percent.hbs +23 -0
  10. data/app/assets/javascripts/spree/backend/templates/promotions/rules/option_values.hbs +12 -0
  11. data/app/assets/javascripts/spree/backend/views/calculators/tiered.js +54 -0
  12. data/app/assets/javascripts/spree/backend/views/order/details_adjustments.js +43 -0
  13. data/app/assets/javascripts/spree/backend/views/promotions/option_values_rule.js +79 -0
  14. data/app/assets/javascripts/spree/backend/views/promotions.js +3 -0
  15. data/app/assets/stylesheets/solidus_legacy_promotions/promotions/_edit.scss +138 -0
  16. data/app/assets/stylesheets/solidus_legacy_promotions/promotions.scss +3 -0
  17. data/app/assets/stylesheets/spree/backend/sections/_adjustments.scss +3 -0
  18. data/app/decorators/solidus_legacy_promotions/controllers/solidus_admin/solidus_admin_adjustments_controller_decorator.rb +20 -0
  19. data/app/decorators/solidus_legacy_promotions/lib/spree_order_state_machine_decorator.rb +18 -0
  20. data/app/decorators/solidus_legacy_promotions/models/spree_adjustment_decorator.rb +76 -0
  21. data/app/decorators/solidus_legacy_promotions/models/spree_calculator_returns_default_refund_amount_decorator.rb +13 -0
  22. data/app/decorators/solidus_legacy_promotions/models/spree_line_item_decorator.rb +11 -0
  23. data/app/decorators/solidus_legacy_promotions/models/spree_order_decorator.rb +28 -0
  24. data/app/decorators/solidus_legacy_promotions/models/spree_order_updater_decorator.rb +40 -0
  25. data/app/decorators/solidus_legacy_promotions/models/spree_product_decorator.rb +16 -0
  26. data/app/decorators/solidus_legacy_promotions/models/spree_promotion_code_batch_decorator.rb +16 -0
  27. data/app/decorators/solidus_legacy_promotions/models/spree_shipment_decorator.rb +13 -0
  28. data/app/helpers/spree/admin/promotions_helper.rb +15 -0
  29. data/app/helpers/spree/promotion_rules_helper.rb +12 -0
  30. data/app/jobs/spree/promotion_code_batch_job.rb +26 -0
  31. data/app/mailers/spree/promotion_code_batch_mailer.rb +15 -0
  32. data/app/models/spree/calculator/distributed_amount.rb +33 -0
  33. data/app/models/spree/calculator/flat_percent_item_total.rb +23 -0
  34. data/app/models/spree/calculator/flexi_rate.rb +22 -0
  35. data/app/models/spree/calculator/percent_on_line_item.rb +13 -0
  36. data/app/models/spree/calculator/tiered_flat_rate.rb +52 -0
  37. data/app/models/spree/calculator/tiered_percent.rb +62 -0
  38. data/app/models/spree/order_contents.rb +36 -0
  39. data/app/models/spree/order_promotion.rb +27 -0
  40. data/app/models/spree/permission_sets/promotion_display.rb +25 -0
  41. data/app/models/spree/permission_sets/promotion_management.rb +25 -0
  42. data/app/models/spree/promotion/actions/create_adjustment.rb +81 -0
  43. data/app/models/spree/promotion/actions/create_item_adjustments.rb +98 -0
  44. data/app/models/spree/promotion/actions/create_quantity_adjustments.rb +139 -0
  45. data/app/models/spree/promotion/actions/free_shipping.rb +59 -0
  46. data/app/models/spree/promotion/order_adjustments_recalculator.rb +92 -0
  47. data/app/models/spree/promotion/rules/first_order.rb +36 -0
  48. data/app/models/spree/promotion/rules/first_repeat_purchase_since.rb +36 -0
  49. data/app/models/spree/promotion/rules/item_total.rb +86 -0
  50. data/app/models/spree/promotion/rules/minimum_quantity.rb +59 -0
  51. data/app/models/spree/promotion/rules/nth_order.rb +45 -0
  52. data/app/models/spree/promotion/rules/one_use_per_user.rb +25 -0
  53. data/app/models/spree/promotion/rules/option_value.rb +50 -0
  54. data/app/models/spree/promotion/rules/product.rb +86 -0
  55. data/app/models/spree/promotion/rules/store.rb +26 -0
  56. data/app/models/spree/promotion/rules/taxon.rb +91 -0
  57. data/app/models/spree/promotion/rules/user.rb +34 -0
  58. data/app/models/spree/promotion/rules/user_logged_in.rb +20 -0
  59. data/app/models/spree/promotion/rules/user_role.rb +45 -0
  60. data/app/models/spree/promotion.rb +271 -0
  61. data/app/models/spree/promotion_action.rb +51 -0
  62. data/app/models/spree/promotion_advertiser.rb +10 -0
  63. data/app/models/spree/promotion_category.rb +8 -0
  64. data/app/models/spree/promotion_chooser.rb +34 -0
  65. data/app/models/spree/promotion_code/batch_builder.rb +68 -0
  66. data/app/models/spree/promotion_code.rb +54 -0
  67. data/app/models/spree/promotion_code_batch.rb +18 -0
  68. data/app/models/spree/promotion_finder.rb +9 -0
  69. data/app/models/spree/promotion_handler/cart.rb +75 -0
  70. data/app/models/spree/promotion_handler/coupon.rb +125 -0
  71. data/app/models/spree/promotion_handler/page.rb +26 -0
  72. data/app/models/spree/promotion_handler/shipping.rb +61 -0
  73. data/app/models/spree/promotion_rule.rb +55 -0
  74. data/app/models/spree/promotion_rule_store.rb +10 -0
  75. data/app/models/spree/promotion_rule_taxon.rb +8 -0
  76. data/app/models/spree/promotion_rule_user.rb +10 -0
  77. data/app/subscribers/spree/order_promotion_subscriber.rb +20 -0
  78. data/app/views/spree/order_mailer/cancel_email.html.erb +45 -0
  79. data/app/views/spree/order_mailer/cancel_email.text.erb +16 -0
  80. data/app/views/spree/order_mailer/confirm_email.html.erb +84 -0
  81. data/app/views/spree/order_mailer/confirm_email.text.erb +38 -0
  82. data/app/views/spree/promotion_code_batch_mailer/promotion_code_batch_errored.text.erb +2 -0
  83. data/app/views/spree/promotion_code_batch_mailer/promotion_code_batch_finished.text.erb +2 -0
  84. data/bin/rails +13 -0
  85. data/config/locales/en.yml +101 -0
  86. data/config/locales/promotion_categories.en.yml +6 -0
  87. data/config/locales/promotions.en.yml +6 -0
  88. data/config/routes.rb +28 -0
  89. data/db/migrate/20160101010001_solidus_one_four_promotions.rb +126 -0
  90. data/db/migrate/20161017102621_create_spree_promotion_code_batch.rb +48 -0
  91. data/db/migrate/20180202190713_create_promotion_rule_stores.rb +14 -0
  92. data/db/migrate/20180328172631_add_join_characters_to_promotion_code_batch.rb +15 -0
  93. data/db/migrate/20190106184413_remove_code_from_spree_promotions.rb +46 -0
  94. data/db/migrate/20220317165036_set_promotions_with_any_policy_to_all_if_possible.rb +20 -0
  95. data/db/migrate/20230322085416_remove_match_policy_from_spree_promotion.rb +7 -0
  96. data/db/migrate/20230325132905_remove_unused_columns_from_promotion_rules.rb +10 -0
  97. data/db/migrate/20231027084517_add_order_promotions_foreign_key.rb +14 -0
  98. data/db/migrate/20240621100123_add_promotion_code_id_to_spree_adjustments.rb +10 -0
  99. data/db/migrate/20240622113334_move_adjustment_eligible_to_legacy_promotions.rb +11 -0
  100. data/lib/components/admin/solidus_admin/orders/show/adjustments/index/source/spree_promotion_action/component.rb +17 -0
  101. data/lib/components/admin/solidus_admin/promotion_categories/index/component.rb +56 -0
  102. data/lib/components/admin/solidus_admin/promotions/index/component.rb +104 -0
  103. data/lib/components/admin/solidus_admin/promotions/index/component.yml +10 -0
  104. data/lib/components/admin/solidus_legacy_promotions/orders/index/component.rb +15 -0
  105. data/lib/components/admin/solidus_legacy_promotions/orders/index/component.yml +20 -0
  106. data/lib/controllers/admin/solidus_admin/promotion_categories_controller.rb +29 -0
  107. data/lib/controllers/admin/solidus_admin/promotions_controller.rb +46 -0
  108. data/lib/controllers/backend/spree/admin/promotion_actions_controller.rb +51 -0
  109. data/lib/controllers/backend/spree/admin/promotion_categories_controller.rb +8 -0
  110. data/lib/controllers/backend/spree/admin/promotion_code_batches_controller.rb +30 -0
  111. data/lib/controllers/backend/spree/admin/promotion_codes_controller.rb +48 -0
  112. data/lib/controllers/backend/spree/admin/promotion_rules_controller.rb +60 -0
  113. data/lib/controllers/backend/spree/admin/promotions_controller.rb +66 -0
  114. data/lib/solidus_legacy_promotions/configuration.rb +115 -0
  115. data/lib/solidus_legacy_promotions/engine.rb +97 -0
  116. data/lib/solidus_legacy_promotions/migrations/promotions_with_code_handlers.rb +68 -0
  117. data/lib/solidus_legacy_promotions/testing_support/factories/calculator_factory.rb +7 -0
  118. data/lib/solidus_legacy_promotions/testing_support/factories/order_factory.rb +22 -0
  119. data/lib/solidus_legacy_promotions/testing_support/factories/order_promotion_factory.rb +8 -0
  120. data/lib/solidus_legacy_promotions/testing_support/factories/promotion_category_factory.rb +7 -0
  121. data/lib/solidus_legacy_promotions/testing_support/factories/promotion_code_factory.rb +8 -0
  122. data/lib/solidus_legacy_promotions/testing_support/factories/promotion_factory.rb +98 -0
  123. data/lib/solidus_legacy_promotions/testing_support/factory_bot.rb +28 -0
  124. data/lib/solidus_legacy_promotions.rb +28 -0
  125. data/lib/tasks/solidus_legacy_promotions/delete_ineligible_adjustments.rake +8 -0
  126. data/lib/views/backend/spree/admin/adjustments/_adjustment.html.erb +24 -0
  127. data/lib/views/backend/spree/admin/orders/_adjustments.html.erb +19 -0
  128. data/lib/views/backend/spree/admin/orders/_order_details.html.erb +32 -0
  129. data/lib/views/backend/spree/admin/orders/confirm.html.erb +59 -0
  130. data/lib/views/backend/spree/admin/promotion_actions/create.js.erb +10 -0
  131. data/lib/views/backend/spree/admin/promotion_actions/destroy.js.erb +1 -0
  132. data/lib/views/backend/spree/admin/promotion_categories/_form.html.erb +14 -0
  133. data/lib/views/backend/spree/admin/promotion_categories/edit.html.erb +10 -0
  134. data/lib/views/backend/spree/admin/promotion_categories/index.html.erb +47 -0
  135. data/lib/views/backend/spree/admin/promotion_categories/new.html.erb +10 -0
  136. data/lib/views/backend/spree/admin/promotion_code_batches/_form_fields.html.erb +22 -0
  137. data/lib/views/backend/spree/admin/promotion_code_batches/download.csv.ruby +8 -0
  138. data/lib/views/backend/spree/admin/promotion_code_batches/index.html.erb +65 -0
  139. data/lib/views/backend/spree/admin/promotion_code_batches/new.html.erb +8 -0
  140. data/lib/views/backend/spree/admin/promotion_codes/index.csv.ruby +8 -0
  141. data/lib/views/backend/spree/admin/promotion_codes/index.html.erb +32 -0
  142. data/lib/views/backend/spree/admin/promotion_codes/new.html.erb +31 -0
  143. data/lib/views/backend/spree/admin/promotion_rules/create.js.erb +8 -0
  144. data/lib/views/backend/spree/admin/promotion_rules/destroy.js.erb +3 -0
  145. data/lib/views/backend/spree/admin/promotions/_actions.html.erb +37 -0
  146. data/lib/views/backend/spree/admin/promotions/_activations_edit.html.erb +22 -0
  147. data/lib/views/backend/spree/admin/promotions/_activations_new.html.erb +43 -0
  148. data/lib/views/backend/spree/admin/promotions/_form.html.erb +67 -0
  149. data/lib/views/backend/spree/admin/promotions/_promotion_action.html.erb +13 -0
  150. data/lib/views/backend/spree/admin/promotions/_promotion_rule.html.erb +12 -0
  151. data/lib/views/backend/spree/admin/promotions/_rules.html.erb +42 -0
  152. data/lib/views/backend/spree/admin/promotions/actions/_create_adjustment.html.erb +2 -0
  153. data/lib/views/backend/spree/admin/promotions/actions/_create_item_adjustments.html.erb +6 -0
  154. data/lib/views/backend/spree/admin/promotions/actions/_create_quantity_adjustments.html.erb +10 -0
  155. data/lib/views/backend/spree/admin/promotions/actions/_free_shipping.html.erb +0 -0
  156. data/lib/views/backend/spree/admin/promotions/actions/_promotion_calculators_with_custom_fields.html.erb +29 -0
  157. data/lib/views/backend/spree/admin/promotions/calculators/_default_fields.html.erb +6 -0
  158. data/lib/views/backend/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb +56 -0
  159. data/lib/views/backend/spree/admin/promotions/calculators/flat_rate/_fields.html.erb +6 -0
  160. data/lib/views/backend/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb +30 -0
  161. data/lib/views/backend/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb +30 -0
  162. data/lib/views/backend/spree/admin/promotions/edit.html.erb +40 -0
  163. data/lib/views/backend/spree/admin/promotions/index.html.erb +124 -0
  164. data/lib/views/backend/spree/admin/promotions/new.html.erb +14 -0
  165. data/lib/views/backend/spree/admin/promotions/rules/_first_order.html.erb +0 -0
  166. data/lib/views/backend/spree/admin/promotions/rules/_first_repeat_purchase_since.html.erb +13 -0
  167. data/lib/views/backend/spree/admin/promotions/rules/_item_total.html.erb +14 -0
  168. data/lib/views/backend/spree/admin/promotions/rules/_minimum_quantity.html.erb +5 -0
  169. data/lib/views/backend/spree/admin/promotions/rules/_nth_order.html.erb +12 -0
  170. data/lib/views/backend/spree/admin/promotions/rules/_one_use_per_user.html.erb +0 -0
  171. data/lib/views/backend/spree/admin/promotions/rules/_option_value.html.erb +13 -0
  172. data/lib/views/backend/spree/admin/promotions/rules/_product.html.erb +15 -0
  173. data/lib/views/backend/spree/admin/promotions/rules/_store.html.erb +6 -0
  174. data/lib/views/backend/spree/admin/promotions/rules/_taxon.html.erb +9 -0
  175. data/lib/views/backend/spree/admin/promotions/rules/_user.html.erb +4 -0
  176. data/lib/views/backend/spree/admin/promotions/rules/_user_logged_in.html.erb +0 -0
  177. data/lib/views/backend/spree/admin/promotions/rules/_user_role.html.erb +12 -0
  178. data/solidus_legacy_promotions.gemspec +29 -0
  179. metadata +262 -0
@@ -0,0 +1,15 @@
1
+ <div class="row">
2
+ <div class="col-12">
3
+ <div class="field products_rule_products">
4
+ <%= label_tag "#{param_prefix}_product_ids_string", t('spree.product_rule.choose_products') %>
5
+ <%= hidden_field_tag "#{param_prefix}[product_ids_string]", promotion_rule.product_ids.join(","), class: "product_picker fullwidth" %>
6
+ </div>
7
+ </div>
8
+ <div class="col-12">
9
+ <div class="field">
10
+ <label>
11
+ <%= t('spree.product_rule.label', select: select_tag("#{param_prefix}[preferred_match_policy]", options_for_select(Spree::Promotion::Rules::Product::MATCH_POLICIES.map{|s| [t("spree.product_rule.match_#{s}"),s] }, promotion_rule.preferred_match_policy), {class: 'select_product custom-select'})).html_safe %>
12
+ </label>
13
+ </div>
14
+ </div>
15
+ </div>
@@ -0,0 +1,6 @@
1
+ <div class="field">
2
+ <label><%= t("spree.store_rule.choose_stores" ) %></label>
3
+ <%= select_tag "#{param_prefix}[store_ids][]",
4
+ options_from_collection_for_select(Spree::Store.all, :id, :name, promotion_rule.store_ids),
5
+ multiple: true, class: "select2 fullwidth" %>
6
+ </div>
@@ -0,0 +1,9 @@
1
+ <div class="field taxons_rule_taxons">
2
+ <%= label_tag "#{param_prefix}_taxon_ids_string", t('spree.taxon_rule.choose_taxons') %>
3
+ <%= hidden_field_tag "#{param_prefix}[taxon_ids_string]", promotion_rule.taxon_ids.join(","), class: "taxon_picker fullwidth", id: 'product_taxon_ids' %>
4
+ </div>
5
+ <div class="field">
6
+ <label>
7
+ <%= t('spree.taxon_rule.label', select: select_tag("#{param_prefix}[preferred_match_policy]", options_for_select(Spree::Promotion::Rules::Taxon::MATCH_POLICIES.map{|s| [t("spree.taxon_rule.match_#{s}"),s] }, promotion_rule.preferred_match_policy), {class: 'select_taxon custom-select'})).html_safe %>
8
+ </label>
9
+ </div>
@@ -0,0 +1,4 @@
1
+ <div class="field">
2
+ <label><%= t('spree.user_rule.choose_users') %></label><br>
3
+ <input type='hidden' name='<%= param_prefix %>[user_ids_string]' class='user_picker fullwidth' value='<%= promotion_rule.user_ids.join(",") %>'>
4
+ </div>
@@ -0,0 +1,12 @@
1
+ <div class="form-group">
2
+ <%= label_tag "#{param_prefix}_preferred_role_ids", t('spree.user_role_rule.choose_roles') %>
3
+ <%= select_tag "#{param_prefix}[preferred_role_ids]",
4
+ options_from_collection_for_select(
5
+ Spree::Role.all, :id, :name, promotion_rule.preferred_role_ids
6
+ ), class: 'select2 fullwidth', multiple: true %>
7
+ </div>
8
+ <div class="form-group">
9
+ <label>
10
+ <%= t('spree.user_role_rule.label', select: select_tag("#{param_prefix}[preferred_match_policy]", options_for_select(Spree::Promotion::Rules::UserRole::MATCH_POLICIES.map{ |s| [t("spree.user_role_rule.match_#{s}"),s] }, promotion_rule.preferred_match_policy), { class: 'custom-select'})).html_safe %>
11
+ </label>
12
+ </div>
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../core/lib/spree/core/version'
4
+
5
+ Gem::Specification.new do |s|
6
+ s.platform = Gem::Platform::RUBY
7
+ s.name = 'solidus_legacy_promotions'
8
+ s.version = Spree.solidus_version
9
+ s.summary = 'Legacy Solidus promotion system'
10
+ s.description = s.summary
11
+
12
+ s.author = 'Solidus Team'
13
+ s.email = 'contact@solidus.io'
14
+ s.homepage = 'http://solidus.io'
15
+ s.license = 'BSD-3-Clause'
16
+
17
+ s.metadata['rubygems_mfa_required'] = 'true'
18
+
19
+ s.files = `git ls-files -z`.split("\x0").reject do |f|
20
+ f.match(%r{^(spec|script)/})
21
+ end
22
+
23
+ s.required_ruby_version = '>= 3.1.0'
24
+ s.required_rubygems_version = '>= 1.8.23'
25
+
26
+ s.add_dependency 'solidus_api', s.version
27
+ s.add_dependency 'solidus_core', s.version
28
+ s.add_dependency 'solidus_support'
29
+ end
metadata ADDED
@@ -0,0 +1,262 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: solidus_legacy_promotions
3
+ version: !ruby/object:Gem::Version
4
+ version: 4.4.0
5
+ platform: ruby
6
+ authors:
7
+ - Solidus Team
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-11-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: solidus_api
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '='
18
+ - !ruby/object:Gem::Version
19
+ version: 4.4.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 4.4.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: solidus_core
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 4.4.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 4.4.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: solidus_support
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Legacy Solidus promotion system
56
+ email: contact@solidus.io
57
+ executables: []
58
+ extensions: []
59
+ extra_rdoc_files: []
60
+ files:
61
+ - README.md
62
+ - Rakefile
63
+ - app/assets/config/solidus_legacy_promotions/manifest.js
64
+ - app/assets/javascripts/spree/backend/edit_promotion.js
65
+ - app/assets/javascripts/spree/backend/promotions.js
66
+ - app/assets/javascripts/spree/backend/promotions/activation.js
67
+ - app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_flat_rate.hbs
68
+ - app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_percent.hbs
69
+ - app/assets/javascripts/spree/backend/templates/promotions/rules/option_values.hbs
70
+ - app/assets/javascripts/spree/backend/views/calculators/tiered.js
71
+ - app/assets/javascripts/spree/backend/views/order/details_adjustments.js
72
+ - app/assets/javascripts/spree/backend/views/promotions.js
73
+ - app/assets/javascripts/spree/backend/views/promotions/option_values_rule.js
74
+ - app/assets/stylesheets/solidus_legacy_promotions/promotions.scss
75
+ - app/assets/stylesheets/solidus_legacy_promotions/promotions/_edit.scss
76
+ - app/assets/stylesheets/spree/backend/sections/_adjustments.scss
77
+ - app/decorators/solidus_legacy_promotions/controllers/solidus_admin/solidus_admin_adjustments_controller_decorator.rb
78
+ - app/decorators/solidus_legacy_promotions/lib/spree_order_state_machine_decorator.rb
79
+ - app/decorators/solidus_legacy_promotions/models/spree_adjustment_decorator.rb
80
+ - app/decorators/solidus_legacy_promotions/models/spree_calculator_returns_default_refund_amount_decorator.rb
81
+ - app/decorators/solidus_legacy_promotions/models/spree_line_item_decorator.rb
82
+ - app/decorators/solidus_legacy_promotions/models/spree_order_decorator.rb
83
+ - app/decorators/solidus_legacy_promotions/models/spree_order_updater_decorator.rb
84
+ - app/decorators/solidus_legacy_promotions/models/spree_product_decorator.rb
85
+ - app/decorators/solidus_legacy_promotions/models/spree_promotion_code_batch_decorator.rb
86
+ - app/decorators/solidus_legacy_promotions/models/spree_shipment_decorator.rb
87
+ - app/helpers/spree/admin/promotions_helper.rb
88
+ - app/helpers/spree/promotion_rules_helper.rb
89
+ - app/jobs/spree/promotion_code_batch_job.rb
90
+ - app/mailers/spree/promotion_code_batch_mailer.rb
91
+ - app/models/spree/calculator/distributed_amount.rb
92
+ - app/models/spree/calculator/flat_percent_item_total.rb
93
+ - app/models/spree/calculator/flexi_rate.rb
94
+ - app/models/spree/calculator/percent_on_line_item.rb
95
+ - app/models/spree/calculator/tiered_flat_rate.rb
96
+ - app/models/spree/calculator/tiered_percent.rb
97
+ - app/models/spree/order_contents.rb
98
+ - app/models/spree/order_promotion.rb
99
+ - app/models/spree/permission_sets/promotion_display.rb
100
+ - app/models/spree/permission_sets/promotion_management.rb
101
+ - app/models/spree/promotion.rb
102
+ - app/models/spree/promotion/actions/create_adjustment.rb
103
+ - app/models/spree/promotion/actions/create_item_adjustments.rb
104
+ - app/models/spree/promotion/actions/create_quantity_adjustments.rb
105
+ - app/models/spree/promotion/actions/free_shipping.rb
106
+ - app/models/spree/promotion/order_adjustments_recalculator.rb
107
+ - app/models/spree/promotion/rules/first_order.rb
108
+ - app/models/spree/promotion/rules/first_repeat_purchase_since.rb
109
+ - app/models/spree/promotion/rules/item_total.rb
110
+ - app/models/spree/promotion/rules/minimum_quantity.rb
111
+ - app/models/spree/promotion/rules/nth_order.rb
112
+ - app/models/spree/promotion/rules/one_use_per_user.rb
113
+ - app/models/spree/promotion/rules/option_value.rb
114
+ - app/models/spree/promotion/rules/product.rb
115
+ - app/models/spree/promotion/rules/store.rb
116
+ - app/models/spree/promotion/rules/taxon.rb
117
+ - app/models/spree/promotion/rules/user.rb
118
+ - app/models/spree/promotion/rules/user_logged_in.rb
119
+ - app/models/spree/promotion/rules/user_role.rb
120
+ - app/models/spree/promotion_action.rb
121
+ - app/models/spree/promotion_advertiser.rb
122
+ - app/models/spree/promotion_category.rb
123
+ - app/models/spree/promotion_chooser.rb
124
+ - app/models/spree/promotion_code.rb
125
+ - app/models/spree/promotion_code/batch_builder.rb
126
+ - app/models/spree/promotion_code_batch.rb
127
+ - app/models/spree/promotion_finder.rb
128
+ - app/models/spree/promotion_handler/cart.rb
129
+ - app/models/spree/promotion_handler/coupon.rb
130
+ - app/models/spree/promotion_handler/page.rb
131
+ - app/models/spree/promotion_handler/shipping.rb
132
+ - app/models/spree/promotion_rule.rb
133
+ - app/models/spree/promotion_rule_store.rb
134
+ - app/models/spree/promotion_rule_taxon.rb
135
+ - app/models/spree/promotion_rule_user.rb
136
+ - app/subscribers/spree/order_promotion_subscriber.rb
137
+ - app/views/spree/order_mailer/cancel_email.html.erb
138
+ - app/views/spree/order_mailer/cancel_email.text.erb
139
+ - app/views/spree/order_mailer/confirm_email.html.erb
140
+ - app/views/spree/order_mailer/confirm_email.text.erb
141
+ - app/views/spree/promotion_code_batch_mailer/promotion_code_batch_errored.text.erb
142
+ - app/views/spree/promotion_code_batch_mailer/promotion_code_batch_finished.text.erb
143
+ - bin/rails
144
+ - config/locales/en.yml
145
+ - config/locales/promotion_categories.en.yml
146
+ - config/locales/promotions.en.yml
147
+ - config/routes.rb
148
+ - db/migrate/20160101010001_solidus_one_four_promotions.rb
149
+ - db/migrate/20161017102621_create_spree_promotion_code_batch.rb
150
+ - db/migrate/20180202190713_create_promotion_rule_stores.rb
151
+ - db/migrate/20180328172631_add_join_characters_to_promotion_code_batch.rb
152
+ - db/migrate/20190106184413_remove_code_from_spree_promotions.rb
153
+ - db/migrate/20220317165036_set_promotions_with_any_policy_to_all_if_possible.rb
154
+ - db/migrate/20230322085416_remove_match_policy_from_spree_promotion.rb
155
+ - db/migrate/20230325132905_remove_unused_columns_from_promotion_rules.rb
156
+ - db/migrate/20231027084517_add_order_promotions_foreign_key.rb
157
+ - db/migrate/20240621100123_add_promotion_code_id_to_spree_adjustments.rb
158
+ - db/migrate/20240622113334_move_adjustment_eligible_to_legacy_promotions.rb
159
+ - lib/components/admin/solidus_admin/orders/show/adjustments/index/source/spree_promotion_action/component.rb
160
+ - lib/components/admin/solidus_admin/promotion_categories/index/component.rb
161
+ - lib/components/admin/solidus_admin/promotions/index/component.rb
162
+ - lib/components/admin/solidus_admin/promotions/index/component.yml
163
+ - lib/components/admin/solidus_legacy_promotions/orders/index/component.rb
164
+ - lib/components/admin/solidus_legacy_promotions/orders/index/component.yml
165
+ - lib/controllers/admin/solidus_admin/promotion_categories_controller.rb
166
+ - lib/controllers/admin/solidus_admin/promotions_controller.rb
167
+ - lib/controllers/backend/spree/admin/promotion_actions_controller.rb
168
+ - lib/controllers/backend/spree/admin/promotion_categories_controller.rb
169
+ - lib/controllers/backend/spree/admin/promotion_code_batches_controller.rb
170
+ - lib/controllers/backend/spree/admin/promotion_codes_controller.rb
171
+ - lib/controllers/backend/spree/admin/promotion_rules_controller.rb
172
+ - lib/controllers/backend/spree/admin/promotions_controller.rb
173
+ - lib/solidus_legacy_promotions.rb
174
+ - lib/solidus_legacy_promotions/configuration.rb
175
+ - lib/solidus_legacy_promotions/engine.rb
176
+ - lib/solidus_legacy_promotions/migrations/promotions_with_code_handlers.rb
177
+ - lib/solidus_legacy_promotions/testing_support/factories/calculator_factory.rb
178
+ - lib/solidus_legacy_promotions/testing_support/factories/order_factory.rb
179
+ - lib/solidus_legacy_promotions/testing_support/factories/order_promotion_factory.rb
180
+ - lib/solidus_legacy_promotions/testing_support/factories/promotion_category_factory.rb
181
+ - lib/solidus_legacy_promotions/testing_support/factories/promotion_code_factory.rb
182
+ - lib/solidus_legacy_promotions/testing_support/factories/promotion_factory.rb
183
+ - lib/solidus_legacy_promotions/testing_support/factory_bot.rb
184
+ - lib/tasks/solidus_legacy_promotions/delete_ineligible_adjustments.rake
185
+ - lib/views/backend/spree/admin/adjustments/_adjustment.html.erb
186
+ - lib/views/backend/spree/admin/orders/_adjustments.html.erb
187
+ - lib/views/backend/spree/admin/orders/_order_details.html.erb
188
+ - lib/views/backend/spree/admin/orders/confirm.html.erb
189
+ - lib/views/backend/spree/admin/promotion_actions/create.js.erb
190
+ - lib/views/backend/spree/admin/promotion_actions/destroy.js.erb
191
+ - lib/views/backend/spree/admin/promotion_categories/_form.html.erb
192
+ - lib/views/backend/spree/admin/promotion_categories/edit.html.erb
193
+ - lib/views/backend/spree/admin/promotion_categories/index.html.erb
194
+ - lib/views/backend/spree/admin/promotion_categories/new.html.erb
195
+ - lib/views/backend/spree/admin/promotion_code_batches/_form_fields.html.erb
196
+ - lib/views/backend/spree/admin/promotion_code_batches/download.csv.ruby
197
+ - lib/views/backend/spree/admin/promotion_code_batches/index.html.erb
198
+ - lib/views/backend/spree/admin/promotion_code_batches/new.html.erb
199
+ - lib/views/backend/spree/admin/promotion_codes/index.csv.ruby
200
+ - lib/views/backend/spree/admin/promotion_codes/index.html.erb
201
+ - lib/views/backend/spree/admin/promotion_codes/new.html.erb
202
+ - lib/views/backend/spree/admin/promotion_rules/create.js.erb
203
+ - lib/views/backend/spree/admin/promotion_rules/destroy.js.erb
204
+ - lib/views/backend/spree/admin/promotions/_actions.html.erb
205
+ - lib/views/backend/spree/admin/promotions/_activations_edit.html.erb
206
+ - lib/views/backend/spree/admin/promotions/_activations_new.html.erb
207
+ - lib/views/backend/spree/admin/promotions/_form.html.erb
208
+ - lib/views/backend/spree/admin/promotions/_promotion_action.html.erb
209
+ - lib/views/backend/spree/admin/promotions/_promotion_rule.html.erb
210
+ - lib/views/backend/spree/admin/promotions/_rules.html.erb
211
+ - lib/views/backend/spree/admin/promotions/actions/_create_adjustment.html.erb
212
+ - lib/views/backend/spree/admin/promotions/actions/_create_item_adjustments.html.erb
213
+ - lib/views/backend/spree/admin/promotions/actions/_create_quantity_adjustments.html.erb
214
+ - lib/views/backend/spree/admin/promotions/actions/_free_shipping.html.erb
215
+ - lib/views/backend/spree/admin/promotions/actions/_promotion_calculators_with_custom_fields.html.erb
216
+ - lib/views/backend/spree/admin/promotions/calculators/_default_fields.html.erb
217
+ - lib/views/backend/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb
218
+ - lib/views/backend/spree/admin/promotions/calculators/flat_rate/_fields.html.erb
219
+ - lib/views/backend/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
220
+ - lib/views/backend/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb
221
+ - lib/views/backend/spree/admin/promotions/edit.html.erb
222
+ - lib/views/backend/spree/admin/promotions/index.html.erb
223
+ - lib/views/backend/spree/admin/promotions/new.html.erb
224
+ - lib/views/backend/spree/admin/promotions/rules/_first_order.html.erb
225
+ - lib/views/backend/spree/admin/promotions/rules/_first_repeat_purchase_since.html.erb
226
+ - lib/views/backend/spree/admin/promotions/rules/_item_total.html.erb
227
+ - lib/views/backend/spree/admin/promotions/rules/_minimum_quantity.html.erb
228
+ - lib/views/backend/spree/admin/promotions/rules/_nth_order.html.erb
229
+ - lib/views/backend/spree/admin/promotions/rules/_one_use_per_user.html.erb
230
+ - lib/views/backend/spree/admin/promotions/rules/_option_value.html.erb
231
+ - lib/views/backend/spree/admin/promotions/rules/_product.html.erb
232
+ - lib/views/backend/spree/admin/promotions/rules/_store.html.erb
233
+ - lib/views/backend/spree/admin/promotions/rules/_taxon.html.erb
234
+ - lib/views/backend/spree/admin/promotions/rules/_user.html.erb
235
+ - lib/views/backend/spree/admin/promotions/rules/_user_logged_in.html.erb
236
+ - lib/views/backend/spree/admin/promotions/rules/_user_role.html.erb
237
+ - solidus_legacy_promotions.gemspec
238
+ homepage: http://solidus.io
239
+ licenses:
240
+ - BSD-3-Clause
241
+ metadata:
242
+ rubygems_mfa_required: 'true'
243
+ post_install_message:
244
+ rdoc_options: []
245
+ require_paths:
246
+ - lib
247
+ required_ruby_version: !ruby/object:Gem::Requirement
248
+ requirements:
249
+ - - ">="
250
+ - !ruby/object:Gem::Version
251
+ version: 3.1.0
252
+ required_rubygems_version: !ruby/object:Gem::Requirement
253
+ requirements:
254
+ - - ">="
255
+ - !ruby/object:Gem::Version
256
+ version: 1.8.23
257
+ requirements: []
258
+ rubygems_version: 3.5.22
259
+ signing_key:
260
+ specification_version: 4
261
+ summary: Legacy Solidus promotion system
262
+ test_files: []