Skip to content

Customer address book extension for Vue Storefront - Integration to manage customer’s multiple addresses under my account section

License

Notifications You must be signed in to change notification settings

aureatelabs/vsf-address-book

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Customer address book extension for Vue Storefront

Customer address book extension for vue-storefront, by Aureate Labs

This extension is used for manage customer multiple addresses.

Customer Address Book

Installation

By hand (preferer):

git clone https://github.com/aureatelabs/vsf-address-book.git ./vue-storefront/src/modules/address-book

Add the following config to your config/local.json

"addressbook": {
  "create_endpoint": "http://localhost:8080/api/ext/address-book/customers/{{customerId}}",
  "remove_endpoint": "http://localhost:8080/api/ext/address-book/addresses/{{addressId}}"
},

Registration the customer address book extension

Add script import to ./src/modules/index.ts

...
import { AddressBook } from './address-book'

export const registerModules: VueStorefrontModule[] = [
 ...,
 Url,
 AddressBook
]

Integration to your current theme

Open src/themes/{current-theme-dir}/components/core/blocks/MyAccount/MyShippingDetails.vue file and import component of address book extension to your theme.

import CustomerAddress from 'src/modules/address-book/components/CustomerAddress.vue'

export default {
  components: {
    ...,
    CustomerAddress
  },
  mixins: [MyShippingDetails],

Need to add component instance after shipping information view code.

    ...
    </div>

    <customer-address />
  </div>
</template>

<script>
...

Customer address book API extension

Install additional extension for vue-storefront-api:

$ cp -f ./API/address-book ../vue-storefront-api/src/api/extensions/

Add the following config to your ./vue-storefront-api/config/local.json for Registration

"registeredExtensions": [
  ...
  "mail-service",
  "address-book"
],

License

This project is licensed under the MIT License

About

Customer address book extension for Vue Storefront - Integration to manage customer’s multiple addresses under my account section

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published