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

Enhancing Productivity with Dynamics 365: The Power of Session Restore

Spread the love Enhancing Productivity with Dynamics 365:

Salesforce Admin

Spread the love In our last blog, we discussed common

Unlocking AI with Spring Boot: Real-World Use Cases and Solutions

Spread the love Artificial Intelligence (AI) has moved from

Enhancing Performance with Reactive Java: A Beginner-Friendly Guide

Spread the love In today’s fast-paced software

Integrating Azure Function with Dynamics 365

Spread the love Signup on azure portal and make sure to

How to Create a Power Apps Component Framework (PCF) with React

Spread the love If youʼve been looking to supercharge your

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

bluethinkinc Blogs