postcode-nl / PostcodeNl_Api_MagentoPlugin

A Magento plugin 1.9 that implements the Postcode.nl API for Dutch addresses
BSD 2-Clause "Simplified" License
21 stars 12 forks source link

How to apply automatic address lookup after input house number? #31

Closed Mic2005 closed 8 years ago

Mic2005 commented 8 years ago

Is there a way to make the api call realtime (after 1 á 2 seconds) after the customer add the housnumber? The extension does the api check only when the customer leaves the housnr field (tab outside the field) and not when customer stay in the field. The customer don't need to go somewere else because it's the last field in our checkout. After the address is loaded the shipment is calculated, not before so i need realtime update without leaving the house number field. Is this easy to create?

MaartenScholder commented 8 years ago

Due to the nature of the most common bugs (i.e. compatibility with all the different checkout forms and checkout addons), we're hesitant to add this option.

Please see the observeImmediate funciton in our lookup.js . You could ask a javascript developer to not only use the 'change' but also 'input' inc. some timeouts.

Mic2005 commented 8 years ago

I placed the telephonenumber as last field so the customer move the cursor to the last field. In this case there is a reload (calculation). A simple modification and workaround.

MaartenScholder commented 8 years ago

That's nice workaround. And it might actually be the more common (thus expected) order of fields.