Home  ›   Blog   ›  How to Create a Popup in Magento

How to Create a Popup in Magento

How to Create a Popup in Magento

I used Magento for my businesses in the beginning stages, and it really helped me with creating my functional e-commerce website, catalog management, and a lot more.

Recently, I discovered the potential of using popups to boost my online presence and engagement. Popups have shown significant benefits in growing email lists and improving click-through rates (CTRs).

There are two ways to create a Magento 2 popup: using Magento’s own popup builder or utilizing a standardized popup tool like Picreel. In fact, here’s how my Picreel popup looks like in Magento:

Magento popup

But does Magento offer popups? Yes, Magento does offer popup functionality. So, let’s compare Magento’s own popup builder with Picreel, considering the following criteria:

Criteria Magento Popup Picreel Popup
Multi-platform support ❌ Limited to Magento platform only ✅ Supports integration with various website platforms, including WordPress, Wix, Drupal, and more.
Exit Intent Technology ❌ Does not offer exit intent technology ✅ Can trigger popups when users show signs of leaving
Advanced Popup Builder ✅ Offers basic popup creation with code ✅ Allows for advanced customization of popups, including different designs and triggering options
Integrates with various website platforms ❌ Integrates only with the Magento platform ✅ Able to integrate with a variety of website platforms across the web.
Advanced targeting options ❌ Does not offer targeting options ✅ Provides advanced targeting features, offering personalized content based on user behaviors

From my experience, I recommend using Picreel for creating popups because it excels in the following areas:

  • No coding required: Unlike Magento, Picreel simplifies creating popups with a code-free and drag-and-drop interface. No coding is required whatsoever.
  • Better customization options: With Picreel, you have extensive control over the design and layout of your popups, ensuring they align with your brand and capture attention effectively.
  • Advanced targeting options: The advanced targeting capabilities of Picreel enable you to show your popups to specific audience segments based on various parameters, maximizing the impact of your campaign.

Now, let’s dive into the step-by-step tutorial of creating popups using both methods.

Method 1: Using Magento’s Built-in Popup Tool

Magento offers a built-in popup builder that you can leverage to create popups. Follow these steps to create a Magento 2 popup:

1. Create a ‘registration.php’ file inside your extension folder and add the following code:


2. Inside the ‘etc’ directory of your extension, create a ‘module.xml’ file and then add the following code:


3. Create a ‘routes.xml’ file inside the ‘etc/frontend’ directory of your extension with this code:


4. Now, create a ‘extension_index_index.xml’ file inside the ‘view/frontend/layout’ directory of your extension with this:


5. Create a ‘custom.phtml’ file using this code:


6. Once you have completed these steps, the form popup modal will be created in Magento 2.

Custom Form Popup

Note: You can customize the content and appearance of the popup by modifying the custom.phtml file.

Method 2: Using Picreel Popup Builder

Picreel is a versatile popup builder that works seamlessly across multiple platforms. Watch this video tutorial on how you can create a popup using Picreel.

Here are step-by-step instructions on creating a popup in Magento 2 using Picreel:

1. Sign up for a Picreel account and log in.

Sign up for a Picreel account and log in

2. Navigate to the “Campaigns” menu and click “New Campaign.” You can select the templates option from the drop-down or start from scratch.

New Campaign

3. From the templates menu, choose the type of popup you want to create.

templates menu

4. Once you select the design, customize it according to your preferences.

design customize

5. Configure your targeting and trigger options to specify when and where you want your popup to appear.


6. Click “Save” to activate your popup.

Embedding Picreel HTML Code Inside Magento

To embed the Picreel popup in Magento 2, follow these steps:

1. Navigate to campaigns and click on “View Code.

View Code

2. Click on the code to copy it.

3. Now, log in to your Magento Admin Panel.

4. On the Admin Panel sidebar, navigate to “CONTENT > Design > Configuration.”


5. Locate and select the store view that you want to configure and click on the “Edit” link in the Action column.


6. In the configuration settings, click on the “Other Settings” tab and expand the “HTML Head” section.


7. Find the “Scripts and Style Sheets” field and add your custom code in this field. You can insert any verification code or scripts required by third-party services.


8. Once you have added your custom code, click the “Save Configuration” button to save your changes.

Which Method is Better: Method 1 or 2?

When looking at the bigger picture, Picreel clearly stands out as the superior option for creating popups. With its advanced popup functionality and an extensive selection of triggers, you can create highly engaging popups that target customers at the right time.

Also, Picreel comes with a forever-free plan for startups and small businesses and allows you to create unlimited popups with all premium features. I feel the free version does the job, however, you can always look for paid options that start as low as $9.99/month.

Ultimately, the choice depends on your priorities, budget, coding skills, customization and functionality you require for your popups.

FREE. All Features. FOREVER!

Try our Forever FREE account with all premium features!

About the author

Daniel Nicholes shares insights about CRO, persuasive marketing, exit-intent strategies, and using nudges to capture consumer behavior insights with the goal of enhancing user experience. Daniel writes about CRO methods, including landing page optimization, site intercept surveys, popups, and how to optimize the complete customer journey. Daniel actively contributes to industry discussions, offering actionable & practical advice for experience optimization.