How to Fix “Login with Mobile No.” Button Not Showing in OpenCart

By Admin | Nov 24, 2025
How to Fix “Login with Mobile No.” Button Not Showing in OpenCart

If the “Login with Mobile No.” button is not visible on your OpenCart customer login page, follow the steps below. This guide is written in an easy and direct way.

 

Step 1: Open the Login Page Template File

 

Go to the following file in your theme:

 

catalog > view > theme > YOUR_THEME > template > account > login.twig

 

Why This Issue Happens

The mobile login button depends on two conditions:

  1. SMS sending option must be enabled

  2. Mobile login option must be enabled

Even if these settings are correct, the button will not appear unless the required code is added in the login.twig file.
 So we need to manually place the code in the correct location.

 

 1loginopencart

 

Step 2: Add the Mobile Login Button Code

Find your normal login button code.
 Right after that, paste the code below:

{% if send_sms_status == 1 and login_with_mobile == 1 %}

<button type="button" id="pts-mobile-no-otp" class="btn btn-primary"

onclick="showMobileNoBox();">{{ entry_login_with_phone_no }}</button>

{% endif %}


2opencartlogin


Step 3: Clear Modifications & Refresh Theme Cache

After adding the code, OpenCart still won’t show the new button unless the cache is refreshed.

Follow these steps:

  1. Go to Admin → Extensions → Modifications

  2. Click Refresh (blue button on the top-right)

  3. Now go to Dashboard → Gear Icon (top-right)

  4. Click Clear Theme Cache

  5. Click Clear SASS Cache (if visible)

This ensures your updated login.twig file is properly loaded.


Step 4: Verify SMS & Mobile Login Settings

Many store owners forget to enable the correct settings.
Make sure both options below are ON:

  1. Send SMS Status → Enabled

  2. Login with Mobile No. → Enabled

You will find these settings inside your extension/module that handles OTP login.

If any one of them is disabled, the button will not display—even if your code is correct.


Step 5: Test the Login Page

Once everything is enabled:

  • Open your website in Incognito Mode

  • Go to the Customer Login page

  • Check if the “Login with Mobile No.” button appears

If it appears, your OTP login is working.

3opencartloginotp

My Cart Cart Page

We may use cookies or any other tracking technologies when you visit our website, including any other media form, mobile website, or mobile application related or connected to help customize the Site and improve your experience. Read Full Cookies