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

Proxy Design Pattern and Requisition List in Magento 2

Spread the love Requisition List in Magento 2 Requisition

Google Ads Conversion Tracking Through Magento Platform:

Spread the love Google Ads Conversion Tracking Through

Object Pool Pattern in Magento2

Spread the love What is Object Pool Pattern in Magento 2 An

JENKINS

Spread the love JENKINS Introduction and Installation

Virtual Type and Type

Spread the love Virtual type is one of the most common

Customize the length of Input field

Spread the love Sometimes we need to change the limit the

How to Add Custom Tab on Admin Dashboard and Count Website Total Visitor in Magento 2?

Spread the love In this blog we’ll see How to Add Custom

How to Add Sign Out Tab in Customer Account in Magento 2?

Spread the love In this blog we’ll see How to Add

How to create custom tab in product detail page in magento 2?

Spread the love In this blog we’ll see how to add

Understanding and Implementing CORS & CSRF

Spread the love What is security? The world has become more

bluethinkinc Blogs