Hi,
we're updating Magento to the latest version from 2.4.2.
We have a problem with the checkout page. With this update it has removed the search bar, cart link and account links from our child-theme.
We've checked our site using Luma, and see that the new version has only the logo and a text link "Sign-in"
We're trying to add our custom account button in the Magento_Checkout checkout_index_index-xml file which we put in the Magento_Theme default layout like this:
<referenceContainer name="header-wrapper"> <block class="Magento\Framework\View\Element\Template" name="header.account" template="Magento_Theme::header-account.phtml" after="top.search"/> </referenceContainer>
This works everywhere except on the checkout page.
We've tried creating a test block to position it in the header-wrapper container, but nothing ever appears. After playing around with the code it seems that perhaps on the checkout page "header-wrapper" no longer exists.
How to we position our account links in the checkout header? I can't find any reference to understand the structure of the checkout page and using template path hints isn't helping us.
Hello @SteveMacTV
you can try.
First, go to Magento_Checkout in your theme folder app/design/frontend/package_name/theme_name/Magento_Checkout
Now create the below folder structure in the layout folder on the above path. override/theme/Magento/blank/checkout_index_index.xml
in this checkout_index_index.xml file add the below code.
<?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> <move element="logo" destination="header-wrapper" before="-" /> <referenceBlock name="minicart" remove="false" /> <referenceContainer name="header.panel" remove="false" /> <referenceBlock name="top.search" remove="false" /> <referenceBlock name="catalog.compare.link" remove="false" /> <referenceBlock name="catalog.topnav" remove="false"/> <referenceContainer name="footer-container" remove="false"/> </body> </page>
------------------------------------------------
If you've found one of my answers helpful, please give "Kudos" or "Accept as Solution"
Thanks for this, I wasn't aware that you can create an override file within your own theme. is this new?
Anyway, this generates an error:
Overriding view file '/home/xx.xxx.com/xxxxx/public_html/app/design/frontend/Vendor/Theme/Magento_Checkout/layout/override/theme/Magento/blank/checkout_index_index.xml' does not match to any of the files.
You're facing layout changes on Magento's checkout page in v.2.4.6-p1: