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

Refactor apply options of sales rule to it's own source model to simplify extending it #24665

Conversation

Bartlomiejsz
Copy link
Contributor

Description (*)

In current Magento version, if some module needs to add it's own sales rule actions it needs to add plugin on \Magento\SalesRule\Model\Rule\Metadata\ValueProvider class and modify whole metadata class. This PR makes it easier to add/modify those actions by creating own source class for those options. Now it also becomes consistent with Catalog Rules module.

Fixed Issues (if relevant)

Manual testing scenarios (*)

  1. Add after plugin on Magento\SalesRule\Model\Rule\Action\SimpleActionOptionsProvider and add new option to the array
  2. It should be visible in MBO in adding new Cart Price Rule form

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Sep 20, 2019

Hi @Bartlomiejsz. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@sidolov sidolov added the Auto-Tests: Covered All changes in Pull Request is covered by auto-tests label Sep 20, 2019
@ghost ghost assigned sidolov Sep 20, 2019
@magento-engcom-team
Copy link
Contributor

Hi @sidolov, thank you for the review.
ENGCOM-5918 has been created to process this Pull Request

@engcom-Delta
Copy link
Contributor

✔️ QA passed

magento-engcom-team pushed a commit that referenced this pull request Sep 26, 2019
@magento-engcom-team magento-engcom-team merged commit f7d1809 into magento:2.3-develop Sep 26, 2019
@m2-assistant
Copy link

m2-assistant bot commented Sep 26, 2019

Hi @Bartlomiejsz, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@magento-engcom-team magento-engcom-team added this to the Release: 2.3.4 milestone Sep 26, 2019
@Bartlomiejsz Bartlomiejsz deleted the feature/sales_rule_refactor_apply_options_to_source branch October 15, 2019 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants