Skip to content
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 14 commits into from
Feb 16, 2024
Merged

[pull] main from solidusio:main #396

merged 14 commits into from
Feb 16, 2024

Conversation

pull[bot]
Copy link

@pull pull bot commented Feb 14, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

mamhoff and others added 12 commits February 12, 2024 13:16
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
@pull pull bot merged commit 395d909 into nebulab:main Feb 16, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants