1

How to create login and register page on the same page and below-attached screen short.

enter image description here

  • Please specify the magento version. Also, please share what you have tried so far? – Amit Bera Jul 23 '19 at 10:48
  • magento version 2.3.1 – KANZARIYA ANIL Jul 23 '19 at 11:00
  • In the past, I have done it for Magento1 - blog.magepsycho.com/… Maybe this can be used as a reference. – MagePsycho Jul 23 '19 at 12:40
0

Override customer_account_login.xml page in your theme

app/design/frontend/vendore/theme/Magento_Customer/layout folder

Update below code in your file.

 <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
    <referenceContainer name="content">
        <!-- customer.form.login.extra -->
        <container name="customer.login.container" label="Customer Login Container" htmlTag="div" htmlClass="login-container">
            <block class="Magento\Customer\Block\Form\Login" name="customer_form_login" template="Magento_Customer::form/login.phtml">
                <container name="form.additional.info1" as="form_additional_info1"/>
            </block>
             <block class="Magento\Customer\Block\Form\Register" name="customer_form_register" template="Magento_Customer::form/register.phtml">
                <arguments>
                    <argument name="attribute_data" xsi:type="object">Magento\Customer\Block\DataProviders\AddressAttributeData</argument>
                </arguments>
                <container name="form.additional.info" as="form_additional_info"/>
                <container name="customer.form.register.fields.before" as="form_fields_before" label="Form Fields Before" htmlTag="div" htmlClass="customer-form-before"/>
            </block>
        </container>

        <block class="Magento\Cookie\Block\RequireCookie" name="require-cookie" template="Magento_Cookie::require_cookie.phtml">
            <arguments>
                <argument name="triggers" xsi:type="array">
                    <item name="loginButton" xsi:type="string">.action.login</item>
                </argument>
            </arguments>
        </block>
    </referenceContainer>
    <referenceContainer name="form.additional.info">
        <block class="Magento\Framework\View\Element\Template" name="form_additional_info_customer" template="Magento_Customer::additionalinfocustomer.phtml"/>
    </referenceContainer>
</body>
</page>

Set css based on your requirements.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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