-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Entered data missing when entering the wrong date for from, to in cart rule #20895
Entered data missing when entering the wrong date for from, to in cart rule #20895
Conversation
Added Consideration of Data Persistance incase of Failed Submission of form.
Hi @adityayadav-cedcoss. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Added Constructor Arguments.
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.
Hi @adityayadav-cedcoss , thanks for the contribution! There are a couple of minor changes that should be done. Please take a look at my code review comments
app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Save.php
Outdated
Show resolved
Hide resolved
app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Save.php
Outdated
Show resolved
Hide resolved
@sivaschenko Please take a look at the updates made. |
@@ -55,13 +62,15 @@ public function __construct( | |||
CollectionFactory $collectionFactory, | |||
\Magento\Framework\Registry $registry, | |||
\Magento\SalesRule\Model\Rule\Metadata\ValueProvider $metadataValueProvider, | |||
DataPersistorInterface $dataPersistor, |
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.
Please add this dependency in a backward compatible way, see "Adding a parameter to Constructor" section of https://devdocs.magento.com/guides/v2.3/contributor-guide/backward-compatible-development/#php
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.
Added the necessary changes @sivaschenko
Thanks for updates @realadityayadav ! Please add new constructor parameter to |
Hi @sivaschenko, thank you for the review. |
Hi @realadityayadav, thank you for your contribution! |
…om, to in cart rule #20895
Description (*)
Changes in DataProvider and Save Controller for Persistance of Form Data In Cart Price Rule
Updated Files -
-> app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Save.php
-> app/code/Magento/SalesRule/Model/Rule/DataProvider.php
Fixed Issues (if relevant)
Manual testing scenarios (*)
1 - Admin -> Marketing -> Cart Rule -> Add New
2 - Fill the all requird item
3 - Enter 'from'(Field) date grater than(>) 'to'(Field) date
Contribution checklist (*)