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.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityHow 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.
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>
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>
<referenceBlock name="sale.reorder.sidebar" remove="true"/>
is needed.
Refer below steps to enable or disable customer reorder in Magento 2
Stores
. In the Settings
section, select Configuration
.Sales
under Sales
in the panel on the leftReorder
sectionAllow Reorder
field, select Yes to allow reorders and select No to disable reorders.Save
.