I am using Marketplace extension. If any user is registered as seller in the website then there two order history links are showing in customer dashboard (Seller dashboard or My account section).

One Order History for seller and another for normal customer. Seller can not purchase any items in the website from seller account so I want to remove default Order History links for Seller only.

I want to remove default order history links from seller accounts. Check Screenshot

I am using Magento 2.3.4

  • did it worked for you? Commented Jun 11, 2020 at 8:11
  • @AfreenSheikh, I will check and update you. Thanks for your response. Commented Jun 11, 2020 at 12:12

1 Answer 1


You can achieve this by adding your own content

  1. remove the order link of sales module and Add your own content with your custom class.

    <referenceBlock name="customer_account_navigation">
        <referenceBlock name="customer-account-navigation-orders-link" remove="true"/>
        <block class="Vendor\Module\Block\Customer\MyOrderLink" name="custom-customer-account-navigation-orders-link">
               <argument name="path" xsi:type="string">sales/order/history</argument>
                <argument name="label" xsi:type="string" translate="true">My Orders</argument>
                <argument name="sortOrder" xsi:type="number">230</argument>
  2. create class and add condition in your class as per requirement

    namespace Vendor\Module\Block\Customer;
    use Magento\Framework\View\Element\Html\Link\Current;
    class MyOrderLink extends Current
       public function toHtml()
           //add your check or condition here
           $isNotVendor = 0;
           //if not vendor then link should appear
               return parent::toHtml();
           //if is vendor then link should not appear
           return '';

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.