0

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" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> 

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?

1 Answer 1

0

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

vendor/magento/module-checkout/view/frontend/page_layout/checkout.xml 

to

<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"/> </container> </referenceContainer> </layout> 

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

6
  • 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. Commented Aug 4, 2017 at 12:41
  • i just overwrite in theme but is not working anyway Commented Aug 4, 2017 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. Commented Aug 4, 2017 at 12:45
  • i copyed the file in my theme but is not working. is working for you? Commented Aug 4, 2017 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 :( Commented Aug 4, 2017 at 13:02

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.