spree_address_auto_complete

SpreeAddressAutoComplete allows you to use suggested address functionality using google maps api. Once installed the user will be given with a field in the address step of checkout page, using which he can select one of the suggested addresses by google, instead of typing the whole address.

Last updated on: May 01 at 04:46 PM

source code bug tracker
Opensource
6 6 11
owner:  vinsol-spree-contrib

SpreeAddressAutoComplete

SpreeAddressAutoComplete allows you to use suggested address functionality using Google maps api. Once installed the user will be given with a field in the address step of checkout page, using which he can select one of the suggested addresses by Google, instead of typing the whole address by himself.

Demo

Try Spree Address Auto Complete for Spree 3-4 with direct deployment on Heroku:

Deploy

Try Spree Address Auto Complete for Spree master with direct deployment on Heroku:

Deploy

Installation

  1. Add this extension to your Gemfile with this line:

#### Spree >= 3.2

 gem 'spree_address_auto_complete', git: 'https://github.com/vinsol-spree-contrib/spree_address_auto_complete', branch: 'master'

#### Spree < 3.2

 gem 'spree_address_auto_complete', git: 'https://github.com/vinsol-spree-contrib/spree_address_auto_complete', branch: 'X-X-stable'

The branch option is important: it must match the version of Spree you're using. For example, use 3-0-stable if you're using Spree 3-0-stable or any 3.0.x version.

  1. Install the gem using Bundler: ruby bundle install

  2. Copy & run migrations ruby bundle exec rails g spree_address_auto_complete:install

  3. Go to general_setting in admin section to add your Google maps api key.

  4. Restart your server

If your server was running, restart it so that it can find the assets properly.

Testing

#### Spree > 3.1

For Building Dependencies: shell appraisal install

The dummy app can be regenerated by using: ```shell appraisal spree-3-1 rake test_app

 This will run rake test_app using the dependencies configured for Spree 3.1. Similarly you can use spree-3-2 and spree-master for generating dummy applications using dependencies for Spree 3.2 and latest version of Spree
```shell
appraisal spree-3-1 rspec

This will run rspec using the dependencies configured for Spree 3.1. Similarly you can use spree-3-2 and spree-master to run rspec using dependencies for Spree 3.2 and latest version of Spree

#### Spree 3.0 and Spree 2.x

First bundle your dependencies, then run rake. rake will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using rake test_app.

 bundle
bundle exec rspec spec

See It In Action

Youtube Video Tutorial

Credits

vinsol.com: Ruby on Rails, iOS and Android developers

Copyright (c) 2017 vinsol.com, released under the New MIT License

video
tags
Address Google Maps Google Maps API Maps Address Autocomplete
compatible spree versions
tags spree versions
master
v3.0.9
v3.1.0
v3.2.0
v3.3.0
authors
Gaurav Mahajan