5 (100%) 2 votes

Hello everyone. Magento 2 implements many Jquery widgets. They are very useful for you when coding the extension in Magento 2. In this blog, I will introduce to you two common Jquery widget in Magento 2. They are Confirmation and Alert widget.

Confirmation and Alert Jquery Widget
Confirmation and Alert Jquery Widget

Confirmation widget:

The Magento confirmation widget implements a modal pop-up window with the cancel and confirmation button.It is an extension of the Magento modal widget.

The confirmation widget source is <Magento_Ui_module_dir>/view/base/web/js/modal/confirm.js

The widget can be used for implementing confirmation windows for both, Admin and storefront.

Alert widget:

The Magento alert widget implements a modal pop-up window with a confirmation button. It extends the Magento modal widget. The alert widget source is <Magento_Ui_module_dir>/view/base/web/js/modal/alert.js

The widget can be used for implementing alert windows for both Admin and storefront.

The steps I mention above is the shortest process for you to do Confirmation and Alert Jquery Widget in Magento 2.

Thank you for reading this post and see you in other posts from Magestore!

How to Add New Command Line to Magento 2
How to Use All Commands in Magento 2 CLI (Part 2)