magento2
magento2 copied to clipboard
Adds Catalog Price Rules to Custom Options
Adds a config option to allow the Catalog Price Rules to discount Custom Options
Description (*)
This is a PR that basically reverts this commit https://github.com/magento/magento2/commit/a1aa4af82c39d8f0445eb8fcf023e7c2cf0bdade but adds a config option to give the choice to the tore owner as whether or not the catalog price rules should discount the custom options.
Manual testing scenarios (*)
- Create a product
- Add some custom options
- Save the product
- Navigate to Catalog Price Rules - Marketing > Catalog Price Rules
- Add new rule, making sure to set it to active with an action of 10% discount - apply as percentage of the original
- Save and apply the new rule
- Visit the product in the front end
- Select one of the options
- The discount is applied to the product price only
- Navigate to Stores > Configuration > Catalog > Catalog > Catalog Price Rules
- Set "Apply to Custom Options" to Yes
- Navigate back to the product
- Select an option
- Notice the discount is applied to the overall price (product price + custom option)
Contribution checklist (*)
- [x] Pull request has a meaningful description of its purpose
- [x] All commits are accompanied by meaningful commit messages
- [x] All new or changed code is covered with unit/integration tests (if applicable)
- [x] README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
- [x] All automated tests passed successfully (all builds are green)
Hi @NetStorm84. Thank you for your contribution! Here are some useful tips on 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.4-develop instance
- deploy vanilla Magento instance
:exclamation: Automated tests can be triggered manually with an appropriate comment:
-
@magento run all tests
- run or re-run all required tests against the PR changes -
@magento run <test-build(s)>
- run or re-run specific test build(s) For example:@magento run Unit Tests
<test-build(s)>
is a comma-separated list of build names.
Allowed build names are:
-
Database Compare
-
Functional Tests CE
-
Functional Tests EE
-
Functional Tests B2B
-
Integration Tests
-
Magento Health Index
-
Sample Data Tests CE
-
Sample Data Tests EE
-
Sample Data Tests B2B
-
Static Tests
-
Unit Tests
-
WebAPI Tests
-
Semantic Version Checker
You can find more information about the builds here :information_source: Run only required test builds during development. Run all test builds before sending your pull request for review.
For more details, review the Code Contributions documentation. Join Magento Community Engineering Slack and ask your questions in #github channel.
@magento run all tests