cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to Modify Text on Guest Checkout

Unable to Modify Text on Guest Checkout

Hi,

This is really a weird one.

 

When you checkout as a guest the first form that appears for the Shipping Address has a text saying:
"You can create an account after checkout."
The page is  https://<your-domain>/checkout/#shipping

Magento-Guest-Checkout.png

 

To modify the text I have:

- copied the file from
vendor/magento/module_checkout/ view/frontend/web/template/form/element/email.html
into
app/design/frontend/<myVendor>/<myTheme>/Magento_Checkout/web/template/form/element/email.html

- changed the text in it (see the part with "This is a test...")

 

...
...
<form class="form form-login" data-role="email-with-possible-login"
      data-bind="submit:login"
      method="post">
    <fieldset id="customer-email-fieldset" class="fieldset" data-bind="blockLoader: isLoading">
        <div class="field required">
            <label class="label" for="customer-email"><span data-bind="i18n: 'Email Address'"></span></label>
            <div class="control _with-tooltip">
                <input class="input-text"
                       type="email"
                       data-bind="
                            textInput: email,
                            hasFocus: emailFocused,
                            afterRender: emailHasChanged,
                            mageInit: {'mage/trim-input':{}}"
                       name="username"
                       data-validate="{required:true, 'validate-email':true}"
                       id="customer-email" />
                <!-- ko template: 'ui/form/element/helper/tooltip' --><!-- /ko -->
                <span class="note" data-bind="fadeVisible: isPasswordVisible() == false">This is a test....</span>
            </div>
        </div>
...
...

 

 

- cleared cache

rm -Rf var/cache/*
rm -Rf pub/static/*
rm -Rf generated/*
bin/magento c:f

 

 

 

Overriding template files is normally not a problem and I have done it a few times.

But here nothing is changing!!??

 

It should be simple so I am not sure what I am doing wrong here.

 

I would really appreciate some help or hints.

 

Thanks so much!

Jerome

2 REPLIES 2

Re: Unable to Modify Text on Guest Checkout

Hello @jeromeclic79eb 

 

You can change this string by csv translation. Kindly follow below steps:
1. Create custom module

   >> app/code/CustomModule/Test/i18n

2. Create csv file as below

>> for english (United state) => en_US.csv

3. Add string you want to change in csv file as below:
>> “<word in english language>”,”<word in language to convert>”

 

Run below commands:

1. bin/magento setup:upgrade
2. bin/magento setup:di:compile
3. bin/magento setup:static-content:deploy 

It may help you.
Thank you

Problem solved? Click Accept as Solution!

Re: Unable to Modify Text on Guest Checkout

Thanks so much Bhanu for your quick reply.

It sounds like a solution what you are suggesting.

I have solved my problem for now using JavaScript but I will try your solution as well later and come back to you with my results.

 

Thanks again.

Jerome