Magento2:How to show success message in checkout page on page load.

  • I want to add success message on load of checkout page
    – Deep Shah
    Commented Oct 16, 2018 at 6:53

1 Answer 1


you need to override controller action(checkout onepage), and need to add message using message manager like

$this->messageManager->addSuccess(__('My Success Message'));

Or else you can do that by javascript on load, by adding script on header block, or use jQuery or KO.

  • 1
    how i can do this using jquery?
    – Deep Shah
    Commented Oct 16, 2018 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.