forked from solidusio/solidus
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pull] main from solidusio:main #396
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This extends the `add_class_set` command to accept a default value. Useful for, well, default values.
Helpful for directly initializing a class set.
This is useful especially for defining a set of classes and classes they can work with, like calculables and calculators.
This new method can be used like so: ``` class MyConfig include Spree::Core::EnvironmentExtension add_nested_class_set :promotion_calculators, default: { "Spree::Promotion::Actions::CreateAdjustments" => [], "Spree::Promotion::Actions::CreateItemAdjustments" => ["Spree::Calculator::FlexiRate"] } end ``` Having an configuration method that allows nesting e.g. calculators by the classes that support them allows us to not hard-code names like these `:promotion_actions_create_adjustments` versus `promotion_actions_create_item_adjustments`.
For now, this class only contains the promotion calculators. More configuration to come.
No need for referencing different extension points here.
We want promotion calculator configuration to live on the Spree::Config.promotions.calculators object, and with the new Nested Class Set, this can be nicely accomplished.
Before we fix this bug, we should reproduce it in a feature spec. Co-authored-by: An Stewart <andrew@super.gd> Co-authored-by: Adam Mueller <adam@super.gd>
This "fixes" the variant scope issue but I'm not sure it's the solution we want. I suppose it depends if ordering by sku is important here. Co-authored-by: An Stewart <andrew@super.gd>
…-stock-items Fix search by variant on stock items
…tensions Nested Class Set extension, Promotion configuration object
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )