Functions:userAccountAndAddressCreate

From Whirlwind eCommerce Wiki
Revision as of 03:16, 5 November 2008 by 71.163.185.8 (Talk)

Jump to: navigation, search

Description

Controls a new user/address form, adds a new user/address. Use this function to build a 'create account' page.

Syntax

$accountArray = eV::userAccountAndAddressCreate($fieldList,$redirect);

Paramaters

  • $fieldList STRING
comma separated list of fields to be managed by the form. The listed fields in $fieldList can be complimented with the following field controls:
  • /min:#:message
  • /max:#:message
  • /default:value
  • /email:message
  • /unique:message
  • $redirect STRING
URL where visitor will be forwarded to following a successful form submission

Return Values

Multidimensional array of field values and error messages containing [message]: a string containing any error messages that prohibited the form data from being submitted, and [values]: a keyed array of fields and their values. Note that only fields specified in the $fieldList attribute will be contained in the [value] array:

Array
(
    [message] => STRING
    [values] => ARRAY
        (
           //Address Fields
           [address_firstName] => STRING
           [address_lastName] => STRING
           [address_company] => STRING
           [addressName] => STRING
           [street1] => STRING
           [street2] => STRING
           [city] => STRING
           [state] => STRING
           [state_alt] => STRING
           [zipCode] => STRING
           [country] => STRING
           [phone1] => STRING
           [phone2] => STRING
           [phone3] => STRING
           [fax] => STRING
           //User Account Fields
           [firstName] => STRING
           [lastName] => STRING
           [password] => STRING
           [passwordConfirm] => STRING
           [userNotes] => STRING
           [company] => STRING
           [title] => STRING
           //Custom Fields
           [custom_field_...] => STRING
           ...
        )
)

Examples

example 1

example 1 goes here

example 2

example 2 goes here

See Also