1

I want to change following text in checkout page

You can create an account after checkout.

Actually this line is coming from following file.

app/code/Magento/Checkout/view/frontend/web/template/form/element/email.html

Can you any one give approach to override?

  • Where do you need to override file: in theme or custom module? – KAndy Dec 4 '15 at 7:31
  • in custom module.also if email is not existed only. – Sivakumar K Dec 4 '15 at 7:32
1

You need create [Vendor]/[ModuleName]/view/frontend/layout/checkout_index_index.xml file with content

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <block class="Magento\Checkout\Block\Onepage" 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="steps" xsi:type="array">
                                        <item name="children" xsi:type="array">
                                            <item name="shipping-step" xsi:type="array">
                                                <item name="children" xsi:type="array">
                                                    <item name="shippingAddress" xsi:type="array">
                                                        <item name="children" xsi:type="array">
                                                            <item name="customer-email" xsi:type="array">
                                                                <item name="component" xsi:type="string">
                                                                    Magento_Checkout/js/view/form/element/email <!--  <- you can change component here -->
                                                                </item>
                                                                <item name="tooltip" xsi:type="array">
                                                                    <item name="description" xsi:type="string"
                                                                          translate="true"><!--  <- you can change text here -->
                                                                        We'll send your order
                                                                        confirmation here or you custom text.
                                                                    </item>
                                                                </item>
                                                            </item>
                                                        </item>
                                                    </item>
                                                </item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </argument>
                </arguments>
            </block>
        </referenceContainer>
    </body>
</page>
  • getting blank page after adding this xml. – Sivakumar K Dec 4 '15 at 7:59
  • in log: Please correct the XML data and try again. [] [] – Sivakumar K Dec 4 '15 at 8:01

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.