postcode-nl / PostcodeNl_Api_Magento2

A Magento 2 plugin that implements the Postcode.nl international address API
https://developer.postcode.eu/documentation/
BSD 2-Clause "Simplified" License
10 stars 13 forks source link

Address autocomplete on customer registration page #70

Closed marcoveeneman closed 11 months ago

marcoveeneman commented 1 year ago

Hi,

I would like new customers of a store to use the address autocomplete feature on the registration page (mystore.com/customer/account/create/) so that a customer can enter it's address more easily and also the address is already correct when the customer is registered.

The address fields on the customer registration page are enabled by setting the following in customer_account_create.xml layout file:

<referenceBlock name="customer_form_register">
    <arguments>
        <argument name="show_address_fields" xsi:type="boolean">true</argument>
    </arguments>
</referenceBlock>

The show_address_fields argument is used in the following template to render the address fields: /vendor/magento/module-customer/view/frontend/templates/form/register.phtml

Question: Is it possible to integrate the address autocomplete feature in this customer registration form?

JerrySmidt commented 1 year ago

Hello,

Yes, it should be possible to use address autocomplete there as well. It looks like it requires a similar implementation to the one used for the customer address fields in the address book. So you can use that as a reference if you are building your own.

These fields will also likely be supported in a future release of the module.

marcoveeneman commented 1 year ago

Hi Jerry,

Thanks for the info, i will give it a try myself as i cannot wait for a future version unfortunately.

While testing the address autocomplete on the customer address book i think i found a bug which causes the autocomplete module to not work. See #71

JerrySmidt commented 1 year ago

:ok: