Problem/Motivation
As per #2920694-4: [Code Improvement] Unhardcode status message block id inside RefreshPageElementsHelper:
Considering that the approach for refreshing cart content will not be changed, so, in future I will have to split RefreshPageElementsHelper class into two. One will refresh the status message, and the other will refresh the cart.
There should be two helper classes, one would be responsible only for updating status messages, other would be responsible only for updating the cart block.
Background/More Information:
The different approaches for updating cart block and status messages may look inconsistent. But it is necessary. It is necessary because of the behavior of status messages and cart block. Status messages do not always appear in the page, it only appears when you do some operation. While cart block practically always appears in the page. And due to this the different approaches have been considered.
Proposed resolution
- Write a helper class for updating status messages #2922379: [Code Improvement] Helper class for updating status messages
- Write a helper class for updating cart block #2922380: [Code Improvement] Helper class for updating cart block
Remaining tasks
Update kernel tests if necessary.
User interface changes
N/A
API changes
AjaxAddToCartForm::refreshAddToCartForm()
may affect due to this change.
Data model changes
N/A
Comments
Comment #2
subhojit777Comment #3
subhojit777Comment #4
subhojit777