OTP For Checkout
- So for this navigate to Online Store in your Shopify admin and go to edit code in your current theme.
- Edit header.liquid file in your theme sections.
- Insert the following code on the last line, update the text as needed, and save the file.
<script>
window.smsalert = window.smsalert || {};
window.smsalert.checkout = {
"phone_heading": "Proceed to Checkout with OTP Verification",
"phone_subheading": "This helps us secure your order and keep you informed with order updates.",
"otp_heading": "Proceed to checkout with OTP",
"otp_subheading": "We’ve sent a 4-digit code to your mobile number",
"validate_btn": "Verify & Continue",
"otp_label":"Enter your OTP here"
};
</script>Login With OTP
- So for this navigate to Online Store in your Shopify admin and go to edit code in your current theme.
- Edit main-login.liquid file in your theme sections.
- Insert the following code on the last line, update the text as needed, and save the file.
<script>
window.smsalert = window.smsalert || {};
window.smsalert.login = {
"phone_heading": "Proceed to Login with OTP Verification",
"phone_subheading": "This helps us secure your order and keep you informed with order updates.",
"otp_heading": "Proceed to Login with OTP",
"otp_subheading": "We’ve sent a 4-digit code to your mobile number",
"otp_label":"Enter your OTP here",
"validate_btn": "Verify & Continue",
"pwd_heading":"Enter your OTP here",
"pwd_subheading":"Enter your OTP here",
"pwd_label":"Enter your OTP here",
"conf_pwd_label":"Enter your OTP here",
"pwd_btn":"Enter your OTP here",
};
</script>OTP For Register
- So for this navigate to Online Store in your Shopify admin and go to edit code in your current theme.
- Edit main-register.liquid file in your theme sections.
- Insert the following code on the last line, update the text as needed, and save the file.
<script>
window.smsalert = window.smsalert || {};
window.smsalert.register = {
"modal_heading": "Proceed to Register with OTP Verification",
"otp_label":"Enter your OTP here",
"validate_btn": "Verify & Continue"
};
</script>FAQ’S
What is the purpose of the “Text Translation in Shopify” article?
The article guides users how to customize or translate text strings related to OTP (One Time Password) flows in a Shopify store using SMS Alert—such as changing headings and buttons for checkout, login and registration pages.
Which parts of the Shopify theme does the article instruct to edit?
1. For OTP at checkout: edit header.liquid in the theme’s Sections.
2. For login with OTP: edit main-login.liquid in the theme’s Sections.
3. For registration with OTP: edit main-register.liquid in the theme’s Sections.What code snippet is recommended to insert for customizing the checkout OTP text?
The article provides a You should update the text values as needed.
How can the login-with-OTP text be customized?
You insert a similar You modify the text values ("modal_heading", etc.) as needed.
When was this article last updated?
The article indicates it was “Last Updated: 3 months ago” as of the time of viewing.
What should I do if I still can’t find the solution I’m looking for?
The article ends by advising you to contact support—there’s a “Still can’t find the solution for your Query?” prompt with a “Contact Support” link.
