Installation



You will require to install MageDelight Base Extension first. If it is not installed then please download it from https://www.magedelight.com/pub/extensions/magedelight-base.zip and unzip the package file into the root folder of your Magento 2 installation.

Twilio SDK will be required before you install extension, 

composer require twilio/sdk



Before installing the extension, please make sure to Backup your web directory and store database


You will require to install MageDelight Base Extension first. If it is not installed then please download it from https://www.magedelight.com/pub/extensions/magedelight-base.zip and unzip the package file into the root folder of your Magento 2 installation.

Root Directory is - "app/code/magedelight/#YourExtensionName#"

  • Unzip the extension package file into the root folder of your Magento 2 installation.
  • Connect to SSH console of your server:
    • Navigate to the root folder of your Magento 2 setup
    • Run command as per below sequence,

      php bin/magento setup:upgrade

      php bin/magento setup:di:compile

      php bin/magento setup:static-content:deploy

      php bin/magento cache:clean

  • log out from the backend and log in again


If you are using Magento 2.3 or later then you do not need to activate license. Extension will be activated with silent activation mechanism and does not require activation keys to be entered manually.   


Backend Configuration (Admin side)


General Configurations

  • Enable Mobile OTP Login: Select Yes to enable Mobile OTP functionality for your store.
  • SMS API Gateway: Select "Other" if your SMS provider is other than Twilio.
  • API URL: Provide API URL provided by your SMS gateway provider.
  • API Credentials: Provide comma separated API credentials as per given format (username:gatewayusername,password:userpassword).
  • Key Name for "Send To": Provide key name to be used for send to.
  • Key Name for "Send SMS Body": Provide key name to be used for send SMS body.

  • Add country code to mobile number: Select Yes, if country code is required with user's mobile number.
  • API additional parameters: Provide additional API parameters in comma separated key and value format.
  • API additional parameters to update for promotional route: Provide comma separated additional parameters to update for promotional route in key and value format.
  • API URL for promotional route: Provide URL for promotional API route. Skip if the same URL is being used to send promotional SMS.

  • API URL to fetch SMS status: Provide API URL to fetch SMS status.
  • Processing Status label of SMS: Provide SMS label to be set via CRON job. Only selected status would get updated. Mention each of them comma separated to update via CRON job.
  • Failed Label of SMS: Provide SMS failure status comma separated, it will send notification to admin if actual failure status is same as failed label status.
  • Key name for error message: Provide key name for error message same as SMS provide JSON response to get the reason of delivery failure.
  • Default Country: Select one country within SMS should is being sent.

  • Failure notification email to admin: Select Yes to enable failure notification email for Admin.
  • Notification to email: Provide comma separated admin email ID to receive delivery failure notification.
  • Email sender: Select email template to be used for failure notification to be sent to Admin.

  • Phone number required on sign up page: Select Yes to enable make phone number as mandatory while customer registration.
  • Login Options: Select login options from given options like login with OTP, login with OTP and Password or traditional login method.
  • Send OTP during checkout as COD: Select Yes to enable OTP verification during checkout if payment method is cash on delivery.
  • OTP Format: Select OTP format from Alphanumeric/Alphabetical/Numeric.
  • OTP Length: Provide length to generate OTP.
  • Time for OTP Expiry: Provide expiry in minutes for OTP.

  • Phone number maximum length: Provide maximum length of phone number which user can enter from frontend.
  • Phone number minimum length: Provide minimum length of phone number which user has to enter from frontend.
  • Comment shows below telephone field: Provide a note regarding mobile number to display on frontend.
  • Select address to get phone number to map with existing customer profile: Select address to fetch mobile numbers for existing customers and update the same in their profile. This is to enable OTP login features for existing customers.

  • Enable SMS log: Select Yes to enable SMS logging.
  • CRON timeout to update SMS status: Provide time in seconds as timeout time for CRON job while updating SMS status.
  • Enable CRON to clear SMS log: Select Yes to enable CRON to clear SMS logs.
  • Frequency: Select frequency to run CRON job.
  • Time: Select time to run CRON job on selected frequency.

Backend Functionality


