How to Create Pop-up Modal Using Widget in Magento2

Blog
Spread the love

Today I will explain how to create pop-up modal using widget in magento2.

Magento popup is generally used to promote special offers or advertise some products. The Magento modal widget implements a secondary window that opens on top of the main window. It contains the overlay and modal content.

To create a popup modal using widget in Magento 2, follow the below steps:

Step1 – Firstly, Create registration.php file inside

app\code\BluethinkInc\PopupWidget

Step2 – Create module.xml file inside

app\code\BluethinkInc\PopupWidget\etc

Step3 – Create widget.xml file inside

app\code\BluethinkInc\PopupWidget\etc

Step4 – Create Popup.php inside Bluethinkinc\PopupWidget\Block\Widget which is define in widget class.

Step 5 – Create popup_widget.phtml inside

Bluethinkinc\PopupWidget\view\frontend\templates\widget

Step 6 – Now, Create requirejs-config.js file inside

Bluethinkinc\PopupWidget\view\frontend

Step 7 – Now, Create popup.js inside

Bluethinkinc\PopupWidget\view\frontend\web\js

Step 8 – Add Widget

For creating go to – Context→ Widgets and click on Add widget

Category_dir_img

Step 9 – when click on Add widget and select your widget

Category_dir_img

Now, Select the area where popup is to be shown.

Category_dir_img

Successfully performing the above steps, will show the Custom Popup window

Category_dir_img

I hope this blog help you for creating pop-up modal using widget.

bluethinkinc_blog

bluethinkinc_blog

2023-03-07

0

Leave a Reply

Your email address will not be published. Required fields are marked *

Find More Blogs

How to Add a Custom Tab to the Customer Order Detail Page in Magento 2

Spread the love Adding a custom tab to the Order Detail

Exception Handling in Java

Spread the love Introduction – Exception:An unwanted

How to add custom less file in Magento2

Spread the love Source files *.css included into layout

Spring Boot Microservices

Spread the love Microservices architecture has become

Implementation of WireMock for better testing

Spread the love WireMock is a flexible and powerful tool

Magento 2: How to selected default option in configurable options?

Spread the love Configurable products in Magento 2 allow

How To Implement Simple JWT Authentication in Django Rest Framework

Spread the love We’ll learn how to use simple JWT

Optimizing Search: Integrating Elasticsearch in Django Applications

Spread the love What is Elasticsearch? Elasticsearch is a

How to create Customer Segments

Spread the love In Magento 2, “customer

Proxy Design Pattern and Requisition List in Magento 2

Spread the love Requisition List in Magento 2 Requisition

bluethinkinc Blogs