Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top