The address book module allows a customer to save addresses so that they can save some time in the future when they checkout in your store. Instead of entering the entire address manually each time, they can simply select it from their address book. This is especially useful for those people checking out using a mobile device. Customers can save their addresses, and even those of friends and family.
The following prerequisites will be necessary to accomplish the goals of this article:
- Have access to your Hotcakes store administration
- Configure your store using the getting started wizard or do it manually
- Be logged in to save addresses
The information provided here is based upon the default configuration of Hotcakes and the default viewset. Your views may have more or less functionality, depending on how it was implemented by your technical team.
Address Book Module
If you've used the wizard to set-up your store pages, you'll already have an address book module placed in your site. In a default configuration, that page will be found under the "Hotcakes Store" menu, on the "Address Book" page. In most instances, those pages will have been moved and/or renamed on your site though.
You'll need to be logged in before the address book begins to expose any useful features to you. Once you do, you won't see any addresses until you've added one, or checked out at least once.
Once you've checked out or added an address, you'll begin to see your addresses listed, with the ability to delete or edit any of them, using the buttons you see in the image below.
Adding Addresses to the Address Book
Any address you use as a billing or shipping address during checkout will automatically be added to your address book for you, as long as it's not already in the address book. Alternatively, you can add addresses at any time using the "New Address" button you see on the Address Book page.
The address form you see here will be nearly identical to any address form you see in the front and back ends of the solution. You can learn more about each of these fields in the Editing the Customer Address Book documentation article.
As you begin to add more and more addresses, you'll see them continue to be displayed, as shown below.
Address Book and the Checkout
As customers add addresses, the new addresses will continue to be available to the checkout, making it even more easy to complete the checkout process. Selecting an address from the address book will fill in all of the respective address fields.
This module doesn't have any settings that are unique to the address book features or functionality.
Viewset View Location
You'll find the views for this module in the following location in your viewset:
If you used the getting started wizard, this module will initially be placed on the Address Book page, under the Hotcakes Store navigation menu. In your own store, you'll likely want to move it to be somewhere else on your site. You may even find yourself renaming the module and/or page to more closely match the branding of your company (at least from your customer's perspective).
In general, there's nothing to keep you from moving and renaming the module in nearly any way. However, in most stores, the customer will expect to find the address book in their user account/profile area and/or in the top-level navigation. You should keep this in mind if you choose to move this module or page.
This module only works as expected when the customer is logged in. Otherwise, it won't have any idea how to look up the addresses to display. As such, you should ensure that this module is only ever on a page that is available to customer security roles that you know are logged in. For example, in the image below the page is visible only to "Registered Users" which is a built-in security role that requires the customer to be logged in to be a part of.
You can also make the page more public if you have the need to. In this case, you'd simply want to make sure the module itself has view permissions to only show itself to security roles that require a logged in user account. In the example below, it was first necessary to uncheck the "Inherit View Permissions from Page" checkbox. Only then could we override when this module is shown to the customer.