6

I'm using Magento 2 CE Version 2.1.2

I would like to change Shipping Address to Shipping/Billing Address.

enter image description here

I have already below, but it's not working for me.

Magento 2: Sorry, no quotes are available for this order at this time Change Message

This file magento\vendor\magento\module-checkout\view\frontend\web\template\shipping.html takes value from magento\vendor\magento\module-checkout\i18n\en_US.csv

1
  • You can set value inside csv file using theme i18n folder. Commented Dec 12, 2016 at 5:19

2 Answers 2

3

1) The easiest way is that we translate this text on our custom module or theme:

2) We also can override the template: vendor/magento/module-checkout/view/frontend/web/template/shipping.html.

10
  • Hi @Khoa i already tried that things. But it's not working. Need to only deal with en_US.csv. I tried 4-5 ways but not working
    – Jackson
    Commented Dec 12, 2016 at 4:24
  • How you translate? Please update your question. Commented Dec 12, 2016 at 4:25
  • Yes i changed in CSV file Shipping Address, Shipping/Billing Address but it's not working at all. Cleared cache & Also done Static Content deploy & all commands
    – Jackson
    Commented Dec 12, 2016 at 4:26
  • You're clear or disable Browser Cache? Commented Dec 12, 2016 at 5:07
  • 1
    Yes, I think so. However, I think should use translation way. I still debugging. Commented Dec 12, 2016 at 7:40
7

To Change label, You need to copy following file to your theme folder.

<magento root>/vendor/magento/module-checkout/view/frontend/web/js/view/shipping.js 

Now copy this file to following.

 <magento root>/app/design/frontend/`<vendor>`/`<theme>`/Magento_Checkout/web/js/view/shipping.js

Please follow proper directory structure. Now Open shipping.js file and find initialize function near about line no 76.

In that function you need to replace line no 88.

$t('Shipping') to $t('Shipping/Billing Address')

After replacing do not forget to regenerate static content deployment using following command.

php bin/magento setup:static-content:deploy 
6
  • Hi no need to change Shipping, need to change below text Shipping Address
    – Jackson
    Commented Dec 12, 2016 at 4:31
  • For that you need to update en_US.csv file or you can override vendor/magento/module-checkout/view/frontend/web/template/shipping.html same way as above and by copying to theme folder and update label for quick fix. Commented Dec 12, 2016 at 4:37
  • Can't do without JS? & only using en_US.csv?
    – Jackson
    Commented Dec 12, 2016 at 7:24
  • So this will be path for magento\app\design\frontend\Custom\MyTheme\Magento_Checkout\web\template\shipping.html ?
    – Jackson
    Commented Dec 12, 2016 at 7:31
  • Yes you need to change in that file and after that redeploy content. But first delete same file from pub/static/frontend/vendor/theme/Magento_Checkout/template/shipping.html Commented Dec 12, 2016 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.