Giter Site home page Giter Site logo

hyva-checkout-google-address-autocomplete's People

Contributors

arjenmiedema avatar tjitse-e avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hyva-checkout-google-address-autocomplete's Issues

Doesn't work properly with UK addresses

Steps to reproduce:

  • Go to the checkout and enter any UK based company (i.e. Arsenal Football Club)
  • Wait for the data to be "placed"

Expected Result:

  • The city "London" is set in the City field

Actual Result:

  • Since "London" is the "postal_town", no city is set

Note: There's also an issue with the "subpremise" field that is sometimes used as the house number.

Doesn't work with appartment numbers

When you search for a house number with appartment number suffix, for example: 61-19. The apartment number (19) doesn't get filled in the street address, because it isn't in the response of the Google Address API.

Populated address values not clearing if not present in addressComponents

Description

Currently, only address field types that are present in Google's response are dispatched for updating, leaving existing values.
This requires the user to find their match on the first try or to get lucky that all currently populated values' fields are present for the new address too.

Steps to reproduce:

  1. Pick an address that populates 'City'
  2. Pick an address that has no 'City'

Observed behavior:

City stays populated despite the 2nd address not having a City.

Expected behavior:

City should be cleared.

Proposed solution

Remove the if statement and set the value to the value if present, otherwise an empty string, causing the input to be cleared.

component.set(identifier, value ?? "");

Support 3 and 4 address lines

Currently, the module is build for only 2 address lines. Let's also test the behaviour for 3 and 4 address lines, since this is possible by default in Magento.

I don't want to support a single address line at this point, so let's make that clear in the docs and disable the entire feature if address lines is set to 1.

Too many requests

We had a quota set to 10 request per user per minute and we've now set that to 100 requests per user per minute (Google Places), yet after typing in about half of the address we'd start getting errors in the console

You have exceeded your rate-limit for this API. For more information on usage limits and the Google Maps JavaScript API services please see: https://developers.google.com/maps/documentation/javascript/usage

Can you confirm you are using the Google Places and how many requests per address lookup are you actually performing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.