Author Topic: Autofill State and City by Postal code  (Read 4646 times)

Offline AVS

  • Newbie
  • *
  • Posts: 43
  • Karma: +7/-0
    • View Profile
Autofill State and City by Postal code
« on: December 21, 2018, 01:06:43 AM »
Hi
When a customer fills Shipping address/ Billing address, auto filling of State and City when postal code is input would be a step forward, as, many eCommerce  sites  do. If this is not done many feel we are still behind.
 Can any one shed light on this with javascript code and PHP  etc... to achieve this in Abantecart? It would be best help. Thanks
AVS

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5774
  • Karma: +274/-2
    • View Profile

Offline AVS

  • Newbie
  • *
  • Posts: 43
  • Karma: +7/-0
    • View Profile
Re: Autofill State and City by Postal code
« Reply #2 on: December 21, 2018, 04:05:20 AM »
Hello.

Check this one https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform
Thanks for the link.  The recent changes in google API that billing account to be created has been criticized  by many people all over the world. What was free all these years in now charged  when free credits of $200 is exceeded. One has to provide payment method in our google account for this to use the API service. I don't want to take this commitment. Any other alternative ideas that we can do from our own server in Abantecart will be reliable and best option.  Moreover, here I mean just to fill CITY and STATE alone when user inputs Postal Code and not entire address search by MAP API. For this it can be a simple script in our own server.  I request someone here to suggest script and modification in Abantecart to achieve this.  Thanks

UPDATE:
I found Github project on this, script explanation is given in this link: https://www.nagekar.com/2014/12/creating-autocomplete-field-with-ajax.html
Any ideas on how to modify it to use in Abantecart is needed.
« Last Edit: December 23, 2018, 02:21:20 AM by AVS »

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Autofill State and City by Postal code
« Reply #3 on: December 22, 2018, 10:44:13 AM »
To build an autofill for state and city is not a problem. We can do that.
The question if for source of information.

We have 3 options that comes to mind:

1. Look up state & city data in the AbanteCart database based on provided postal code
Issue: Manual maintenance for data will be required.

2. Look up as in #1. Create background process to query third party service to get details and update local database

3. Look up details in third party services dynamically on customer request. In here, we can also add a full address look up and verification

#3 makes more sense to me.
If you are willing to contribute, let us know.



Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline AVS

  • Newbie
  • *
  • Posts: 43
  • Karma: +7/-0
    • View Profile
Re: Autofill State and City by Postal code
« Reply #4 on: December 23, 2018, 02:20:05 AM »
To build an autofill for state and city is not a problem. We can do that.
The question if for source of information.

We have 3 options that comes to mind:

1. Look up state & city data in the AbanteCart database based on provided postal code
Issue: Manual maintenance for data will be required.

2. Look up as in #1. Create background process to query third party service to get details and update local database

3. Look up details in third party services dynamically on customer request. In here, we can also add a full address look up and verification

#3 makes more sense to me.
If you are willing to contribute, let us know.

Thanks for detailed options that you have listed. For me also option #3 seems good. But dependency on 3rd party service is what I am thinking to avoid if possible. Just like google did, if they charge for every page loads, then many cannot use that service. Maintaining our own database will be better in the long term as we need not depend on others.  But if you think it is best to do with option #3 using third party service dynamically with some reliable free service and develop codes for Abantecart, then  it is well and good. I am willing to contribute $15. Please let me know if its right and how to contribute? Thanks
AVS
« Last Edit: December 23, 2018, 10:12:18 PM by AVS »

Offline maxter

  • Full Member
  • ***
  • Posts: 228
  • Karma: +64/-0
    • View Profile
Re: Autofill State and City by Postal code
« Reply #5 on: January 08, 2019, 08:32:48 PM »
With all respect, I do not think anyone on Abantecart team will be interested in $15 contribution. Even I would not work on this for $15 as this requires time to develop.

Hopefully, you find someone else to do this for you. 

Offline AVS

  • Newbie
  • *
  • Posts: 43
  • Karma: +7/-0
    • View Profile
Re: Autofill State and City by Postal code
« Reply #6 on: January 08, 2019, 09:57:53 PM »
With all respect, I do not think anyone on Abantecart team will be interested in $15 contribution. Even I would not work on this for $15 as this requires time to develop.

Hopefully, you find someone else to do this for you.
With all respect, here I am suggesting some improvement that would be valuable to all Abantecart users and not for my personal requirement alone. So, It is "Contribution" and the very word means as such every one knows and does not mean fully funded by me. If you are also interested in your contribution to Abantecart development you do or if and when someone else also contributes to this. Otherwise I am also in no way need of getting this done fully from out of my pocket alone.
« Last Edit: January 08, 2019, 10:21:56 PM by AVS »

 

Powered by SMFPacks Social Login Mod