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

Customize lead qualification for a seamless experience

Spread the love When the 2024 Release Wave 2 was launched,

Create a Custom Console Command in Spryker

Spread the love In Spryker, developers can create custom

SALESFORCE

Spread the love Salesforce is a cloud-based software

CRUD Operation in Spryker Backoffice with a Custom Module

Spread the love Spryker is a highly flexible and modular

How to create custom module on Spryker for Backoffice?

Spread the love Creating a custom module in Spryker

How to Install Spryker Project with Docker on Local Machine

Spread the love Spryker is a flexible and scalable commerce

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

bluethinkinc Blogs