SMS Templates

  • Grid to display and manage previously added OTP SMS templates.

  • Template Name: Provide user friendly name to identify SMS template by admin.
  • Event Type: Select event to send SMS using this template.
  • Template Content: Provide template content as given in sample "Dear Customer, use {otpcode} as OTP for your recent transaction. OTP is valid for 10 minutes.".
  • Store View: Select store view to send SMS with current template.

Promotional SMS

  • Select Grid Type: Select type to send promotional SMS. Current selected type is "Custom Numbers".
  • To Numbers: Provide comma separated customer numbers as per your SMS service providers requirements.
  • Message: Provide promotional message to send to entered numbers.

  • Select Grid Type: Select type to send promotional SMS. Current selected type is "Customer Group".
  • Customer Group: Select customer group to send promotional SMS. It will send to all customers who belongs to selected customer group.
  • Message: Provide promotional message to send to selected customer groups numbers.

  • Select Grid Type: Select type to send promotional SMS. Current selected type is "Customers".
  • Customers: Select customers to send promotional SMS.
  • Message: Provide promotional message to send to selected customers.

  • Select Grid Type: Select type to send promotional SMS. Current selected type is "Abandoned Cart".
  • Message: Provide promotional message to send to those customers who has made cart abandoned.

  • Select Grid Type: Select type to send promotional SMS. Current selected type is " Import CSV".
  • Import CSV: Upload CSV file with list of customers numbers to send promotional SMS.
  • Download CSV: Download sample CSV file to get file format.
  • Message: Provide promotional message to send to imported customers from CSV.

SMS Logs

  • Keep log of all messages and keep the status updated with filter facility.

Frontend Functionality


  • Customer registration page with OTP verification facility.

  • Customer login page with OTP verification facility.

  • Customer profile update page with OTP verification.

  • OTP verification on checkout process if selected payment method as "Cash on Delivery:.

Sample OTP SMS

  • Sample OTP message and Promotional message.

API



Please use SWAGGER to get detailed information of parameters.

https://mobileotplogin.m2.demo.magedelight.com/swagger

Send / resend  OTP - GraphQL: rest/V1/

sendotp

Sample Data

{
"resend":0,
"storeId":0,
"mobile":1234568520,
"eventType":"customer_signup_otp"
}


Customer login  with OTP Only - GraphQL: customertoken

Sample Data

{
"mobile":1234568520,
"otp":1234,
"websiteId":1
}


Customer login  with OTP and Password - GraphQL: customertokenwithotpandpassword

Sample Data

{
"mobile":1234568520,
"otp":1234,
"password":"roni@123",
"websiteId":1
}

Customer account create  with OTP : customersignupwithotp

Sample Data

{
"customer":{
"prefix":"Mrs.",
"firstname":"Veronica",
"middlename":"John",
"lastname":"Costello",
"email":"roni_cost@example.com",
"dob":"12/15/1973",
"taxvat":"",
"gender":2
},
"mobile":1234568520,
"otp":1234,
"password":"Roni@123"
}

Customer account edit  with OTP : customereditwithotp

Sample Data

{
"customer":{
"prefix":"Mrs.",
"firstname":"Veronica",
"middlename":"John",
"lastname":"Costello",
"email":"roni_cost@example.com",
"dob":"12/15/1973",
"taxvat":"",
"gender":2
},
"mobile":1234568520,
"otp":1234,
"password":"Roni@123",
"websiteId":1
}


Send reset password link in mail with OTP - GraphQL: passwordwithotp

Sample Data

{
"mobile":1234568520,
"otp":1234,
"template":"email_reset",
"websiteId":1
}


Guest place order with payment information saving for COD - GraphQL: guestcheckoutwithotpforcod/:cartId

Sample Data

{
"cartId":195
"email":"roni_cost@example.com",
"mobile":1234568520,
"otp":1234,
"paymentMethod":"cod"
}


My place order with payment information saving - GraphQL: carts/mine/checkoutwithotpforcod

Sample Data

{
"paymentMethod":"cod"
"cartId":195,
"mobile":1234568520,
"otp":1234
}

Demo



Click here to visit frontend.

Click here to visit backend admin panel.

FAQs


Click here to visit FAQs.

Support


Click here to raise a support ticket using your MageDelight account.

Additional Services


Click here to get the customized solution for this extension.



Thank you for choosing MageDelight!



  • No labels