1

I want to rename label (Shipping to delivery) only in order summary in Checkout page in magennto2.1.7 ?

Refer screenshot.

enter image description here

1
  • Check my answer. Its a working code. Nov 28 '18 at 11:57
0

You can do it by following method: Create a file with name checkout_index_index.xml under

app/design/frontend/Vendor/theme/Magento_Checkout/layout/checkout_index_index.xml

and add the below code:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="checkout" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.root">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="checkout" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="sidebar" xsi:type="array">
                                    <item name="children" xsi:type="array">
                                        <item name="summary" xsi:type="array">
                                            <item name="children" xsi:type="array">
                                                <item name="totals" xsi:type="array">
                                                    <item name="children" xsi:type="array">
                                                        <item name="shipping" xsi:type="array">
                                                            <item name="config" xsi:type="array">
                                                                <item name="title" xsi:type="string" translate="true">Delivery</item>
                                                            </item>
                                                        </item>
                                                    </item>
                                                </item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

Thats it! Above code will only execute in checkout. Need to flush the cache and test.

Don't translate it through csv file as Shipping text might be used in different places in checkout, cart etc.

3
  • Thanks friend, its working fine. great work:)
    – Amy
    Nov 28 '18 at 13:09
  • Welcome. Happy Coding! You can also do upvote for the answers which is working. Nov 28 '18 at 13:10
  • @SukumarGorai, is there a way to apply this to the shipping label only if the shipping country is Canada? Jul 30 '21 at 6:55
0

Try to edit below file(en_US.csv) or create new file(en_US.csv) if not exist app/design/frontend/Custom/default/i18n/en_US.csv OR into app/design/frontend/Custom/Magento_Checkout/i18n/en_US.csv

like "Shipping","Delivery"

run this commands after your change php bin/magento cache:clean && php bin/magento cache:flush

2
  • Hi, does it change only for Order summary in checkout page.
    – Amy
    Nov 28 '18 at 11:20
  • change into app/design/frontend/Custom/Magento_Checkout/i18n/en_US.csv file for only checkout
    – Hitesh
    Nov 28 '18 at 11:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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