I want to change the position of the mini cart in my theme. i am able to change it using css but it disturbs the mobile view. So is there any way i can do it using xmlenter image description here

  • you can change it via layout files. – Pramod Kharade Nov 15 '17 at 3:06

you can change in layout file and interchange the position by using tag:

<move element="minicart" destination="header.container" before="-" />

Please, refer official link for more clarity : http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/layouts/layout-types.html


Just you need to put the bellow code to your theme default.xml file

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

    <move element="minicart" destination="header.panel" after="top.search" />


This your file path


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.