Product NewsUser Guide

Progressive Web App Extension for Magento 2

Progressive web apps uses modern web capabilities to deliver amazing app-like experience to your users. With the use of this extension, your website can work offline or on a slow internet connection, will load faster, can send push notifications, work like a native app, can be added to the home screen with a single click and so on. As a result, the customer experience is enhanced, you get more traffic, conversions are boosted and sale volumes increase sharply for sure.

Features

  • Faster loading
  • Engaging Push Notifications
  • Works in offline mode
  • Add to home screen without going to the app store
  • Full-screen experience
  • Secure
  • Responsive and user-friendly

Installation:

The steps for installing the extension on your Magento site are:

  1. Download the extension from your account
  2. Unzip the file
  3. Create a folder {Magento 2 root}/app/code
  4. Copy the content from the unzipped folder

Module Configuration:

After the extension is installed, you can configure it from your Magento Admin panel. Here, you can set the following app settings –

  1. App name – The name to be displayed to the user.
  2. App short name – The name to be displayed when there is insufficient space to display the full name of the application.
  3. App description – A general description of what the application does.
  4. Start url – The URL that loads when a user launches the application from a device.
  5. Theme color – The default theme color for an application.
  6. Background color – The background color of the screen that is displayed launching the application and loading it’s contents.
  7. Display – The display mode for the web application. It can be: 
    • Full-screen – All of the available display area is used.
    • Standalone – The application will look and feel like a standalone application.
    • Minimal-UI – Similar to a standalone application, but with a minimal set of UI elements for controlling navigation.
    • Web page – The application opens in a conventional browser tab or new window, depending on the browser and platform.
  8. Screen orientation – The default orientation for the web application. It can be:
    • Any
    • Natural
    • Landscape
    • Portrait
  9. App icon – The application icon that represents your app among a list of other applications.

configuration

configuration- magecube

 

Push notification Settings – You can also set the push notification settings here, i.e. enable / disable push notifications, enter firebase config snippet, sender id, server key and the default image for the notification.

 

 Progressive Web App Extension for Magento 2 - confi

Creating Firebase Product Credentials


In order to use the push notification feature, you need to have Firebase Project Credentials. Please visit this link, login with your google account and create a new project.

 

1.  Click on Add Project.

Firebase Product Credentials

 

2. In the pop-up window that appears, enter your Project Name, Select your Country/Region and click on Create project.

ad a project

 

3. Now click on the Settings icon and select Project Settings option.

Project Settings option

 

4. Now, click the CLOUD MESSAGING tab. Here you will find your Project Credentials. Copy and save your Server Key and Sender ID as displayed below.

CLOUD MESSAGING tab

 

Enter these credentials in the Push Notification settings section of your PWA extension configuration tab.

Get a config snippet for your web app

To get a config snippet for a web app:

  1. Sign in to Firebase and open your project.
  2. On the Overview page, click Add app.
  3. Select Add Firebase to your web app.
  4. Copy the snippet and add it to the Firebase Config Snippet in the push notification settings.

Enter these credentials in the Push Notification settings section of your PWA extension configuration tab.

Sending Push Notifications

You can send push notifications from the Manage notifications section.

notification template

 

Add new Notification Template – Enter the title for the template for your reference, the notification title that would be the title of the actual notification that is sent out, the body of the notification, the URL, and the icon to be displayed.

ad new notification tempelate

Send notifications

send notification

 

Lighthouse Report – You can check whether all of your Progressive Web App (PWA) features are in order or not using Lighthouse. Lighthouse is an open-source tool from Google that audits a web app for PWA features.

PWA report for our demo:

PWA report for our demo:

Front End

A pop-up with the Add to Homescreen option will appear when a customer visits the website for the first time on a mobile device browser.

Front End -

Note – The “Add to Home Screen” pop-up would not appear when display has been set as “Web page”. It would appear for fullscreen, standalone and minimal-ui display types

When the customer clicks on “Add to HomeScreen”, the app icon would appear on the home screen and it would work like a native app.

 

Add to HomeScreen

A pop-up requesting for the permission to send Push Notification will appear when a customer visits the website for the first time on a mobile device browser.

Push Notification will appear when a customer visits the website

Push notification received

push-notification-received

That’s all about our Progressive Web App extension for Magento 2. If you have any query / suggestion / feedback, please contact us here.