How to change checkout page field label in 2.1.7? Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?How do you edit checkout field labels in Magento 2?Change ZIP to POSTCODE in Estimate ShippingHow to chage the label of region_id field in checkout formHow to hide or remove state/province field from billing pageHow to modify a label to a field in checkout page?How to edit and change checkout field labels in Magento 2?Change Payment Method Label for imageHow to change field order in checkout and change label namesHow can I edit menu Label (Description) in Magento-2?Change header label “sign in” to “log in” in magento 2Magento 2 Changing checkout page shipping state field as dropdwn
Kepler's 3rd law: ratios don't fit data
Who can become a wight?
Why doesn't the university give past final exams' answers?
How to mute a string and play another at the same time
Proving inequality for positive definite matrix
What were wait-states, and why was it only an issue for PCs?
Where is Bhagavad Gita referred to as Hari Gita?
What's the difference between using dependency injection with a container and using a service locator?
What is the ongoing value of the Kanban board to the developers as opposed to management
What helicopter has the most rotor blades?
Putting Ant-Man on house arrest
Assertions In A Mock Callout Test
Why not use the yoke to control yaw, as well as pitch and roll?
Why aren't these two solutions equivalent? Combinatorics problem
Should man-made satellites feature an intelligent inverted "cow catcher"?
A journey... into the MIND
How to make an animal which can only breed for a certain number of generations?
How to leave only the following strings?
Providing direct feedback to a product salesperson
When speaking, how do you change your mind mid-sentence?
Can a Knight grant Knighthood to another?
Lights are flickering on and off after accidentally bumping into light switch
What is the evidence that custom checks in Northern Ireland are going to result in violence?
false 'Security alert' from Google - every login generates mails from 'no-reply@accounts.google.com'
How to change checkout page field label in 2.1.7?
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?How do you edit checkout field labels in Magento 2?Change ZIP to POSTCODE in Estimate ShippingHow to chage the label of region_id field in checkout formHow to hide or remove state/province field from billing pageHow to modify a label to a field in checkout page?How to edit and change checkout field labels in Magento 2?Change Payment Method Label for imageHow to change field order in checkout and change label namesHow can I edit menu Label (Description) in Magento-2?Change header label “sign in” to “log in” in magento 2Magento 2 Changing checkout page shipping state field as dropdwn
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I want to change State/Province label. How can I do it?
magento-2.1 shipping onepage-checkout payment-methods
add a comment |
I want to change State/Province label. How can I do it?
magento-2.1 shipping onepage-checkout payment-methods
add a comment |
I want to change State/Province label. How can I do it?
magento-2.1 shipping onepage-checkout payment-methods
I want to change State/Province label. How can I do it?
magento-2.1 shipping onepage-checkout payment-methods
magento-2.1 shipping onepage-checkout payment-methods
edited Jun 26 '17 at 9:18
Mohit Kumar Arora
6,89851634
6,89851634
asked Jun 26 '17 at 8:26
bhautikbhautik
112
112
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Hope it's helpful
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="MagentoCheckoutBlockCheckoutLayoutProcessor">
<plugin name="Custom_Checkout" type="AmeexFasBlockLayoutProcessor" sortOrder="100"/>
</type>
</config>
Step 2:
LayoutProcessor.php
path:app/code/vendor/module_name/Block/
public function afterProcess(
MagentoCheckoutBlockCheckoutLayoutProcessor $subject,
array $jsLayout
)
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
['children']['shippingAddress']['children']['shipping-address-fieldset']['children']['lastname']['label'] = __('Recipient lastname');
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
['children']['shippingAddress']['children']['shipping-address-fieldset']['children']['region_id']['label'] = __('Division');
return $jsLayout;
}
It's work like charm
add a comment |
According to this topic How do you edit checkout field labels in Magento 2? (sorry, wouldn't let me post as comment)
Translation for State/Province and Zip/Postal Code is found (by
default) in /vendor/magento/module-checkout/i18n directory.
You can copy locale's csv file from
/vendor/magento/module-checkout/i18n folder to
app/code/Magento/module-checkout/i18n directory.
Then find the text and change its translation.
After saving file, don't forget to remove content from /var/cache
folder and /var/page_cache folder.
add a comment |
You can overwrite below function for changing the Label at cart page in the file: vendor/magento/module-checkout/Block/Cart/LayoutProcessor.php
public function process($jsLayout)
$elements = [
'city' => [
'visible' => $this->isCityActive(),
'formElement' => 'input',
'label' => __('City'),
'value' => null
],
'country_id' => [
'visible' => true,
'formElement' => 'select',
'label' => __('Country'),
'options' => [],
'value' => null
],
'region_id' => [
'visible' => true,
'formElement' => 'select',
'label' => __('State/Province'),
'options' => [],
'value' => null
],
'postcode' => [
'visible' => true,
'formElement' => 'input',
'label' => __('Zip/Postal Code'),
'value' => null
]
];
if (!isset($jsLayout['components']['checkoutProvider']['dictionaries']))
$jsLayout['components']['checkoutProvider']['dictionaries'] = [
'country_id' => $this->countryCollection->loadByStore()->toOptionArray(),
'region_id' => $this->regionCollection->addAllowedCountriesFilter()->toOptionArray(),
];
if (isset($jsLayout['components']['block-summary']['children']['block-shipping']['children']
['address-fieldsets']['children'])
)
$fieldSetPointer = &$jsLayout['components']['block-summary']['children']['block-shipping']
['children']['address-fieldsets']['children'];
$fieldSetPointer = $this->merger->merge($elements, 'checkoutProvider', 'shippingAddress', $fieldSetPointer);
$fieldSetPointer['region_id']['config']['skipValidation'] = true;
return $jsLayout;
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f180680%2fhow-to-change-checkout-page-field-label-in-2-1-7%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Hope it's helpful
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="MagentoCheckoutBlockCheckoutLayoutProcessor">
<plugin name="Custom_Checkout" type="AmeexFasBlockLayoutProcessor" sortOrder="100"/>
</type>
</config>
Step 2:
LayoutProcessor.php
path:app/code/vendor/module_name/Block/
public function afterProcess(
MagentoCheckoutBlockCheckoutLayoutProcessor $subject,
array $jsLayout
)
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
['children']['shippingAddress']['children']['shipping-address-fieldset']['children']['lastname']['label'] = __('Recipient lastname');
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
['children']['shippingAddress']['children']['shipping-address-fieldset']['children']['region_id']['label'] = __('Division');
return $jsLayout;
}
It's work like charm
add a comment |
Hope it's helpful
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="MagentoCheckoutBlockCheckoutLayoutProcessor">
<plugin name="Custom_Checkout" type="AmeexFasBlockLayoutProcessor" sortOrder="100"/>
</type>
</config>
Step 2:
LayoutProcessor.php
path:app/code/vendor/module_name/Block/
public function afterProcess(
MagentoCheckoutBlockCheckoutLayoutProcessor $subject,
array $jsLayout
)
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
['children']['shippingAddress']['children']['shipping-address-fieldset']['children']['lastname']['label'] = __('Recipient lastname');
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
['children']['shippingAddress']['children']['shipping-address-fieldset']['children']['region_id']['label'] = __('Division');
return $jsLayout;
}
It's work like charm
add a comment |
Hope it's helpful
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="MagentoCheckoutBlockCheckoutLayoutProcessor">
<plugin name="Custom_Checkout" type="AmeexFasBlockLayoutProcessor" sortOrder="100"/>
</type>
</config>
Step 2:
LayoutProcessor.php
path:app/code/vendor/module_name/Block/
public function afterProcess(
MagentoCheckoutBlockCheckoutLayoutProcessor $subject,
array $jsLayout
)
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
['children']['shippingAddress']['children']['shipping-address-fieldset']['children']['lastname']['label'] = __('Recipient lastname');
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
['children']['shippingAddress']['children']['shipping-address-fieldset']['children']['region_id']['label'] = __('Division');
return $jsLayout;
}
It's work like charm
Hope it's helpful
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="MagentoCheckoutBlockCheckoutLayoutProcessor">
<plugin name="Custom_Checkout" type="AmeexFasBlockLayoutProcessor" sortOrder="100"/>
</type>
</config>
Step 2:
LayoutProcessor.php
path:app/code/vendor/module_name/Block/
public function afterProcess(
MagentoCheckoutBlockCheckoutLayoutProcessor $subject,
array $jsLayout
)
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
['children']['shippingAddress']['children']['shipping-address-fieldset']['children']['lastname']['label'] = __('Recipient lastname');
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
['children']['shippingAddress']['children']['shipping-address-fieldset']['children']['region_id']['label'] = __('Division');
return $jsLayout;
}
It's work like charm
edited 2 days ago
answered Mar 6 at 15:19
ARUNPRABAKARAN MARUNPRABAKARAN M
536114
536114
add a comment |
add a comment |
According to this topic How do you edit checkout field labels in Magento 2? (sorry, wouldn't let me post as comment)
Translation for State/Province and Zip/Postal Code is found (by
default) in /vendor/magento/module-checkout/i18n directory.
You can copy locale's csv file from
/vendor/magento/module-checkout/i18n folder to
app/code/Magento/module-checkout/i18n directory.
Then find the text and change its translation.
After saving file, don't forget to remove content from /var/cache
folder and /var/page_cache folder.
add a comment |
According to this topic How do you edit checkout field labels in Magento 2? (sorry, wouldn't let me post as comment)
Translation for State/Province and Zip/Postal Code is found (by
default) in /vendor/magento/module-checkout/i18n directory.
You can copy locale's csv file from
/vendor/magento/module-checkout/i18n folder to
app/code/Magento/module-checkout/i18n directory.
Then find the text and change its translation.
After saving file, don't forget to remove content from /var/cache
folder and /var/page_cache folder.
add a comment |
According to this topic How do you edit checkout field labels in Magento 2? (sorry, wouldn't let me post as comment)
Translation for State/Province and Zip/Postal Code is found (by
default) in /vendor/magento/module-checkout/i18n directory.
You can copy locale's csv file from
/vendor/magento/module-checkout/i18n folder to
app/code/Magento/module-checkout/i18n directory.
Then find the text and change its translation.
After saving file, don't forget to remove content from /var/cache
folder and /var/page_cache folder.
According to this topic How do you edit checkout field labels in Magento 2? (sorry, wouldn't let me post as comment)
Translation for State/Province and Zip/Postal Code is found (by
default) in /vendor/magento/module-checkout/i18n directory.
You can copy locale's csv file from
/vendor/magento/module-checkout/i18n folder to
app/code/Magento/module-checkout/i18n directory.
Then find the text and change its translation.
After saving file, don't forget to remove content from /var/cache
folder and /var/page_cache folder.
answered Jun 26 '17 at 8:31
codestrcodestr
188117
188117
add a comment |
add a comment |
You can overwrite below function for changing the Label at cart page in the file: vendor/magento/module-checkout/Block/Cart/LayoutProcessor.php
public function process($jsLayout)
$elements = [
'city' => [
'visible' => $this->isCityActive(),
'formElement' => 'input',
'label' => __('City'),
'value' => null
],
'country_id' => [
'visible' => true,
'formElement' => 'select',
'label' => __('Country'),
'options' => [],
'value' => null
],
'region_id' => [
'visible' => true,
'formElement' => 'select',
'label' => __('State/Province'),
'options' => [],
'value' => null
],
'postcode' => [
'visible' => true,
'formElement' => 'input',
'label' => __('Zip/Postal Code'),
'value' => null
]
];
if (!isset($jsLayout['components']['checkoutProvider']['dictionaries']))
$jsLayout['components']['checkoutProvider']['dictionaries'] = [
'country_id' => $this->countryCollection->loadByStore()->toOptionArray(),
'region_id' => $this->regionCollection->addAllowedCountriesFilter()->toOptionArray(),
];
if (isset($jsLayout['components']['block-summary']['children']['block-shipping']['children']
['address-fieldsets']['children'])
)
$fieldSetPointer = &$jsLayout['components']['block-summary']['children']['block-shipping']
['children']['address-fieldsets']['children'];
$fieldSetPointer = $this->merger->merge($elements, 'checkoutProvider', 'shippingAddress', $fieldSetPointer);
$fieldSetPointer['region_id']['config']['skipValidation'] = true;
return $jsLayout;
add a comment |
You can overwrite below function for changing the Label at cart page in the file: vendor/magento/module-checkout/Block/Cart/LayoutProcessor.php
public function process($jsLayout)
$elements = [
'city' => [
'visible' => $this->isCityActive(),
'formElement' => 'input',
'label' => __('City'),
'value' => null
],
'country_id' => [
'visible' => true,
'formElement' => 'select',
'label' => __('Country'),
'options' => [],
'value' => null
],
'region_id' => [
'visible' => true,
'formElement' => 'select',
'label' => __('State/Province'),
'options' => [],
'value' => null
],
'postcode' => [
'visible' => true,
'formElement' => 'input',
'label' => __('Zip/Postal Code'),
'value' => null
]
];
if (!isset($jsLayout['components']['checkoutProvider']['dictionaries']))
$jsLayout['components']['checkoutProvider']['dictionaries'] = [
'country_id' => $this->countryCollection->loadByStore()->toOptionArray(),
'region_id' => $this->regionCollection->addAllowedCountriesFilter()->toOptionArray(),
];
if (isset($jsLayout['components']['block-summary']['children']['block-shipping']['children']
['address-fieldsets']['children'])
)
$fieldSetPointer = &$jsLayout['components']['block-summary']['children']['block-shipping']
['children']['address-fieldsets']['children'];
$fieldSetPointer = $this->merger->merge($elements, 'checkoutProvider', 'shippingAddress', $fieldSetPointer);
$fieldSetPointer['region_id']['config']['skipValidation'] = true;
return $jsLayout;
add a comment |
You can overwrite below function for changing the Label at cart page in the file: vendor/magento/module-checkout/Block/Cart/LayoutProcessor.php
public function process($jsLayout)
$elements = [
'city' => [
'visible' => $this->isCityActive(),
'formElement' => 'input',
'label' => __('City'),
'value' => null
],
'country_id' => [
'visible' => true,
'formElement' => 'select',
'label' => __('Country'),
'options' => [],
'value' => null
],
'region_id' => [
'visible' => true,
'formElement' => 'select',
'label' => __('State/Province'),
'options' => [],
'value' => null
],
'postcode' => [
'visible' => true,
'formElement' => 'input',
'label' => __('Zip/Postal Code'),
'value' => null
]
];
if (!isset($jsLayout['components']['checkoutProvider']['dictionaries']))
$jsLayout['components']['checkoutProvider']['dictionaries'] = [
'country_id' => $this->countryCollection->loadByStore()->toOptionArray(),
'region_id' => $this->regionCollection->addAllowedCountriesFilter()->toOptionArray(),
];
if (isset($jsLayout['components']['block-summary']['children']['block-shipping']['children']
['address-fieldsets']['children'])
)
$fieldSetPointer = &$jsLayout['components']['block-summary']['children']['block-shipping']
['children']['address-fieldsets']['children'];
$fieldSetPointer = $this->merger->merge($elements, 'checkoutProvider', 'shippingAddress', $fieldSetPointer);
$fieldSetPointer['region_id']['config']['skipValidation'] = true;
return $jsLayout;
You can overwrite below function for changing the Label at cart page in the file: vendor/magento/module-checkout/Block/Cart/LayoutProcessor.php
public function process($jsLayout)
$elements = [
'city' => [
'visible' => $this->isCityActive(),
'formElement' => 'input',
'label' => __('City'),
'value' => null
],
'country_id' => [
'visible' => true,
'formElement' => 'select',
'label' => __('Country'),
'options' => [],
'value' => null
],
'region_id' => [
'visible' => true,
'formElement' => 'select',
'label' => __('State/Province'),
'options' => [],
'value' => null
],
'postcode' => [
'visible' => true,
'formElement' => 'input',
'label' => __('Zip/Postal Code'),
'value' => null
]
];
if (!isset($jsLayout['components']['checkoutProvider']['dictionaries']))
$jsLayout['components']['checkoutProvider']['dictionaries'] = [
'country_id' => $this->countryCollection->loadByStore()->toOptionArray(),
'region_id' => $this->regionCollection->addAllowedCountriesFilter()->toOptionArray(),
];
if (isset($jsLayout['components']['block-summary']['children']['block-shipping']['children']
['address-fieldsets']['children'])
)
$fieldSetPointer = &$jsLayout['components']['block-summary']['children']['block-shipping']
['children']['address-fieldsets']['children'];
$fieldSetPointer = $this->merger->merge($elements, 'checkoutProvider', 'shippingAddress', $fieldSetPointer);
$fieldSetPointer['region_id']['config']['skipValidation'] = true;
return $jsLayout;
answered Dec 9 '18 at 6:06
surbhi agrsurbhi agr
40611
40611
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f180680%2fhow-to-change-checkout-page-field-label-in-2-1-7%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown