5

How can i disable Recently order or Reorder block in magento 2?

In css i can hide the block "block block-reorder" by display:none;

But I want to fully disable it.

3

3 Answers 3

26

Create default.xml in your module or theme's view/layout folder and paste the below code.

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="sale.reorder.sidebar" remove="true"/>
    </body>
</page>
1
  • Worked perfectly. After making the change, you need to clear the layout cache and page cache.
    – jdhildeb
    Commented Oct 23, 2019 at 21:13
3

You can create new deafult.xml in your custom module and write below code to remove recent order block from Left sidebar

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="../../../../../../../../htdocs/lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <body>
     <referenceContainer name="sidebar.additional">
         <referenceBlock name="sale.reorder.sidebar" remove="true"/>
     </referenceContainer>
    </body>
</page>
1
  • 2
    Actually only <referenceBlock name="sale.reorder.sidebar" remove="true"/>is needed.
    – pinicio
    Commented Mar 12, 2018 at 17:31
2

Refer below steps to enable or disable customer reorder in Magento 2

  • On the Admin panel, click Stores. In the Settings section, select Configuration.
  • Select Sales under Sales in the panel on the left
  • Open the Reorder section
  • In the Allow Reorder field, select Yes to allow reorders and select No to disable reorders.
  • When complete, click Save.
3
  • 1
    This had no effect for me on Magento 2.2.9. I changed the setting to "No" but the re-order sidebar block did not go away.
    – jdhildeb
    Commented Oct 23, 2019 at 21:11
  • @jdhildeb I don't have Magento 2.2.9 installed, I have checked in 2.3.2 it's working. Commented Oct 24, 2019 at 4:46
  • I have also 2.3.2 but it not working... Commented Mar 20, 2020 at 9:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.