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
[CatalogPromotions] Add fixtures for catalog promotions rules and actions #13055
[CatalogPromotions] Add fixtures for catalog promotions rules and actions #13055
Conversation
Tomanhez
commented
Sep 3, 2021
Q | A |
---|---|
Branch? | master |
Bug fix? | no |
New feature? | yes |
BC breaks? | no |
Deprecations? | no |
License | MIT |
src/Sylius/Bundle/CoreBundle/Resources/config/app/fixtures/shop_configuration.yaml
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/CoreBundle/Resources/config/app/fixtures/shop_configuration.yaml
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/CoreBundle/Resources/config/app/fixtures/shop_configuration.yaml
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/CoreBundle/Fixture/CatalogPromotionRuleFixture.php
Outdated
Show resolved
Hide resolved
eee9d33
to
86e4765
Compare
src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionActionExampleFactory.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/CoreBundle/Resources/config/app/fixtures/shop_configuration.yaml
Outdated
Show resolved
Hide resolved
86e4765
to
d8ba350
Compare
$resolver | ||
->setDefault('type', CatalogPromotionActionInterface::TYPE_PERCENTAGE_DISCOUNT) | ||
->setAllowedTypes('type', 'string') | ||
->setDefault('configuration', []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be for setting some amount as a default configuration because now, the default action in invalid
$resolver | ||
->setDefault('type', CatalogPromotionRuleInterface::TYPE_FOR_VARIANTS) | ||
->setAllowedTypes('type', 'string') | ||
->setDefault('configuration', []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar as above
actions: | ||
- type: 'percentage_discount' | ||
configuration: | ||
- amount: 0.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- amount: 0.5 | |
amount: 0.5 |
Thank you, Tomasz! 🎉 |
…ns and rules (GSadee) This PR was merged into the 1.11-dev branch. Discussion ---------- | Q | A | --------------- | ----- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Related tickets | fixes #13055 | License | MIT <!-- - Bug fixes must be submitted against the 1.9 or 1.10 branch (the lowest possible) - Features and deprecations must be submitted against the master branch - Make sure that the correct base branch is set To be sure you are not breaking any Backward Compatibilities, check the documentation: https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html --> Commits ------- 42371c8 [CatalogPromotion] Fix configuration of fixtures for actions and rules