Menu Close
    Hire us Request quote Reading list Switch to dark mode

    Remove layout added by js layout in magento2

    In magento2, layout on some pages are added by js layout by using ui-components.

    So, if you want to remove an component added by js layout then you can use given process:

    you need to add these lines in your layout file:

    This code is written under the component which you want to remove and at the same nesting level.

    for example: Given example is to remove discount block from checkout page.

    firstly, i have created checkout_index_index.xml file at path:

    . . .
    Subscribe Articles

    Just enter your email below to subscribe and receive weekly updates about the most interesting similar articles.

    You need to accept conditions to receive letters.
    You've Subscribed!

    Share article via

    . . .

    Now add the following code:

    Here, componentDisabled with true value disables the respective component.

    After this code, discount code component get disabled from checkout page.

    Hope, this blog will helps you in implementation.

    Thank you 🙂

    . . .


    Add Your Comment

    Be the first to comment.

    Back to Top
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just recieved your project brief and our expert will contact you shortly.
    Send Again