Overview
There are many views that make use of the AddressViewModel. It's necessary whenever you're dealing with any address, such as checkout billing/shipping address, affiliate addresses, the address book, and so on. This article will help you understand what's available to you in the view model.
Requirements
The following pre-requisites will be necessary to accomplish the goals of this article:
- General understanding of template engines
- Understanding HTML, CSS, JavaScript
- Familiarity with template languages
- Familiarity with ASP.NET MVC Razor
Getting Started
There are no tasks needed to get started with understanding this object.
AddressViewModel
The AddressViewModel object will contain all of the details of a single address for use in your Hotcakes Commerce store.
Members
The following table gives you details on the various members of the AddressViewModel object. The descriptions are based upon default functionality and the default Viewset included with Hotcakes.
Member | Type | Description |
AddressType | AddressTypes |
This property specifies whether the address is the store's address, or another address. There are two acceptable values:
|
Bvin | String | The unique ID or primary key of the address, and it should be used instead of the ID. |
City | String | The name of the city. |
Company | String | If this is not a residential address, a company name should be specified. |
Countries | List<Country> | List of the countries shown on the view when it loads address view |
CountryBvin | String | This is the unique ID or bvin of the country related to this address. |
CountryName | String | This property will contain the SystemName of the country. |
Fax | String | A fax or facsimile number for the address. |
FirstName | String | The first name of the recipient at this address. |
LastName | String | The last name or surname of the recipient at this address. |
LastUpdatedUtc | DateTime | The last updated date is used for auditing purposes to know when the address was last updated. |
Line 1 | String | The first line of the street address, such as 123 Main Street. |
Line 2 | String | The second line of the street address, such as Suite 100. |
Line 3 | String | The third line of the street address. Usually used for non-US or military addresses. |
MiddleInitial | String | The middle initial of the recipient at this address. |
Nickname | String | A user-defined value to name this address for easy identification in the user interface. |
Phone | String | A telephone number for the address. |
PostalCode | String | Contains the zip or postal code of the address, as necessary. |
RegionBvin | String | This should contain a valid ID of the Region, if applicable. |
RegionName | String | This property will contain the SystemName of the region. |
Regions | List<Region> | List of the regions for the chosen country on the view. |
StoreId | Long | This is the ID of the Hotcakes store. Typically, this is 1, except in multi-tenant environments. |
UserBvin | String | Addresses are mapped back to a CMS user record, even for vendors and manufacturers. This field is the user ID. |
WebSiteUrl | String | A website URL for the address. Primarily used for vendors and manufacturers. |
Need More Help?
Do you need more assistance with this article? Please review your support options.