0

How to remove compared product and recently orderd section from my account sidebar as shown below enter image description here

1

remove attribute Allows to remove or cancel the removal of the element. When a container is removed, its child elements are removed as well. For more info

You can find compare block code in below path. vendor/module-catalog/view/frontend/layout/default.xml

And for recently orderd block comes from below path. vendor/module-slaes/view/frontend/layout/default.xml

Add below code to your theme or module di.xml file inside <body></body> tag.

<referenceBlock name="catalog.compare.sidebar" remove="true"/>
<referenceBlock name="sale.reorder.sidebar" remove="true"/>

Don't forgot to flush cache.

You can also remove the whole Addition info side bar by using <referenceContainer name="sidebar.additional" remove="true">

| improve this answer | |
0

You can remove these blocks using the remove tag in the below file.

/app/design/frontend/[Theme_Vendor]/[Theme]/Magento_Theme/layout/default.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="catalog.compare.sidebar" remove="true"/> 
        <referenceBlock name="sale.reorder.sidebar" remove="true"/>
    </body>
</page>
| improve this answer | |
0

just override the default.xml

from  =>  vendor/module-catalog/view/frontend/layout/default.xml 

to your theme =>  app/design/frontend/your/theme/Magento_Catalog/layout/default.xml

Then add the below code:

  <body>
        <referenceContainer name="sidebar.additional">
             <referenceBlock name="catalog.compare.sidebar" remove="true"/>
             <referenceBlock name="wishlist_sidebar" remove="true"/>
             <referenceBlock name="multiple-wishlist_sidebar" remove="true" />           
             <referenceBlock name="sale.reorder.sidebar" remove="true"/>
         </referenceContainer>
    </body>

OR remove all section:

<referenceContainer name="sidebar.additional" remove="true">
| improve this answer | |

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.