Skip to content

User address book implementation #10

@SlimDeluxe

Description

@SlimDeluxe

We need a user address book that allows users to manage a list of their addresses.

Addresses are not scoped to sites. They belong to a user and are universal — available in any active site.
Address book can be visible and is available to use only when it's enabled in the system settings (which are already site scoped). By default the address book is disabled.

For the country selector, our World plugin should be used, where countries have already been implemented.

Features

  • "Address book" feature can be enabled/disabled in the system settings
  • Create address
  • Update address
  • Delete address

Each feature obviously also needs a test.

Permissions

  • Each user can edit only his own addresses
  • Admins with "User update" permission can edit/manage addresses for any user
    (needs positive and negative tests)

Data model

Table: user_addresses

Image

Notes:

  • column types can be different, this is just the old table
  • country_id is a foreign key to world_countries.id

Interface

  1. Addresses should maybe be in a tab, to prevent too many things on one page (deferred loaded table)
  2. The form should allow up to 3 address lines, but only 1 is shown by default (majority of countries uses 1)
  3. Address can be set as default
  4. Address can be a company address, which adds 2 more fields: company name (required), company VAT ID (optional)

Screenshots from the old app:

Image

Image

Image

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions