solidus_friendly_promotions 1.0.1 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/Gemfile +1 -1
- data/MIGRATING.md +1 -1
- data/README.md +22 -16
- data/app/assets/config/solidus_friendly_promotions/manifest.js +7 -1
- data/app/controllers/solidus_friendly_promotions/admin/benefits_controller.rb +85 -0
- data/app/controllers/solidus_friendly_promotions/admin/conditions_controller.rb +69 -0
- data/app/controllers/solidus_friendly_promotions/admin/promotions_controller.rb +3 -3
- data/app/decorators/models/solidus_friendly_promotions/adjustment_decorator.rb +4 -4
- data/app/decorators/models/solidus_friendly_promotions/line_item_decorator.rb +2 -2
- data/app/decorators/models/solidus_friendly_promotions/order_decorator.rb +6 -6
- data/app/helpers/solidus_friendly_promotions/admin/benefits_helper.rb +19 -0
- data/app/helpers/solidus_friendly_promotions/admin/conditions_helper.rb +12 -0
- data/app/javascript/solidus_friendly_promotions/controllers/product_option_values_controller.js +1 -1
- data/app/javascript/solidus_friendly_promotions/web_components/number_with_currency.js +35 -0
- data/app/javascript/solidus_friendly_promotions/{jquery → web_components}/option_value_picker.js +8 -0
- data/app/javascript/solidus_friendly_promotions/web_components/product_picker.js +7 -0
- data/app/javascript/solidus_friendly_promotions/web_components/select_two.js +11 -0
- data/app/javascript/solidus_friendly_promotions/web_components/taxon_picker.js +7 -0
- data/app/javascript/solidus_friendly_promotions/web_components/user_picker.js +7 -0
- data/app/javascript/solidus_friendly_promotions/web_components/variant_picker.js +7 -0
- data/app/javascript/solidus_friendly_promotions.js +7 -11
- data/app/models/concerns/solidus_friendly_promotions/{actions/order_level_action.rb → benefits/order_benefit.rb} +2 -2
- data/app/models/concerns/solidus_friendly_promotions/{rules/line_item_applicable_order_rule.rb → conditions/line_item_applicable_order_condition.rb} +2 -2
- data/app/models/concerns/solidus_friendly_promotions/{rules/line_item_level_rule.rb → conditions/line_item_level_condition.rb} +2 -2
- data/app/models/concerns/solidus_friendly_promotions/{rules/order_level_rule.rb → conditions/order_level_condition.rb} +2 -2
- data/app/models/concerns/solidus_friendly_promotions/{rules/shipment_level_rule.rb → conditions/shipment_level_condition.rb} +2 -2
- data/app/models/solidus_friendly_promotions/{promotion_action.rb → benefit.rb} +48 -11
- data/app/models/solidus_friendly_promotions/{actions → benefits}/adjust_line_item.rb +6 -2
- data/app/models/solidus_friendly_promotions/{actions → benefits}/adjust_line_item_quantity_groups.rb +3 -3
- data/app/models/solidus_friendly_promotions/{actions → benefits}/adjust_shipment.rb +6 -2
- data/app/models/solidus_friendly_promotions/{actions → benefits}/create_discounted_item.rb +6 -7
- data/app/models/solidus_friendly_promotions/calculators/distributed_amount.rb +1 -1
- data/app/models/solidus_friendly_promotions/calculators/tiered_flat_rate.rb +1 -1
- data/app/models/solidus_friendly_promotions/calculators/tiered_percent.rb +1 -1
- data/app/models/solidus_friendly_promotions/calculators/tiered_percent_on_eligible_item_quantity.rb +4 -2
- data/app/models/solidus_friendly_promotions/{promotion_rule.rb → condition.rb} +13 -7
- data/app/models/solidus_friendly_promotions/condition_product.rb +8 -0
- data/app/models/solidus_friendly_promotions/condition_store.rb +8 -0
- data/app/models/solidus_friendly_promotions/condition_taxon.rb +8 -0
- data/app/models/solidus_friendly_promotions/{promotion_rules_user.rb → condition_user.rb} +2 -2
- data/app/models/solidus_friendly_promotions/{rules → conditions}/discounted_item_total.rb +3 -3
- data/app/models/solidus_friendly_promotions/{rules → conditions}/first_order.rb +3 -3
- data/app/models/solidus_friendly_promotions/{rules → conditions}/first_repeat_purchase_since.rb +3 -3
- data/app/models/solidus_friendly_promotions/{rules → conditions}/item_total.rb +5 -5
- data/app/models/solidus_friendly_promotions/{rules → conditions}/line_item_option_value.rb +3 -3
- data/app/models/solidus_friendly_promotions/{rules → conditions}/line_item_product.rb +8 -8
- data/app/models/solidus_friendly_promotions/{rules → conditions}/line_item_taxon.rb +8 -8
- data/app/models/solidus_friendly_promotions/{rules → conditions}/minimum_quantity.rb +8 -8
- data/app/models/solidus_friendly_promotions/{rules → conditions}/nth_order.rb +5 -5
- data/app/models/solidus_friendly_promotions/{rules → conditions}/one_use_per_user.rb +3 -3
- data/app/models/solidus_friendly_promotions/{rules → conditions}/option_value.rb +3 -3
- data/app/models/solidus_friendly_promotions/{rules → conditions}/product.rb +9 -9
- data/app/models/solidus_friendly_promotions/{rules → conditions}/shipping_method.rb +3 -3
- data/app/models/solidus_friendly_promotions/{rules → conditions}/store.rb +6 -6
- data/app/models/solidus_friendly_promotions/{rules → conditions}/taxon.rb +12 -12
- data/app/models/solidus_friendly_promotions/{rules → conditions}/user.rb +7 -7
- data/app/models/solidus_friendly_promotions/{rules → conditions}/user_logged_in.rb +3 -3
- data/app/models/solidus_friendly_promotions/{rules → conditions}/user_role.rb +3 -3
- data/app/models/solidus_friendly_promotions/eligibility_result.rb +1 -1
- data/app/models/solidus_friendly_promotions/eligibility_results.rb +7 -7
- data/app/models/solidus_friendly_promotions/friendly_promotion_adjuster/discount_order.rb +28 -29
- data/app/models/solidus_friendly_promotions/friendly_promotion_adjuster/load_promotions.rb +10 -11
- data/app/models/solidus_friendly_promotions/friendly_promotion_adjuster/persist_discounted_order.rb +2 -2
- data/app/models/solidus_friendly_promotions/order_promotion.rb +1 -1
- data/app/models/solidus_friendly_promotions/permission_sets/friendly_promotion_management.rb +1 -1
- data/app/models/solidus_friendly_promotions/promotion.rb +14 -43
- data/app/models/solidus_friendly_promotions/promotion_advertiser.rb +10 -0
- data/app/models/solidus_friendly_promotions/promotion_code.rb +1 -1
- data/app/models/solidus_friendly_promotions/shipping_rate_discount.rb +1 -1
- data/app/views/solidus_friendly_promotions/admin/benefit_fields/_adjust_line_item.html.erb +6 -0
- data/app/views/solidus_friendly_promotions/admin/{promotion_actions/actions → benefit_fields}/_adjust_line_item_quantity_groups.html.erb +4 -4
- data/app/views/solidus_friendly_promotions/admin/benefit_fields/_adjust_shipment.html.erb +6 -0
- data/app/views/solidus_friendly_promotions/admin/benefit_fields/_calculator_fields.erb +11 -0
- data/app/views/solidus_friendly_promotions/admin/{promotion_actions/actions → benefit_fields}/_create_discounted_item.html.erb +8 -6
- data/app/views/solidus_friendly_promotions/admin/benefits/_benefit.html.erb +50 -0
- data/app/views/solidus_friendly_promotions/admin/benefits/_calculator_select.html.erb +16 -0
- data/app/views/solidus_friendly_promotions/admin/benefits/_form.html.erb +3 -0
- data/app/views/solidus_friendly_promotions/admin/benefits/_new_benefit.html.erb +33 -0
- data/app/views/solidus_friendly_promotions/admin/benefits/_type_select.html.erb +16 -0
- data/app/views/solidus_friendly_promotions/admin/benefits/edit.html.erb +19 -0
- data/app/views/solidus_friendly_promotions/admin/benefits/new.html.erb +1 -0
- data/app/views/solidus_friendly_promotions/admin/{promotion_actions/calculators → calculator_fields}/_default_fields.html.erb +1 -1
- data/app/views/solidus_friendly_promotions/admin/{promotion_actions/calculators → calculator_fields}/distributed_amount/_fields.html.erb +3 -3
- data/app/views/solidus_friendly_promotions/admin/calculator_fields/flat_rate/_fields.html.erb +6 -0
- data/app/views/solidus_friendly_promotions/admin/calculator_fields/flexi_rate/_fields.html.erb +24 -0
- data/app/views/solidus_friendly_promotions/admin/calculator_fields/percent/_fields.html.erb +6 -0
- data/app/views/solidus_friendly_promotions/admin/calculator_fields/tiered_flat_rate/_fields.html.erb +32 -0
- data/app/views/solidus_friendly_promotions/admin/{promotion_actions/calculators → calculator_fields}/tiered_flat_rate/_tier_fields.html.erb +7 -8
- data/app/views/solidus_friendly_promotions/admin/calculator_fields/tiered_percent/_fields.html.erb +47 -0
- data/app/views/solidus_friendly_promotions/admin/{promotion_actions/calculators → calculator_fields}/tiered_percent/_tier_fields.html.erb +8 -7
- data/app/views/solidus_friendly_promotions/admin/{promotion_actions/calculators → calculator_fields}/tiered_percent_on_eligible_item_quantity/_fields.html.erb +11 -9
- data/app/views/solidus_friendly_promotions/admin/calculator_fields/tiered_percent_on_eligible_item_quantity/_tier_fields.html.erb +35 -0
- data/app/views/solidus_friendly_promotions/admin/condition_fields/_first_order.html.erb +3 -0
- data/app/views/solidus_friendly_promotions/admin/condition_fields/_first_repeat_purchase_since.html.erb +7 -0
- data/app/views/solidus_friendly_promotions/admin/condition_fields/_item_total.html.erb +15 -0
- data/app/views/solidus_friendly_promotions/admin/condition_fields/_line_item_option_value.html.erb +25 -0
- data/app/views/solidus_friendly_promotions/admin/{promotion_rules/rules → condition_fields}/_line_item_product.html.erb +7 -7
- data/app/views/solidus_friendly_promotions/admin/condition_fields/_line_item_taxon.html.erb +17 -0
- data/app/views/solidus_friendly_promotions/admin/condition_fields/_minimum_quantity.html.erb +5 -0
- data/app/views/solidus_friendly_promotions/admin/condition_fields/_nth_order.html.erb +15 -0
- data/app/views/solidus_friendly_promotions/admin/condition_fields/_one_use_per_user.html.erb +3 -0
- data/app/views/solidus_friendly_promotions/admin/{promotion_rules/rules → condition_fields}/_option_value.html.erb +10 -10
- data/app/views/solidus_friendly_promotions/admin/condition_fields/_product.html.erb +28 -0
- data/app/views/solidus_friendly_promotions/admin/{promotion_rules/rules → condition_fields}/_shipping_method.html.erb +3 -3
- data/app/views/solidus_friendly_promotions/admin/condition_fields/_store.html.erb +9 -0
- data/app/views/solidus_friendly_promotions/admin/condition_fields/_taxon.html.erb +28 -0
- data/app/views/solidus_friendly_promotions/admin/condition_fields/_user.html.erb +7 -0
- data/app/views/solidus_friendly_promotions/admin/condition_fields/_user_logged_in.html.erb +3 -0
- data/app/views/solidus_friendly_promotions/admin/condition_fields/_user_role.html.erb +15 -0
- data/app/views/solidus_friendly_promotions/admin/condition_fields/line_item_option_value/_option_value_fields.html.erb +21 -0
- data/app/views/solidus_friendly_promotions/admin/conditions/_condition.html.erb +26 -0
- data/app/views/solidus_friendly_promotions/admin/conditions/_new_condition.html.erb +26 -0
- data/app/views/solidus_friendly_promotions/admin/conditions/_type_select.html.erb +20 -0
- data/app/views/solidus_friendly_promotions/admin/conditions/new.html.erb +1 -0
- data/app/views/solidus_friendly_promotions/admin/promotion_code_batches/_form_fields.html.erb +5 -5
- data/app/views/solidus_friendly_promotions/admin/promotions/_form.html.erb +4 -4
- data/app/views/solidus_friendly_promotions/admin/promotions/_table_filter.html.erb +6 -6
- data/app/views/solidus_friendly_promotions/admin/promotions/edit.html.erb +7 -41
- data/app/views/solidus_friendly_promotions/admin/shared/_number_with_currency.html.erb +20 -0
- data/app/views/solidus_friendly_promotions/admin/shared/preference_fields/_boolean.html.erb +14 -0
- data/app/views/solidus_friendly_promotions/admin/shared/preference_fields/_decimal.html.erb +12 -0
- data/app/views/solidus_friendly_promotions/admin/shared/preference_fields/_encrypted_string.html.erb +12 -0
- data/app/views/solidus_friendly_promotions/admin/shared/preference_fields/_integer.html.erb +12 -0
- data/app/views/solidus_friendly_promotions/admin/shared/preference_fields/_password.html.erb +12 -0
- data/app/views/solidus_friendly_promotions/admin/shared/preference_fields/_string.html.erb +12 -0
- data/app/views/solidus_friendly_promotions/admin/shared/preference_fields/_text.html.erb +12 -0
- data/bin/sandbox +3 -3
- data/config/importmap.rb +2 -0
- data/config/locales/en.yml +128 -94
- data/config/routes.rb +3 -2
- data/db/migrate/20231011120928_add_db_comments_to_friendly_promotion_rules_taxons.rb +2 -2
- data/db/migrate/20231011142040_add_db_comments_to_friendly_promotion_rules_users.rb +1 -1
- data/db/migrate/20231011190222_add_db_comments_to_friendly_promotion_actions.rb +1 -1
- data/db/migrate/20240409093831_add_action_reference_to_rules.rb +34 -0
- data/db/migrate/20240506142650_remove_promotion_rules_promotion_id.rb +5 -0
- data/db/migrate/20240508080834_rename_promotion_rules_to_conditions.rb +19 -0
- data/db/migrate/20240508131514_rename_friendly_promotion_actions_to_friendly_benefits.rb +19 -0
- data/db/migrate/20240612113608_update_column_comments_for_benefits.rb +31 -0
- data/db/migrate/20240612114132_update_column_comments_for_conditions.rb +30 -0
- data/db/migrate/20240612115209_update_column_comments_for_condition_stores.rb +23 -0
- data/db/migrate/20240612115749_update_column_comments_for_condition_products.rb +22 -0
- data/db/migrate/20240612120411_update_column_comments_for_condition_taxons.rb +24 -0
- data/db/migrate/20240612121049_update_column_comments_for_condition_users.rb +23 -0
- data/lib/generators/solidus_friendly_promotions/install/templates/initializer.rb +30 -30
- data/lib/solidus_friendly_promotions/configuration.rb +11 -3
- data/lib/solidus_friendly_promotions/migrate_adjustments.rb +11 -11
- data/lib/solidus_friendly_promotions/promotion_map.rb +17 -17
- data/lib/solidus_friendly_promotions/promotion_migrator.rb +16 -16
- data/lib/solidus_friendly_promotions/testing_support/factories/friendly_promotion_factory.rb +8 -34
- data/lib/solidus_friendly_promotions/testing_support/factories/friendly_shipping_rate_discount_factory.rb +2 -2
- data/lib/solidus_friendly_promotions/version.rb +1 -1
- data/lib/tasks/solidus_friendly_promotions/migrate_adjustments.rake +2 -2
- data/solidus_friendly_promotions.gemspec +2 -2
- metadata +114 -86
- data/.rubocop_todo.yml +0 -157
- data/app/controllers/solidus_friendly_promotions/admin/promotion_actions_controller.rb +0 -103
- data/app/controllers/solidus_friendly_promotions/admin/promotion_rules_controller.rb +0 -105
- data/app/helpers/solidus_friendly_promotions/admin/promotion_actions_helper.rb +0 -23
- data/app/helpers/solidus_friendly_promotions/admin/promotion_rules_helper.rb +0 -25
- data/app/models/solidus_friendly_promotions/products_promotion_rule.rb +0 -8
- data/app/models/solidus_friendly_promotions/promotion_rules_store.rb +0 -8
- data/app/models/solidus_friendly_promotions/promotion_rules_taxon.rb +0 -8
- data/app/views/solidus_friendly_promotions/admin/promotion_actions/_calculator_select.html.erb +0 -16
- data/app/views/solidus_friendly_promotions/admin/promotion_actions/_form.html.erb +0 -3
- data/app/views/solidus_friendly_promotions/admin/promotion_actions/_promotion_action.html.erb +0 -29
- data/app/views/solidus_friendly_promotions/admin/promotion_actions/_type_select.html.erb +0 -14
- data/app/views/solidus_friendly_promotions/admin/promotion_actions/actions/_adjust_line_item.html.erb +0 -6
- data/app/views/solidus_friendly_promotions/admin/promotion_actions/actions/_adjust_shipment.html.erb +0 -6
- data/app/views/solidus_friendly_promotions/admin/promotion_actions/actions/_calculator_fields.erb +0 -9
- data/app/views/solidus_friendly_promotions/admin/promotion_actions/calculators/flat_rate/_fields.html.erb +0 -6
- data/app/views/solidus_friendly_promotions/admin/promotion_actions/calculators/tiered_flat_rate/_fields.html.erb +0 -34
- data/app/views/solidus_friendly_promotions/admin/promotion_actions/calculators/tiered_percent/_fields.html.erb +0 -34
- data/app/views/solidus_friendly_promotions/admin/promotion_actions/calculators/tiered_percent_on_eligible_item_quantity/_tier_fields.html.erb +0 -27
- data/app/views/solidus_friendly_promotions/admin/promotion_actions/edit.html.erb +0 -23
- data/app/views/solidus_friendly_promotions/admin/promotion_actions/new.html.erb +0 -26
- data/app/views/solidus_friendly_promotions/admin/promotion_rules/_promotion_rule.html.erb +0 -22
- data/app/views/solidus_friendly_promotions/admin/promotion_rules/_type_select.html.erb +0 -20
- data/app/views/solidus_friendly_promotions/admin/promotion_rules/new.html.erb +0 -24
- data/app/views/solidus_friendly_promotions/admin/promotion_rules/rules/_first_order.html.erb +0 -3
- data/app/views/solidus_friendly_promotions/admin/promotion_rules/rules/_first_repeat_purchase_since.html.erb +0 -6
- data/app/views/solidus_friendly_promotions/admin/promotion_rules/rules/_item_total.html.erb +0 -17
- data/app/views/solidus_friendly_promotions/admin/promotion_rules/rules/_line_item_option_value.html.erb +0 -25
- data/app/views/solidus_friendly_promotions/admin/promotion_rules/rules/_line_item_taxon.html.erb +0 -17
- data/app/views/solidus_friendly_promotions/admin/promotion_rules/rules/_minimum_quantity.html.erb +0 -5
- data/app/views/solidus_friendly_promotions/admin/promotion_rules/rules/_nth_order.html.erb +0 -15
- data/app/views/solidus_friendly_promotions/admin/promotion_rules/rules/_one_use_per_user.html.erb +0 -3
- data/app/views/solidus_friendly_promotions/admin/promotion_rules/rules/_product.html.erb +0 -44
- data/app/views/solidus_friendly_promotions/admin/promotion_rules/rules/_store.html.erb +0 -9
- data/app/views/solidus_friendly_promotions/admin/promotion_rules/rules/_taxon.html.erb +0 -44
- data/app/views/solidus_friendly_promotions/admin/promotion_rules/rules/_user.html.erb +0 -7
- data/app/views/solidus_friendly_promotions/admin/promotion_rules/rules/_user_logged_in.html.erb +0 -3
- data/app/views/solidus_friendly_promotions/admin/promotion_rules/rules/_user_role.html.erb +0 -15
- data/app/views/solidus_friendly_promotions/admin/promotion_rules/rules/line_item_option_value/_option_value_fields.html.erb +0 -17
@@ -0,0 +1,24 @@
|
|
1
|
+
class UpdateColumnCommentsForConditionTaxons < ActiveRecord::Migration[7.1]
|
2
|
+
def up
|
3
|
+
if connection.supports_comments?
|
4
|
+
change_table_comment(:friendly_condition_taxons, friendly_condition_taxons_table_comment)
|
5
|
+
change_column_comment(:friendly_condition_taxons, :condition_id, condition_id_comment)
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
def friendly_condition_taxons_table_comment
|
12
|
+
<<~COMMENT
|
13
|
+
Join table between conditions and taxons. Only used if the promotion condition's type is SolidusFriendlyPromotion::Conditions::Taxon or
|
14
|
+
SolidusFriendlyPromotion::Conditions::LineItemTaxon. Represents those taxons that the promotion condition matches on using its any/all/none
|
15
|
+
or include/exclude match policy.
|
16
|
+
COMMENT
|
17
|
+
end
|
18
|
+
|
19
|
+
def condition_id_comment
|
20
|
+
<<~COMMENT
|
21
|
+
Foreign key to the friendly_conditions table.
|
22
|
+
COMMENT
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class UpdateColumnCommentsForConditionUsers < ActiveRecord::Migration[7.1]
|
2
|
+
def up
|
3
|
+
if connection.supports_comments?
|
4
|
+
change_table_comment(:friendly_condition_users, friendly_condition_users_table_comment)
|
5
|
+
change_column_comment(:friendly_condition_users, :condition_id, condition_id_comment)
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
def friendly_condition_users_table_comment
|
12
|
+
<<~COMMENT
|
13
|
+
Join table between promotion conditions and users. Used with promotion conditions of type "SolidusFriendlyPromotions::Conditions::User".
|
14
|
+
An entry here indicates that a promotion is eligible for the user ID specified here.
|
15
|
+
COMMENT
|
16
|
+
end
|
17
|
+
|
18
|
+
def condition_id_comment
|
19
|
+
<<~COMMENT
|
20
|
+
Foreign key to the friendly_conditions table.
|
21
|
+
COMMENT
|
22
|
+
end
|
23
|
+
end
|
@@ -5,7 +5,7 @@ Spree::Config.order_contents_class = "SolidusFriendlyPromotions::SimpleOrderCont
|
|
5
5
|
Spree::Config.promotion_adjuster_class = "SolidusFriendlyPromotions::FriendlyPromotionAdjuster"
|
6
6
|
|
7
7
|
Rails.application.config.to_prepare do |config|
|
8
|
-
Spree::Order.line_item_comparison_hooks << :
|
8
|
+
Spree::Order.line_item_comparison_hooks << :free_from_order_benefit?
|
9
9
|
end
|
10
10
|
|
11
11
|
# Replace the promotions menu from core with ours
|
@@ -68,7 +68,7 @@ SolidusFriendlyPromotions.configure do |config|
|
|
68
68
|
config.promotions_per_page = 25
|
69
69
|
|
70
70
|
config.promotion_calculators = SolidusFriendlyPromotions::NestedClassSet.new(
|
71
|
-
"SolidusFriendlyPromotions::
|
71
|
+
"SolidusFriendlyPromotions::Benefits::AdjustShipment" => [
|
72
72
|
"SolidusFriendlyPromotions::Calculators::FlatRate",
|
73
73
|
"SolidusFriendlyPromotions::Calculators::FlexiRate",
|
74
74
|
"SolidusFriendlyPromotions::Calculators::Percent",
|
@@ -76,7 +76,7 @@ SolidusFriendlyPromotions.configure do |config|
|
|
76
76
|
"SolidusFriendlyPromotions::Calculators::TieredPercent",
|
77
77
|
"SolidusFriendlyPromotions::Calculators::TieredPercentOnEligibleItemQuantity"
|
78
78
|
],
|
79
|
-
"SolidusFriendlyPromotions::
|
79
|
+
"SolidusFriendlyPromotions::Benefits::AdjustLineItem" => [
|
80
80
|
"SolidusFriendlyPromotions::Calculators::DistributedAmount",
|
81
81
|
"SolidusFriendlyPromotions::Calculators::FlatRate",
|
82
82
|
"SolidusFriendlyPromotions::Calculators::FlexiRate",
|
@@ -85,47 +85,47 @@ SolidusFriendlyPromotions.configure do |config|
|
|
85
85
|
"SolidusFriendlyPromotions::Calculators::TieredPercent",
|
86
86
|
"SolidusFriendlyPromotions::Calculators::TieredPercentOnEligibleItemQuantity"
|
87
87
|
],
|
88
|
-
"SolidusFriendlyPromotions::
|
88
|
+
"SolidusFriendlyPromotions::Benefits::AdjustLineItemQuantityGroups" => [
|
89
89
|
"SolidusFriendlyPromotions::Calculators::FlatRate",
|
90
90
|
"SolidusFriendlyPromotions::Calculators::Percent",
|
91
91
|
"SolidusFriendlyPromotions::Calculators::TieredPercentOnEligibleItemQuantity"
|
92
92
|
],
|
93
|
-
"SolidusFriendlyPromotions::
|
93
|
+
"SolidusFriendlyPromotions::Benefits::CreateDiscountedItem" => [
|
94
94
|
"SolidusFriendlyPromotions::Calculators::FlatRate",
|
95
95
|
"SolidusFriendlyPromotions::Calculators::Percent",
|
96
96
|
"SolidusFriendlyPromotions::Calculators::TieredPercentOnEligibleItemQuantity"
|
97
97
|
]
|
98
98
|
)
|
99
99
|
|
100
|
-
config.
|
101
|
-
"SolidusFriendlyPromotions::
|
102
|
-
"SolidusFriendlyPromotions::
|
103
|
-
"SolidusFriendlyPromotions::
|
104
|
-
"SolidusFriendlyPromotions::
|
105
|
-
"SolidusFriendlyPromotions::
|
106
|
-
"SolidusFriendlyPromotions::
|
107
|
-
"SolidusFriendlyPromotions::
|
108
|
-
"SolidusFriendlyPromotions::
|
109
|
-
"SolidusFriendlyPromotions::
|
110
|
-
"SolidusFriendlyPromotions::
|
111
|
-
"SolidusFriendlyPromotions::
|
112
|
-
"SolidusFriendlyPromotions::
|
113
|
-
"SolidusFriendlyPromotions::
|
114
|
-
"SolidusFriendlyPromotions::
|
100
|
+
config.order_conditions = [
|
101
|
+
"SolidusFriendlyPromotions::Conditions::FirstOrder",
|
102
|
+
"SolidusFriendlyPromotions::Conditions::FirstRepeatPurchaseSince",
|
103
|
+
"SolidusFriendlyPromotions::Conditions::ItemTotal",
|
104
|
+
"SolidusFriendlyPromotions::Conditions::DiscountedItemTotal",
|
105
|
+
"SolidusFriendlyPromotions::Conditions::MinimumQuantity",
|
106
|
+
"SolidusFriendlyPromotions::Conditions::NthOrder",
|
107
|
+
"SolidusFriendlyPromotions::Conditions::OneUsePerUser",
|
108
|
+
"SolidusFriendlyPromotions::Conditions::OptionValue",
|
109
|
+
"SolidusFriendlyPromotions::Conditions::Product",
|
110
|
+
"SolidusFriendlyPromotions::Conditions::Store",
|
111
|
+
"SolidusFriendlyPromotions::Conditions::Taxon",
|
112
|
+
"SolidusFriendlyPromotions::Conditions::UserLoggedIn",
|
113
|
+
"SolidusFriendlyPromotions::Conditions::UserRole",
|
114
|
+
"SolidusFriendlyPromotions::Conditions::User"
|
115
115
|
]
|
116
|
-
config.
|
117
|
-
"SolidusFriendlyPromotions::
|
118
|
-
"SolidusFriendlyPromotions::
|
119
|
-
"SolidusFriendlyPromotions::
|
116
|
+
config.line_item_conditions = [
|
117
|
+
"SolidusFriendlyPromotions::Conditions::LineItemOptionValue",
|
118
|
+
"SolidusFriendlyPromotions::Conditions::LineItemProduct",
|
119
|
+
"SolidusFriendlyPromotions::Conditions::LineItemTaxon"
|
120
120
|
]
|
121
|
-
config.
|
122
|
-
"SolidusFriendlyPromotions::
|
121
|
+
config.shipment_conditions = [
|
122
|
+
"SolidusFriendlyPromotions::Conditions::ShippingMethod"
|
123
123
|
]
|
124
124
|
|
125
125
|
config.actions = [
|
126
|
-
"SolidusFriendlyPromotions::
|
127
|
-
"SolidusFriendlyPromotions::
|
128
|
-
"SolidusFriendlyPromotions::
|
129
|
-
"SolidusFriendlyPromotions::
|
126
|
+
"SolidusFriendlyPromotions::Benefits::AdjustLineItem",
|
127
|
+
"SolidusFriendlyPromotions::Benefits::AdjustLineItemQuantityGroups",
|
128
|
+
"SolidusFriendlyPromotions::Benefits::AdjustShipment",
|
129
|
+
"SolidusFriendlyPromotions::Benefits::CreateDiscountedItem"
|
130
130
|
]
|
131
131
|
end
|
@@ -19,9 +19,9 @@ module SolidusFriendlyPromotions
|
|
19
19
|
add_class_set :line_item_discount_calculators
|
20
20
|
add_class_set :shipment_discount_calculators
|
21
21
|
|
22
|
-
add_class_set :
|
23
|
-
add_class_set :
|
24
|
-
add_class_set :
|
22
|
+
add_class_set :order_conditions
|
23
|
+
add_class_set :line_item_conditions
|
24
|
+
add_class_set :shipment_conditions
|
25
25
|
|
26
26
|
add_class_set :actions
|
27
27
|
|
@@ -29,6 +29,14 @@ module SolidusFriendlyPromotions
|
|
29
29
|
class_name_attribute :promotion_code_batch_mailer_class,
|
30
30
|
default: "SolidusFriendlyPromotions::PromotionCodeBatchMailer"
|
31
31
|
|
32
|
+
# Allows providing a different promotion advertiser.
|
33
|
+
# @!attribute [rw] advertiser_class
|
34
|
+
# @see Spree::PromotionAdvertiser
|
35
|
+
# @return [Class] an object that conforms to the API of
|
36
|
+
# the standard promotion advertiser class
|
37
|
+
# Spree::PromotionAdvertiser.
|
38
|
+
class_name_attribute :advertiser_class, default: "SolidusFriendlyPromotions::PromotionAdvertiser"
|
39
|
+
|
32
40
|
# @!attribute [rw] promotions_per_page
|
33
41
|
# @return [Integer] Promotions to show per-page in the admin (default: +25+)
|
34
42
|
preference :promotions_per_page, :integer, default: 25
|
@@ -8,17 +8,17 @@ module SolidusFriendlyPromotions
|
|
8
8
|
<<~SQL
|
9
9
|
UPDATE spree_adjustments
|
10
10
|
INNER JOIN spree_promotion_actions ON spree_adjustments.source_id = spree_promotion_actions.id and spree_adjustments.source_type = 'Spree::PromotionAction'
|
11
|
-
INNER JOIN
|
12
|
-
SET source_id =
|
13
|
-
source_type = 'SolidusFriendlyPromotions::
|
11
|
+
INNER JOIN friendly_benefits ON friendly_benefits.original_promotion_action_id = spree_promotion_actions.id
|
12
|
+
SET source_id = friendly_benefits.id,
|
13
|
+
source_type = 'SolidusFriendlyPromotions::Benefit'
|
14
14
|
SQL
|
15
15
|
else
|
16
16
|
<<~SQL
|
17
17
|
UPDATE spree_adjustments
|
18
|
-
SET source_id =
|
19
|
-
source_type = 'SolidusFriendlyPromotions::
|
18
|
+
SET source_id = friendly_benefits.id,
|
19
|
+
source_type = 'SolidusFriendlyPromotions::Benefit'
|
20
20
|
FROM spree_promotion_actions
|
21
|
-
INNER JOIN
|
21
|
+
INNER JOIN friendly_benefits ON friendly_benefits.original_promotion_action_id = spree_promotion_actions.id
|
22
22
|
WHERE spree_adjustments.source_id = spree_promotion_actions.id and spree_adjustments.source_type = 'Spree::PromotionAction'
|
23
23
|
SQL
|
24
24
|
end
|
@@ -30,11 +30,11 @@ module SolidusFriendlyPromotions
|
|
30
30
|
sql = if ActiveRecord::Base.connection_db_config.adapter == "mysql2"
|
31
31
|
<<~SQL
|
32
32
|
UPDATE spree_adjustments
|
33
|
-
INNER JOIN
|
34
|
-
INNER JOIN spree_promotion_actions ON spree_adjustments.source_id =
|
33
|
+
INNER JOIN friendly_benefits
|
34
|
+
INNER JOIN spree_promotion_actions ON spree_adjustments.source_id = friendly_benefits.id and spree_adjustments.source_type = 'SolidusFriendlyPromotions::Benefit'
|
35
35
|
SET source_id = spree_promotion_actions.id,
|
36
36
|
source_type = 'Spree::PromotionAction'
|
37
|
-
WHERE
|
37
|
+
WHERE friendly_benefits.original_promotion_action_id = spree_promotion_actions.id
|
38
38
|
SQL
|
39
39
|
else
|
40
40
|
<<~SQL
|
@@ -42,8 +42,8 @@ module SolidusFriendlyPromotions
|
|
42
42
|
SET source_id = spree_promotion_actions.id,
|
43
43
|
source_type = 'Spree::PromotionAction'
|
44
44
|
FROM spree_promotion_actions
|
45
|
-
INNER JOIN
|
46
|
-
WHERE spree_adjustments.source_id =
|
45
|
+
INNER JOIN friendly_benefits ON friendly_benefits.original_promotion_action_id = spree_promotion_actions.id
|
46
|
+
WHERE spree_adjustments.source_id = friendly_benefits.id and spree_adjustments.source_type = 'SolidusFriendlyPromotions::Benefit'
|
47
47
|
SQL
|
48
48
|
end
|
49
49
|
|
@@ -2,31 +2,31 @@
|
|
2
2
|
|
3
3
|
module SolidusFriendlyPromotions
|
4
4
|
PROMOTION_MAP = {
|
5
|
-
|
5
|
+
conditions: {
|
6
6
|
Spree::Promotion::Rules::ItemTotal =>
|
7
|
-
SolidusFriendlyPromotions::
|
7
|
+
SolidusFriendlyPromotions::Conditions::ItemTotal,
|
8
8
|
Spree::Promotion::Rules::Product =>
|
9
|
-
SolidusFriendlyPromotions::
|
9
|
+
SolidusFriendlyPromotions::Conditions::Product,
|
10
10
|
Spree::Promotion::Rules::User =>
|
11
|
-
SolidusFriendlyPromotions::
|
11
|
+
SolidusFriendlyPromotions::Conditions::User,
|
12
12
|
Spree::Promotion::Rules::FirstOrder =>
|
13
|
-
SolidusFriendlyPromotions::
|
13
|
+
SolidusFriendlyPromotions::Conditions::FirstOrder,
|
14
14
|
Spree::Promotion::Rules::UserLoggedIn =>
|
15
|
-
SolidusFriendlyPromotions::
|
15
|
+
SolidusFriendlyPromotions::Conditions::UserLoggedIn,
|
16
16
|
Spree::Promotion::Rules::OneUsePerUser =>
|
17
|
-
SolidusFriendlyPromotions::
|
17
|
+
SolidusFriendlyPromotions::Conditions::OneUsePerUser,
|
18
18
|
Spree::Promotion::Rules::Taxon =>
|
19
|
-
SolidusFriendlyPromotions::
|
19
|
+
SolidusFriendlyPromotions::Conditions::Taxon,
|
20
20
|
Spree::Promotion::Rules::NthOrder =>
|
21
|
-
SolidusFriendlyPromotions::
|
21
|
+
SolidusFriendlyPromotions::Conditions::NthOrder,
|
22
22
|
Spree::Promotion::Rules::OptionValue =>
|
23
|
-
SolidusFriendlyPromotions::
|
23
|
+
SolidusFriendlyPromotions::Conditions::OptionValue,
|
24
24
|
Spree::Promotion::Rules::FirstRepeatPurchaseSince =>
|
25
|
-
SolidusFriendlyPromotions::
|
25
|
+
SolidusFriendlyPromotions::Conditions::FirstRepeatPurchaseSince,
|
26
26
|
Spree::Promotion::Rules::UserRole =>
|
27
|
-
SolidusFriendlyPromotions::
|
27
|
+
SolidusFriendlyPromotions::Conditions::UserRole,
|
28
28
|
Spree::Promotion::Rules::Store =>
|
29
|
-
SolidusFriendlyPromotions::
|
29
|
+
SolidusFriendlyPromotions::Conditions::Store
|
30
30
|
},
|
31
31
|
actions: {
|
32
32
|
Spree::Promotion::Actions::CreateAdjustment => ->(old_action) {
|
@@ -37,7 +37,7 @@ module SolidusFriendlyPromotions
|
|
37
37
|
SolidusFriendlyPromotions::Calculators::Percent.new(preferred_percent: old_action.calculator.preferred_flat_percent)
|
38
38
|
end
|
39
39
|
|
40
|
-
SolidusFriendlyPromotions::
|
40
|
+
SolidusFriendlyPromotions::Benefits::AdjustLineItem.new(
|
41
41
|
calculator: calculator
|
42
42
|
)
|
43
43
|
},
|
@@ -58,7 +58,7 @@ module SolidusFriendlyPromotions
|
|
58
58
|
SolidusFriendlyPromotions::Calculators::TieredPercent.new(preferences: preferences)
|
59
59
|
end
|
60
60
|
|
61
|
-
SolidusFriendlyPromotions::
|
61
|
+
SolidusFriendlyPromotions::Benefits::AdjustLineItem.new(
|
62
62
|
calculator: calculator
|
63
63
|
)
|
64
64
|
},
|
@@ -79,13 +79,13 @@ module SolidusFriendlyPromotions
|
|
79
79
|
SolidusFriendlyPromotions::Calculators::TieredPercent.new(preferences: preferences)
|
80
80
|
end
|
81
81
|
|
82
|
-
SolidusFriendlyPromotions::
|
82
|
+
SolidusFriendlyPromotions::Benefits::AdjustLineItemQuantityGroups.new(
|
83
83
|
preferred_group_size: old_action.preferred_group_size,
|
84
84
|
calculator: calculator
|
85
85
|
)
|
86
86
|
},
|
87
87
|
Spree::Promotion::Actions::FreeShipping => ->(old_action) {
|
88
|
-
SolidusFriendlyPromotions::
|
88
|
+
SolidusFriendlyPromotions::Benefits::AdjustShipment.new(
|
89
89
|
calculator: SolidusFriendlyPromotions::Calculators::Percent.new(
|
90
90
|
preferred_percent: 100
|
91
91
|
)
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module SolidusFriendlyPromotions
|
4
4
|
class PromotionMigrator
|
5
|
-
PROMOTION_IGNORED_ATTRIBUTES = ["id", "type", "promotion_category_id"]
|
5
|
+
PROMOTION_IGNORED_ATTRIBUTES = ["id", "type", "promotion_category_id", "promotion_id"]
|
6
6
|
|
7
7
|
attr_reader :promotion_map
|
8
8
|
|
@@ -24,12 +24,12 @@ module SolidusFriendlyPromotions
|
|
24
24
|
name: promotion.promotion_category.name
|
25
25
|
)
|
26
26
|
end
|
27
|
-
new_promotion.
|
28
|
-
|
29
|
-
end
|
30
|
-
new_promotion.actions = promotion.actions.flat_map do |old_promotion_action|
|
31
|
-
generate_new_promotion_actions(old_promotion_action)&.tap do |new_promotion_action|
|
27
|
+
new_promotion.benefits = promotion.actions.flat_map do |old_promotion_action|
|
28
|
+
generate_new_benefits(old_promotion_action)&.tap do |new_promotion_action|
|
32
29
|
new_promotion_action.original_promotion_action = old_promotion_action
|
30
|
+
new_promotion_action.conditions = promotion.rules.flat_map do |old_promotion_rule|
|
31
|
+
generate_new_promotion_conditions(old_promotion_rule)
|
32
|
+
end
|
33
33
|
end
|
34
34
|
end.compact
|
35
35
|
new_promotion.save!
|
@@ -75,7 +75,7 @@ module SolidusFriendlyPromotions
|
|
75
75
|
)
|
76
76
|
end
|
77
77
|
|
78
|
-
def
|
78
|
+
def generate_new_benefits(old_promotion_action)
|
79
79
|
promo_action_config = promotion_map[:actions][old_promotion_action.class]
|
80
80
|
if promo_action_config.nil?
|
81
81
|
puts("#{old_promotion_action.class} is not supported")
|
@@ -84,19 +84,19 @@ module SolidusFriendlyPromotions
|
|
84
84
|
promo_action_config.call(old_promotion_action)
|
85
85
|
end
|
86
86
|
|
87
|
-
def
|
88
|
-
|
89
|
-
if
|
87
|
+
def generate_new_promotion_conditions(old_promotion_rule)
|
88
|
+
new_promo_condition_class = promotion_map[:conditions][old_promotion_rule.class]
|
89
|
+
if new_promo_condition_class.nil?
|
90
90
|
puts("#{old_promotion_rule.class} is not supported")
|
91
91
|
[]
|
92
|
-
elsif
|
93
|
-
|
92
|
+
elsif new_promo_condition_class.respond_to?(:call)
|
93
|
+
new_promo_condition_class.call(old_promotion_rule)
|
94
94
|
else
|
95
|
-
|
96
|
-
|
97
|
-
|
95
|
+
new_condition = new_promo_condition_class.new(old_promotion_rule.attributes.except(*PROMOTION_IGNORED_ATTRIBUTES))
|
96
|
+
new_condition.preload_relations.each do |relation|
|
97
|
+
new_condition.send(:"#{relation}=", old_promotion_rule.send(relation))
|
98
98
|
end
|
99
|
-
[
|
99
|
+
[new_condition]
|
100
100
|
end
|
101
101
|
end
|
102
102
|
end
|
data/lib/solidus_friendly_promotions/testing_support/factories/friendly_promotion_factory.rb
CHANGED
@@ -14,28 +14,29 @@ FactoryBot.define do
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
trait :
|
17
|
+
trait :with_adjustable_benefit do
|
18
18
|
transient do
|
19
19
|
preferred_amount { 10 }
|
20
20
|
calculator_class { SolidusFriendlyPromotions::Calculators::FlatRate }
|
21
|
-
|
21
|
+
promotion_benefit_class { SolidusFriendlyPromotions::Benefits::AdjustLineItem }
|
22
|
+
conditions { [] }
|
22
23
|
end
|
23
24
|
|
24
25
|
after(:create) do |promotion, evaluator|
|
25
26
|
calculator = evaluator.calculator_class.new
|
26
27
|
calculator.preferred_amount = evaluator.preferred_amount
|
27
|
-
evaluator.
|
28
|
+
evaluator.promotion_benefit_class.create!(calculator: calculator, promotion: promotion, conditions: evaluator.conditions)
|
28
29
|
end
|
29
30
|
end
|
30
31
|
|
31
|
-
factory :
|
32
|
+
factory :friendly_promotion_with_benefit_adjustment, traits: [:with_adjustable_benefit]
|
32
33
|
|
33
34
|
trait :with_line_item_adjustment do
|
34
35
|
transient do
|
35
36
|
adjustment_rate { 10 }
|
36
37
|
end
|
37
38
|
|
38
|
-
|
39
|
+
with_adjustable_benefit
|
39
40
|
preferred_amount { adjustment_rate }
|
40
41
|
end
|
41
42
|
|
@@ -45,7 +46,7 @@ FactoryBot.define do
|
|
45
46
|
after(:create) do |promotion|
|
46
47
|
calculator = SolidusFriendlyPromotions::Calculators::Percent.new(preferred_percent: 100)
|
47
48
|
|
48
|
-
SolidusFriendlyPromotions::
|
49
|
+
SolidusFriendlyPromotions::Benefits::AdjustShipment.create!(promotion: promotion, calculator: calculator)
|
49
50
|
end
|
50
51
|
end
|
51
52
|
|
@@ -54,38 +55,11 @@ FactoryBot.define do
|
|
54
55
|
weighted_order_adjustment_amount { 10 }
|
55
56
|
end
|
56
57
|
|
57
|
-
|
58
|
+
with_adjustable_benefit
|
58
59
|
preferred_amount { weighted_order_adjustment_amount }
|
59
60
|
calculator_class { SolidusFriendlyPromotions::Calculators::DistributedAmount }
|
60
61
|
end
|
61
62
|
|
62
63
|
factory :friendly_promotion_with_order_adjustment, traits: [:with_order_adjustment]
|
63
|
-
|
64
|
-
trait :with_item_total_rule do
|
65
|
-
transient do
|
66
|
-
item_total_threshold_amount { 10 }
|
67
|
-
end
|
68
|
-
|
69
|
-
after(:create) do |promotion, evaluator|
|
70
|
-
rule = SolidusFriendlyPromotions::Rules::ItemTotal.create!(
|
71
|
-
promotion: promotion,
|
72
|
-
preferred_operator: "gte",
|
73
|
-
preferred_amount: evaluator.item_total_threshold_amount
|
74
|
-
)
|
75
|
-
promotion.rules << rule
|
76
|
-
promotion.save!
|
77
|
-
end
|
78
|
-
end
|
79
|
-
factory :friendly_promotion_with_item_total_rule, traits: [:with_item_total_rule]
|
80
|
-
trait :with_first_order_rule do
|
81
|
-
after(:create) do |promotion, _evaluator|
|
82
|
-
rule = SolidusFriendlyPromotions::Rules::FirstOrder.create!(
|
83
|
-
promotion: promotion
|
84
|
-
)
|
85
|
-
promotion.rules << rule
|
86
|
-
promotion.save!
|
87
|
-
end
|
88
|
-
end
|
89
|
-
factory :friendly_promotion_with_first_order_rule, traits: [:with_first_order_rule]
|
90
64
|
end
|
91
65
|
end
|
@@ -4,10 +4,10 @@ FactoryBot.define do
|
|
4
4
|
factory :friendly_shipping_rate_discount, class: "SolidusFriendlyPromotions::ShippingRateDiscount" do
|
5
5
|
amount { BigDecimal("-4.00") }
|
6
6
|
shipping_rate
|
7
|
-
|
7
|
+
benefit do
|
8
8
|
promotion = create(:friendly_promotion, name: "10% off shipping!", customer_label: "10% off")
|
9
9
|
ten_percent = SolidusFriendlyPromotions::Calculators::Percent.new(preferred_percent: 10)
|
10
|
-
SolidusFriendlyPromotions::
|
10
|
+
SolidusFriendlyPromotions::Benefits::AdjustShipment.create!(promotion: promotion, calculator: ten_percent)
|
11
11
|
end
|
12
12
|
label { "10% off" }
|
13
13
|
end
|
@@ -2,13 +2,13 @@
|
|
2
2
|
|
3
3
|
namespace :solidus_friendly_promotions do
|
4
4
|
namespace :migrate_adjustments do
|
5
|
-
desc "Migrate adjustments with Spree::
|
5
|
+
desc "Migrate adjustments with Spree::Benefit sources to SolidusFriendlyPromotions::Benefit sources"
|
6
6
|
task up: :environment do
|
7
7
|
require "solidus_friendly_promotions/migrate_adjustments"
|
8
8
|
SolidusFriendlyPromotions::MigrateAdjustments.up
|
9
9
|
end
|
10
10
|
|
11
|
-
desc "Migrate adjustments with SolidusFriendlyPromotions::
|
11
|
+
desc "Migrate adjustments with SolidusFriendlyPromotions::Benefit sources to Spree::Benefit sources"
|
12
12
|
task down: :environment do
|
13
13
|
require "solidus_friendly_promotions/migrate_adjustments"
|
14
14
|
SolidusFriendlyPromotions::MigrateAdjustments.down
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
|
11
11
|
spec.summary = "A replacement for Solidus' promotion system"
|
12
12
|
spec.description = "Experimental replacement for the promotion system in Solidus"
|
13
|
-
spec.homepage = "https://github.com/
|
13
|
+
spec.homepage = "https://github.com/friendlycart/solidus_friendly_promotions#readme"
|
14
14
|
spec.license = "BSD-3-Clause"
|
15
15
|
|
16
16
|
spec.metadata["homepage_uri"] = spec.homepage
|
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.executables = files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
29
|
spec.require_paths = ["lib"]
|
30
30
|
|
31
|
-
spec.add_dependency "solidus_core", [">= 4.0.0", "<
|
31
|
+
spec.add_dependency "solidus_core", [">= 4.0.0", "< 4.4"]
|
32
32
|
spec.add_dependency "solidus_support", "~> 0.5"
|
33
33
|
spec.add_dependency "turbo-rails", "~> 1.4"
|
34
34
|
spec.add_dependency "stimulus-rails", "~> 1.2"
|