I try to make the checkout page 2columns-leftlayout, but i can't.

If i add this code in checkout_index_index.xml

 <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

the page is not loading

by default this layout is like this:

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

so if i change layout="checkout" to layout="2columns-left" the page is not loading

I sucesfull changed the checkout cart page in this way and is working, but not for checkout page.'

Does anyone know how to change checkout page to 2columns-left layout?


To change the checkout page to 2columns-leftlayout, just change the file



<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
    <update handle="2columns-left"/>
    <referenceContainer name="page.wrapper">
        <container name="checkout.header.container" as="checkout_header_container" label="Checkout Page Header Container" htmlTag="header" htmlClass="page-header" before="main.content">
            <container name="checkout.header.wrapper" label="Checkout Page Header" as="checkout_header_wrapper" htmlTag="div" htmlClass="header content"/>

NOTE : css changes are need afterwards to style the checkout page.

| improve this answer | |
  • I advise against editing the file mentioned, you should extend this file and make your changes in your theme/module. Do not edit the core files (files inside the vendor directory) as you will likely lose your changes. – Ben Crook Aug 4 '17 at 12:41
  • i just overwrite in theme but is not working anyway – Alin Lupoiu Aug 4 '17 at 12:44
  • Yes sure..do not change directly the core. file. I supposed i didn't have to mention that. You have to copy that file under your theme folder and do the changes. I just tried it changing the core file for quick testing and worked fine for me. – Nikolas Aug 4 '17 at 12:45
  • i copyed the file in my theme but is not working. is working for you? – Alin Lupoiu Aug 4 '17 at 12:47
  • 1
    @NikoK You'll be surprised at the number of people who still edit the core, I've seen answers accepted that were advising to edit the core :( – Ben Crook Aug 4 '17 at 13:02

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.