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

[CatalogPromotions] Add fixtures for catalog promotions rules and actions #13055

Merged

Conversation

Tomanhez
Copy link
Contributor

@Tomanhez Tomanhez commented Sep 3, 2021

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
License MIT

@Tomanhez Tomanhez requested a review from a team as a code owner September 3, 2021 11:14
@Tomanhez Tomanhez force-pushed the add-fixtures-for-catalog-promotions-rule branch 6 times, most recently from eee9d33 to 86e4765 Compare September 6, 2021 13:02
@GSadee GSadee added the Enhancement Minor issues and PRs improving the current solutions (optimizations, typo fixes, etc.). label Sep 7, 2021
@Tomanhez Tomanhez force-pushed the add-fixtures-for-catalog-promotions-rule branch from 86e4765 to d8ba350 Compare September 7, 2021 07:14
@GSadee GSadee changed the title [CatalogPromotions] Add fixtures for catalog promotions rule [CatalogPromotions] Add fixtures for catalog promotions rules and actions Sep 8, 2021
$resolver
->setDefault('type', CatalogPromotionActionInterface::TYPE_PERCENTAGE_DISCOUNT)
->setAllowedTypes('type', 'string')
->setDefault('configuration', [])
Copy link
Member

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', [])
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- amount: 0.5
amount: 0.5

@GSadee GSadee merged commit 5785a32 into Sylius:master Sep 8, 2021
@GSadee
Copy link
Member

GSadee commented Sep 8, 2021

Thank you, Tomasz! 🎉

GSadee added a commit that referenced this pull request Sep 9, 2021
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Minor issues and PRs improving the current solutions (optimizations, typo fixes, etc.).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants