Meetanshi Docs Magento 2 Out of Stock Notification

Out of Stock Notification for Magento 2 - User Guide

Extension Installation

For Magento Marketplace Customers

  • Create a folder structure in Magento root as app/code/Meetanshi/ OutofstockNotifier
  • Download and extract the zip folder and upload our extension files to the app/code/Meetanshi/ OutofstockNotifier via FTP.
  • Login to your SSH and run below commands step by step:
composer require twilio/sdk 
php bin/magento setup:upgrade 
  • For Magento version 2.0.x to 2.1.x -
php bin/magento setup:static-content:deploy
  • For Magento version 2.2.x & above -
php bin/magento setup:static-content:deploy --f
php bin/magento cache:flush 

For Meetanshi Customers

  • Extract the zip folder and upload our extension to the root of your Magento 2 directory via FTP.
  • Login to your SSH and run below commands step by step:
composer require twilio/sdk 
php bin/magento setup:upgrade 
  • For Magento version 2.0.x to 2.1.x -
php bin/magento setup:static-content:deploy
  • For Magento version 2.2.x & above -
php bin/magento setup:static-content:deploy --f
php bin/magento cache:flush 

Important: Don't forget to install Twilio library even if you are not using Twilio SMS gateway for our extension.

Extension Configuration

For configuring the Out of stock notification extension for Mageto 2, login to Magento 2 admin, move to Stores > Configuration > Meetanshi > Out of Stock Notification where you can find various settings to enable the extension.

General Settings

  • Out of Stock Notification: Enable or disable Out of Stock Notification extension from here.

  • Button Text: Enter button text for the out of stock notification subscription button.

  • Notification Message to Show in Frontend: Enter notification message to encourage customers subscribe for the out of stock notifications.

  • Notification Subscription Success Message: Enter success message to show customers who have subscribed for the out of stock notifications.

  • Greeting Text for Email: Enter the greeting text for the back-in-stock notification emails to be sent to the subscribers.

  • Allowed Customer Groups: Select customer groups to allow subscription for the out of stock notification. Out of Stock Notification General Settings

Notification Type Options

Notification Type: Select one of the stock notification types from the two options, "Email" and "SMS".

  • Email: Subscribers receive product back-in-stock notifications via Email.
  • Stock Alert Email Template for Customers: Select the email template to send stock alert email notification to the subscribers. This option supports the custom email template to send the back in stock alerts with cross-sell products as well.

Notification Type Email Settings

Note: Don't forget to set up cron job in Magento 2 to send the stock alert email notification to customers. The extension file runs every 10 minutes to check and send the email notifications.

  • SMS: Subscribers receive product back-in-stock notifications via SMS.
  • Message: Enter back-in-stock message to be sent to the subscribers after the product is restocked either via SMS or via Email as set under the notification type.

Notification Type SMS Settings

API Settings For SMS Gateway

If you have set the Notification Type as "SMS" from the extension configuration, to allow compatibility of the extension with any SMS gateway, its API settings has to be configured after receiving the essential details like Sender ID, API key and URL.

API Settings For SMS Gateway

For option "Other" SMS API Config:

If you are going to use custom SMS API other than Msg91, Twilio or Textlocal, you have to add your CURL URL as below:

Other SMS API Config URL

Format:

https://yoursmsapi.com/sms/submitsms.jsp?user=yourusername&senderid=yoursenderid&key=yoursmskey&mobile=&message=

Sample CURL URL:

https://foxxsms.com/sms/submitsms.jsp?user=METANSHI&senderid=FOXGLV&accusage=6&key=587e05afbcXX&mobile=&message=

Enable Displaying Back-in-Stock Subscription Box

After saving the out of stock notification extension configuration you must have to enable the subscription box to display at product page. There are two options to enable the subscription box at product page,

  1. All Products With Out Of Stock Status
  2. Specific Products With Out Of Stock Status

Enable Display of Back-in-stock Subscription Box For All Products

This options automatically displays the restock alert subsciption box at any of the product (in-frontend) with the out of stock status.

To enable it,

Step 1: Go to Stores > Configuration > Catalog > Inventory > Stock Options and set Display Out of Stock Products to YES .

Enable Display of Back-in-stock Subscription Box For All Products

Step 2: Go to Stores > Configuration > Catalog > Catalog, Find for the Product Alerts, set Allow Alert When Product Comes Back in Stock to YES, Then set the "Product Alerts Run Settings" to set the frequency of sending the alerts. You can also get help form the complete guide on how to enable product alerts. Enable Product Alerts For All Products

Enable Product Specific Out of Stock Notification

If you want to enable out of stock notification extension specifically for particular products, simply enable the extension and go to Catalog >Products . Select the product, edit and set YES to Enable Out of Stock Notification option here.

  • Out of Stock Notification: Enable to allow users subscribe for the back-in-stock notification for this product.

Enable Product Specific Out of Stock Notification

Out of Stock Notification in Frontend

Once the extension is configured, it can be seen enabled on frontend on the out of stock product pages.

Restock Subscription & Alert Via Email

If the admin has set Notification Type as Email, users can see below subscription process in the frontend and receive email notification when product is back-in-stock.

  • Back-in-stock Notification Subscription by a Not Logged-in Customer

Not logged-in customers can register for the out of stock notification from the product page by adding their Email ID and clicking on the " Notify Me " button.

Back-in-stock Notification Subscription by a Not Logged-in Customer

  • Out of Stock Notification Subscription Success Message to Not Logged-in Customers

Immediately after a not logged-in user subscribes for the back-in-stock notification, he gets success message on his screen.

Out of Stock Notification Subscription Success Message to Not Logged-in Customers

  • Back-in-stock Notification Subscription by a Logged-in Customer

Logged-in customers can register for the out of stock notification from the product page just by clicking the link " Sign up to get notified when this product is back in stock ".

Back-in-stock Notification Subscription by a Logged-in Customer

  • Out of Stock Notification Subscription Success Message to Logged-in Customers

Immediately after a logged-in user subscribes for the back-in-stock notification, he gets success message on his screen.

Out of Stock Notification Subscription Success Message to Logged-in Customers

  • Out of Stock Notification Subscription List in Customer's My Account Section

A logged in customer can see the list of subscription for all the out of stock products from his My Account section under the tab " Out of Stock Subscriptions ".

Out of Stock Notification Subscription List in Customer's My Account Section

  • Alert Message to Already Subscribed Users

If a user tries to subscribe for the out of stock notification for the same product repeatedly, he gets an alert message of already subscribed for the product.

Alert Message to Already Subscribed Users

  • Back-in-Stock Notification Email to Subscribers when Item Restocked

Once the out of product gets back in stock, all the subscribers who have subscribed for the back-in-stock notification receive a notification email.

Back-in-Stock Notification Email to Subscribers when Item Restocked

Restock Subscription & Alert Via SMS

If the admin has set Notification Type as SMS (#type-sms), users can see below subscription process in the frontend and receive text message when product is back-in-stock.

  • Back-in-stock Notification Subscription Box To Add Mobile Number

Users can register for back-in-stock SMS notification from the product page. They need to add mobile number and click "Notify Me" to subscribe.

Back-in-stock Notification Subscription Box To Add Mobile Number

  • Out of Stock Notification Subscription Success

Immediately after a user subscribes for the back-in-stock SMS notification, he gets success message.

Out of Stock Notification Subscription Success Message via SMS

  • Alert Message to Already Subscribed Users

If a user tries to subscribe for the out of stock notification for the same product repeatedly, he gets an alert message of already subscribed for the product.

Alert Message to Already Subscribed Users via SMS

  • Out of Stock Notification Subscription List in Customer's My Account Section

Logged in customers can see the list of subscription for all the out of stock products from their My Account section under the tab " Out of Stock Subscriptions ".

Out of Stock Notification Subscription List in Customer's My Account Section via SMS

  • Back-in-Stock SMS Notification to Subscriber Once the out of product gets back in stock, all the subscribers who have subscribed for the back-in-stock SMS notification receive a notification SMS on their mobile number.

Back-in-Stock SMS Notification to Subscriber

Out of Stock Notification Subscribers Grid

All the subscribers who have subscribed for the notify me when product is back in stock are enlisted in a separate grid in the backend. The list contains details of subscribers like website ID, customer Email/mobile number, notification type, product name, date and time of the subscription and the status of the notification Emails or SMSs. ​​​​​​​ ​ Out of Stock Notification Subscribers Grid

Twilio Registration

If you are going to use Twilio as an SMS gateway to send out of stock SMS notifications, you need to register with the Twilio to get Account SID, Auth Token and Twilio Phone Number.

  • First of all, Sign Up for the Twilio account. Add the details and click to get started.

Twilio Sign Up Page

  • After the Email verification, enter your mobile number and click to "Verify".

Twilio Mobile Number Verification

  • Once you click "Verify", you will get an OTP on the added mobile number. Enter the OTP and verify the mobile number. Now move to Settings > General where you can see API details both for live and testing. Copy the Account SID and Auth Token to use them in Magento backend configuration for Twilio account.

Twilio API Settings Account SID and Auth Token

  • Now, click three dots from the left sidebar, go to Programmable SMS and click Build under the Learn and Build option. From here, you can get Twilio phone number to use for sending the SMSs. Click on the " Get a number " button.

Get Twilio Phone Number

  • You will get a number to choose. Click " Choose This Number ".

Choose Twilio Phone Number

  • Once you click the button, you will get a Twilio phone number. Copy this number and set it in the Magento backend configuration for Twilio account.

Copy Twilio Phone Number

Msg91 Registration

The extension allows configuration of the Msg91 SMS gateway to send out of stock SMS notifications. If you choose to use Msg91 SMS gateway integration, follow the steps below to get sender ID and API key.

Note: If you are an Indian user of our Magento 2 Out of Stock Notification extension with Msg91 API , don't forget to follow DLT registration process and get your DLT templates approved for the SMS. Once you get the DLT template ID, enter the same in the respective field in Magento 2 extension configuration.

Msg91 Sign Up Page

  • You will get and code or a magic link in the Email to verify the Email address.

Msg91 Email Verification

  • You will be asked to enter the mobile number for verification.

Msg91 Mobile Number Verification

  • Enter the OTP to verify the mobile number and you will be registered successfully. Login with the credentials.

Msg91 Login Page

  • Under the settings, you can find the Sender ID which you need to copy and paste in the Magento configuration.

Msg91 Sender ID

  • Now move to API, where you can find the API key for the Magento configuration.

Msg91 API Key

  • You can find the Message type under the Send SMS tab. Select the SMS type in Msg91 configuration in Magento as per your requirement.

Msg91 Message Type

Textlocal Registration

The extension allows configuration of the Textlocal SMS gateway to send out of stock SMS notifications. If you choose to use Textlocal SMS gateway integration, follow the steps below to get sender ID and API key.

Textlocal Sign Up Page

  • After the registration, you will get a verification link in your registered Email ID, clicking the link will land you to add additional information page. Here, add the account details and submit to activate your Textlocal account.

Textlocal Add Additional Information

  • Navigate to Settings > API Keys and create new key to use. Copy the created API Key and paste it in Magento 2 extension configuration.

Textlocal Create New API Key

  • Now move to Settings > All Settings and click on " Sender Names " to get your sender name.

Textlocal Sender Names Settings

  • You can copy your Textlocal sender name from here and paste it in Magento 2 extension configuration.

Copy Textlocal Sender Name

  • Textlocal requires to create message template to send SMS notification. Go to Send > Templates & Drafts and click to create and request new SMS template.

Textlocal Create New SMS Template

  • You have to create new message template for back-in-stock SMS notification enabled in Magento 2 out of stock extension configuration. Enter title, select category and sender name. Set message text same as SMS text in Magento 2 extension configuration notification settings.

Textlocal Set Message Text for New Template

  • For the dynamic values in text message input, click " Insert Restricted Template Items ". Click " Insert an Input Box " and it will open a popup to create new placeholder for the dynamic value. Add placeholder text name and set maximum length for the dynamic value. Insert it into the SMS text and while sending the message, this placeholder will match the variable in Magento 2 out of stock notification text and replace it with the real value.

Textlocal Insert Dynamic Value Restricted Template Items

  • Once the message template has been created and submitted, it will take approximately a week to be approved by the Textlocal. You can send back-in- stock SMS notifications only after the message template is approved by the Textlocal. ​​​​​​​
Updated: Mar 7, 2026Top ↑