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:
    Webkul\Test\view\frontend\layout\checkout_index_index.xml

    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 🙂

    . . .

    Comment

    Add Your Comment

    Be the first to comment.

    Back to Top
    css.php
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just received your message and our expert will get back to you shortly.
    Send Again
    Close