Hi all,
I've hit a roadblock here, for some reason my mini cart is not loading properly to the right side of the search bar like this image shows on our live website:
https://i.imgur.com/qTY3vHQ.png
on the development site it looks like this
https://i.imgur.com/AFB9FK2.png
I have had a look through the XML and CSS files to see if the names of anything has changed and played around for a while, but I can't get it to work.
In my custom theme default.xml:
CustomTheme\Theme\Magento_Theme\layout\default.xml
I have the following code:
<?xml version="1.0"?> <!-- /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ --> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="footer"> <block class="Magento\Cms\Block\Block" name="footer_social_links_block"> <arguments> <argument name="block_id" xsi:type="string">kids_footer_social_links</argument> </arguments> </block> </referenceBlock> <referenceContainer name="footer"> <block class="Magento\Cms\Block\Block" name="footer_menu"> <arguments> <argument name="block_id" xsi:type="string">footer_menu</argument> </arguments> </block> </referenceContainer> <referenceBlock name="customer-account-navigation-newsletter-subscriptions-link" remove="true"/> <referenceBlock name="customer-account-navigation-billing-agreements-link" remove="true"/> <referenceBlock name="footer_links" remove="true" /> <referenceBlock name="form.subscribe" remove="true" /> <referenceBlock name="footer_social_links_block" remove="true" /> <move element="minicart" destination="header-wrapper" after="top.search" /> </body> </page>
Everything is working, except the part that moves the cart:
<move element="minicart" destination="header-wrapper" after="top.search" />
Any idea why this might be? I have no "major" customizations, I'm inheriting from Luma with minor styling changes.
You need to move them to header panel, Use the below code:
<move element="top.search" destination="header.panel" /> <move element="minicart" destination="header.panel" />
Thank you, I will try it when I get the chance and let you know / accept solution if correct
Okay @callam_kidsaw
Hi,
I tried your method, but it is not what I want, sorry.
I need it to look like this image:
@callam_kidsaw wrote:Hi,
I tried your method, but it is not what I want, sorry.
I need it to look like this image:
https://i.imgur.com/qTY3vHQ.png best automatic
this is not working, i also wanna do the same!