cancel
Showing results for 
Search instead for 
Did you mean: 

Change name/title of text field on checkout

Change name/title of text field on checkout

Hi,
Our checkout page has the option to add a fax number but we find that people leave it blank.
I want to ustalise this field to allow our customers to provide us with their own business order reference/number so that they further traceability of it on their end.

 

Is there any way to edit the name/title of this field?

 

fax.PNG

3 REPLIES 3

Re: Change name/title of text field on checkout

Hello @lewis_john,

 

I couldn't able to see your image. can you share it again?

 

 

 

 

Best regards
Madhuresan
Bootsgrid

Re: Change name/title of text field on checkout


@madhuresan_ramanan wrote:

Hello @lewis_john,

 

I couldn't able to see your image. can you share it again?

 

 

 

 

Best regards
Madhuresan
Bootsgrid


Hi,
The image if just of the text fields available at the checkout stage. 

Re: Change name/title of text field on checkout

 

Way 1 : If you want to change the shipping address fields as well as billing address fields, You can do via theme transaction if you have made a custom theme as per your language.

i.e: en_US

Way 2: If you change made in shipping address fields only, Please override LayoutProcessor.php

Step 1 di.xml

path: app/code/vendor/module_name/etc

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Checkout\Block\Checkout\LayoutProcessor">
<plugin name="Custom_Checkout" type="vendor\Module\Block\LayoutProcessor" sortOrder="100"/>
</type>
</config>

Step 2: LayoutProcessor.php

path:app/code/vendor/module_name/Block/

public function afterProcess(
\Magento\Checkout\Block\Checkout\LayoutProcessor $subject,
array $jsLayout
) {
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
['children']['shippingAddress']['children']['shipping-address-fieldset']['children']['fax']['label'] = __('Business order reference ');

return $jsLayout;
}
}