Magento 2 – Override Onepage Checkout Page Layout

layoutmagento2onepage-checkout

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="checkout" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

This is the layout defined for checkout (layout="checkout"), I want to override this to 1column, however playing a checkout_index_index.xml file in my theme's Magento_Checkout override directory replaces the entire layout and leaves me with a blank page, whereas a checkout_index_index.xml file in a custom module has no effect.

Is this a load order problem or am I making a beginner mistake?

Best Answer

You seem to misunderstand what is meant by Override, override will completely ignore the base file so only your file will be read. This is why the code from the original file is not being rendered.

To make your change on top of the existing code you want to extend the file.

Instructions for extending can be found here.

<module_dir>
 |__/view
   |__/frontend
     |__/layout
       |--<layout1>.xml
       |--<layout2>.xml