Addresses
Existing addresses
Additional addresses can be rendered in TemplateTag-based designs by using the UserManagement:User.UserAddresses loop, which returns the address on the user as well as any additional addresses belonging to this user from the AccessUserAddress table.
As of 9.9.5 I cannot find a way to retrieve all addresses on a user via the API - the GetUserAddresses()-method returns only the addresses in the AccessUserAddresses table but not the address on the user itself.
Select a billing address
This user has no additional addresses
Select a delivery address
This user has no additional addresses
Billing address
Billing address details are submitted using input fields with specific names and ids, as in the example below. Many - but not all - of the order fields available can be matched with a specific user field when the user is logged in.
You can also retrieve the user object directly via the API and access the properties directly.
Delivery Address
In almost all respects, the delivery address fields are identical to the billing address fields. The only difference is that there is no Comment field, and that billing specific information such as the Vat Registration Number is not present.
The 'Copy customer info to delivery info fields if empty'-checkbox under Settings > Ecommerce > Advanced Configuration > Shopping cart allows you to copy billing address field values to the delivery address fields if no part of the delivery address has been filled out.
Payment Methods
Payment methods are rendered via the Paymethods loop. Some extra logic is needed if you want to support saved cards - both to save the card and to ensure that you don't submit both a saved payment method and a regular payment method to cart. In this case we use a javascript function to clear the Payment Methods radio button if a saved card is selected.
Saved Cards
Saved Cards - or more properly saved payment methods - are most easily rendered in a separate list. Like for payment methods, we use a js function to clear any payment method selected when a saved card is selected.
No saved cards for this user
Inline payment form
If a checkout handler supports inline forms, the tag Ecom:Cart.PaymentInlineForm is used to render the checkout handler post form inline.
The selected payment method does not support inline payments
Shipping Methods
Shipping method selections are submitted to cart using input elements with the name EcomCartShippingmethodID and an ID of the type EcomCartShippingmethodID_{ShippingMethodID}.
Recurring Orders
To create a recurring order you must first check if the payment method supports it - if it does you must submit a field with the ID and name EcomRecurringOrderCreate alongside an interval, an interval unit, and a start and end date to the cart.
This payment method does no support recurring orders