cancel
Showing results for 
Search instead for 
Did you mean: 

checkout_index_index.xml - Set Shipping Address Fields

checkout_index_index.xml - Set Shipping Address Fields

I am at my wit's end. I have looks at a hundred forum posts and nothing I do seems to make any changes.

 

What I need to do is fill in the information for the shipping addresses when the custom goes to check out. It will be different for each store so I'm trying to do it on a per template basis. I know I need to modify checkout_index_index.xml, put when i try it doesn't seem to make any difference.

 

Can someone give me a complete code of what the checkout_index_index.xml is supposed to look like and where it's supposed to go?

 

I am using Magento 2.3.1. I've tried creating a checkout_index_index.xml file in:

app/design/frontend/Pearl/weltpixel_custom_xxx which is a subtheme of app/design/frontend/Pearl/weltpixel_custom.

 

I have created: 

app/design/frontend/Pearl/weltpixel_custom_xxx/Magento_Checkout/layout/checkout_index_index.xml.

 

I made the changes to it and then did a php bin/magento cache:clean but nothing happens. 

 

 

<?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>
        <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="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="shipping-address-fieldset" xsi:type="array">
                                                            <item name="children" xsi:type="array">
                                                                <item name="company" xsi:type="array">
                                                                    <item name="value" xsi:type="string">McDuck Enterprises</item>
                                                                </item>
                                                            </item>
                                                        </item>
                                                    </item>
                                                </item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>