0

In my B2C store I removed the register-link in my theme.

I achieved this removing it in the Magento_Theme default.xml with the following directive: <referenceBlock name="register-link" remove="true" />

In my B2B store I use the same directive in my default.xml but it does not work. There it still shows the register link in the frontend.

Perhaps the register-link is different here because you can create also a company account and not "just" a personal account.

enter image description here

Can anybody tell how to remove the register-link for B2B?

1 Answer 1

1

There are 2 ways in order to delete this link.

  1. disable the allow_company_registration in the config by putting company/general/allow_company_registration to 0 (not recommended if you want this feature to be still active)

  2. Magento_Company/layout/default.xml with the following

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="register.company.link" remove="true" />
    </body>
</page>

The second option will just delete the link for the register links dropdown but the feature will still be active on your website.

1
  • Thanks, adding this remove directive did the trick!
    – Th. Schott
    Commented Mar 9, 2020 at 19:29

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.