Difference between revisions of "Functions:orderGetCompleteArray"

From Whirlwind eCommerce Wiki
Jump to: navigation, search
(added priceOption to the options array)
(added catalog number to item array)
 
(10 intermediate revisions by 2 users not shown)
Line 16: Line 16:
 
Array
 
Array
 
(
 
(
 +
    [destinations] => Array
 +
        (
 +
            [0] => Array
 +
              (
 +
                    [addressId] => INT
 +
                    [shipType] => STRING
 +
                    [shipTypeCode] => STRING
 +
                    [shipAmount] => FLOAT
 +
                    [addressName] => STRING
 +
                    [taxAmount] => FLOAT
 +
                    [firstName] => STRING
 +
                    [lastName] => STRING
 +
                    [company] => STRING
 +
                    [user_addressId] => INT
 +
                    [street1] => STRING
 +
                    [street2] => STRING
 +
                    [city] => STRING
 +
                    [state] => STRING
 +
                    [zipCode] => INT
 +
                    [country] => STRING
 +
                    [phone1] => STRING
 +
                    [phone2] => STRING
 +
                    [phone3] => STRING
 +
                    [fax] => STRING
 +
                    [emailAddress] => STING
 +
                    [instructions] => STRING
 +
                    [deliveryDate] => DATETIME
 +
                    [total] => DECIMAL
 +
                    [itemTotal] => DECIMAL
 +
                    [totalQuantity] => INT
 +
                    [itemSurchargeTotal] => DECIMAL
 +
                    [items] => Array
 +
                        (
 +
                                [0] => Array
 +
                                        (
 +
                                            [itemId] => INT
 +
                                            [createDate] => DATETIME
 +
                                            [modDate] => DATETIME
 +
                                            [createUserId] => INT
 +
                                            [modUserId] => INT
 +
                                            [quantity] => INT
 +
                                            [pricePer] => FLOAT
 +
                                            [listPricePer] => FLOAT
 +
                                            [imagePath] => STRING
 +
                                            [isDiscontinued] => BIT
 +
                                            [productId] => INT
 +
                                            [productName] => STRING
 +
                                            [productNumber] => STRING
 +
                                            [sku] => STRING
 +
                                            [cartDescription] => STRING
 +
                                            [isTaxable] => BIT
 +
                                            [shippingSurcharge] => FLOAT
 +
                                            [affiliatePoints] => INT
 +
                                            [weight] => FLOAT
 +
                                            [itemLayout_complete] => BIT
 +
                                            [itemLayout_configurable] => BIT
 +
                                            [minQuantity] => INT
 +
                                            [catalogNumber] => STR
 +
                                            [matrixId] => INT
 +
                                            [aggregateBenefit] => BIT
 +
                                            [aggregateMinQuantity] => INT
 +
                                            [aggregateMinQuantityFailurePageId] => INT
 +
                                            [freeItem_discountId] => INT
 +
                                            [master_itemId] => INT
 +
                                            [pageId] => INT
 +
                                            [notice] => STRING
 +
                                            [page_title] => STRING
 +
                                            [options] => Array
 +
                                                (
 +
                                                    [0] => Array
 +
                                                        (
 +
                                                            [groupId] => INT
 +
                                                            [groupName] => STRING
 +
                                                            [title] => STRING
 +
                                                            [price] => FLOAT
 +
                                                            [priceOption] => INT                          )
 +
                                                    [1] => Array ...
 +
 +
                                                )
 +
 +
 +
                                        )
 +
                                [1]...
 +
                        )
 +
                )
 +
            [1]...
 +
        )
 +
    // items array is depreciated
 
     [items] => Array
 
     [items] => Array
 
         (
 
         (
Line 36: Line 124:
 
                     [firstName] => STRING
 
                     [firstName] => STRING
 
                     [lastName] => STRING
 
                     [lastName] => STRING
 +
                    [company] => STRING
 
                     [user_addressId] => INT
 
                     [user_addressId] => INT
 
                     [street1] => STRING
 
                     [street1] => STRING
Line 64: Line 153:
 
                     [itemLayout_configurable] => BIT
 
                     [itemLayout_configurable] => BIT
 
                     [minQuantity] => INT
 
                     [minQuantity] => INT
 +
                    [catalogNumber] => STR
 
                     [matrixId] => INT
 
                     [matrixId] => INT
 
                     [aggregateBenefit] => BIT
 
                     [aggregateBenefit] => BIT
Line 69: Line 159:
 
                     [aggregateMinQuantityFailurePageId] => INT
 
                     [aggregateMinQuantityFailurePageId] => INT
 
                     [freeItem_discountId] => INT
 
                     [freeItem_discountId] => INT
 +
                    [master_itemId] => INT
 +
                    [pageId] => INT
 +
                    [notice] => STRING
 +
                    [page_title] => STRING
 
                     [options] => Array
 
                     [options] => Array
 
                         (
 
                         (
Line 106: Line 200:
 
                     [amount] => FLOAT
 
                     [amount] => FLOAT
 
                     [payType] => STRING
 
                     [payType] => STRING
 +
                    [poNumber] => STRING
 +
                    [payMethod] => STRING
 +
                    [instantCreditAccountNumber] => STRING
 
                     [taxAmount] => FLOAT
 
                     [taxAmount] => FLOAT
 
                     [firstName] => STRING
 
                     [firstName] => STRING
 
                     [lastName] => STRING
 
                     [lastName] => STRING
 +
                    [company] => STRING
 
                     [user_addressId] => INT
 
                     [user_addressId] => INT
 
                     [street1] => STRING
 
                     [street1] => STRING
Line 163: Line 261:
 
             [ENTRY_URL] => STRING
 
             [ENTRY_URL] => STRING
 
             [IP_ADDRESS] => STRING
 
             [IP_ADDRESS] => STRING
 +
            [sourceCode] => sourceCode
 
             [createDate] => DATETIME
 
             [createDate] => DATETIME
 
             [modDate] => DATETIME
 
             [modDate] => DATETIME
Line 168: Line 267:
 
             [modUserId] => INT
 
             [modUserId] => INT
 
             [itemTotal] => FLOAT
 
             [itemTotal] => FLOAT
 +
            [itemCount] => INT
 +
            [baseShippingTotal] => FLOAT
 
             [shippingTotal] => FLOAT
 
             [shippingTotal] => FLOAT
 
             [taxTotal] => FLOAT
 
             [taxTotal] => FLOAT
Line 190: Line 291:
 
)
 
)
 
</pre>
 
</pre>
 
  
 
== Examples ==
 
== Examples ==
 
;For an example of use in Shopping Cart, see [[Page Templates:Creating a Shopping Cart Template|Creating a Shipping Cart Template]]
 
;For an example of use in Shopping Cart, see [[Page Templates:Creating a Shopping Cart Template|Creating a Shipping Cart Template]]

Latest revision as of 00:16, 17 April 2012

Page Template Managers

Page Template Functions

Description

Retrieves data for entire order including items, payments, addresses, etc. Use for building shopping cart page, order review/summary page and order receipts.

Syntax

$orderArray = eV::orderGetCompleteArray($orderId=NULL)

Paramaters

  • $orderId INT OPTIONAL
unique orderId as assigned by the system upon creation of the order. If empty, the system will default to the current shopping cart (session.order.orderId)

Return Values

Associative array of complete order information. The array is as follows:

Array
(
    [destinations] => Array
        (
            [0] => Array
               (
                    [addressId] => INT
                    [shipType] => STRING
                    [shipTypeCode] => STRING
                    [shipAmount] => FLOAT
                    [addressName] => STRING
                    [taxAmount] => FLOAT
                    [firstName] => STRING
                    [lastName] => STRING
                    [company] => STRING
                    [user_addressId] => INT
                    [street1] => STRING
                    [street2] => STRING
                    [city] => STRING
                    [state] => STRING
                    [zipCode] => INT
                    [country] => STRING
                    [phone1] => STRING
                    [phone2] => STRING
                    [phone3] => STRING
                    [fax] => STRING
                    [emailAddress] => STING
                    [instructions] => STRING
                    [deliveryDate] => DATETIME
                    [total] => DECIMAL
                    [itemTotal] => DECIMAL
                    [totalQuantity] => INT
                    [itemSurchargeTotal] => DECIMAL 
                    [items] => Array
                        (
                                [0] => Array
                                        (
                                             [itemId] => INT
                                             [createDate] => DATETIME
                                             [modDate] => DATETIME
                                             [createUserId] => INT
                                             [modUserId] => INT
                                             [quantity] => INT
                                             [pricePer] => FLOAT
                                             [listPricePer] => FLOAT
                                             [imagePath] => STRING
                                             [isDiscontinued] => BIT
                                             [productId] => INT
                                             [productName] => STRING
                                             [productNumber] => STRING
                                             [sku] => STRING
                                             [cartDescription] => STRING
                                             [isTaxable] => BIT
                                             [shippingSurcharge] => FLOAT
                                             [affiliatePoints] => INT
                                             [weight] => FLOAT
                                             [itemLayout_complete] => BIT
                                             [itemLayout_configurable] => BIT
                                             [minQuantity] => INT
                                             [catalogNumber] => STR
                                             [matrixId] => INT
                                             [aggregateBenefit] => BIT
                                             [aggregateMinQuantity] => INT
                                             [aggregateMinQuantityFailurePageId] => INT
                                             [freeItem_discountId] => INT
                                             [master_itemId] => INT
                                             [pageId] => INT
                                             [notice] => STRING
                                             [page_title] => STRING
                                             [options] => Array
                                                 (
                                                     [0] => Array
                                                         (
                                                             [groupId] => INT
                                                             [groupName] => STRING
                                                             [title] => STRING
                                                             [price] => FLOAT
                                                             [priceOption] => INT                           )
                                                     [1] => Array ...

                                                 )


                                        )
                                [1]...
                        )
                )
            [1]...
        )
    // items array is depreciated
    [items] => Array
        (
            [0] => Array
                (
                    [itemId] => INT
                    [createDate] => DATETIME
                    [modDate] => DATETIME
                    [createUserId] => INT
                    [modUserId] => INT
                    [quantity] => INT
                    [pricePer] => FLOAT
                    [listPricePer] => FLOAT
                    [sale_addressId] => INT
                    [shipType] => STRING
                    [shipTypeCode] => STRING
                    [shipAmount] => FLOAT
                    [addressName] => STRING
                    [taxAmount] => FLOAT
                    [firstName] => STRING
                    [lastName] => STRING
                    [company] => STRING
                    [user_addressId] => INT
                    [street1] => STRING
                    [street2] => STRING
                    [city] => STRING
                    [state] => STRING
                    [zipCode] => INT
                    [country] => STRING
                    [phone1] => STRING
                    [phone2] => STRING
                    [phone3] => STRING
                    [fax] => STRING
                    [emailAddress] => STING
                    [instructions] => STRING
                    [deliveryDate] => DATETIME
                    [imagePath] => STRING
                    [isDiscontinued] => BIT
                    [productId] => INT
                    [productName] => STRING
                    [productNumber] => STRING
                    [sku] => STRING
                    [cartDescription] => STRING
                    [isTaxable] => BIT
                    [shippingSurcharge] => FLOAT
                    [affiliatePoints] => INT
                    [weight] => FLOAT
                    [itemLayout_complete] => BIT
                    [itemLayout_configurable] => BIT
                    [minQuantity] => INT
                    [catalogNumber] => STR
                    [matrixId] => INT
                    [aggregateBenefit] => BIT
                    [aggregateMinQuantity] => INT
                    [aggregateMinQuantityFailurePageId] => INT
                    [freeItem_discountId] => INT
                    [master_itemId] => INT
                    [pageId] => INT
                    [notice] => STRING
                    [page_title] => STRING
                    [options] => Array
                        (
                            [0] => Array
                                (
                                    [groupId] => INT
                                    [groupName] => STRING
                                    [title] => STRING
                                    [price] => FLOAT
                                    [priceOption] => INT                           )
                            [1] => Array ...

                        )


                )
            [1] => Array ...

        )

    [payments] => Array
        (
            [0] => Array
                (
                    [paymentId] => INT
                    [createDate] => DATETIME
                    [modDate] => DATETIME
                    [createUserId] => INT
                    [modUserId] => INT
                    [sale_addressId] => INT
                    [accountNumber] => STRING
                    [expDate] => DATETIME
                    [authNumber] => STRING
                    [cancelDate] => DATETIME
                    [manualPayment] => BIT
                    [processDate] => DATETIME
                    [amount] => FLOAT
                    [payType] => STRING
                    [poNumber] => STRING
                    [payMethod] => STRING
                    [instantCreditAccountNumber] => STRING
                    [taxAmount] => FLOAT
                    [firstName] => STRING
                    [lastName] => STRING
                    [company] => STRING
                    [user_addressId] => INT
                    [street1] => STRING
                    [street2] => STRING
                    [city] => STRING
                    [state] => STRING
                    [zipCode] => INT
                    [country] => STRING
                    [phone1] => STRING
                    [phone2] => STRING
                    [phone3] => STRING
                    [fax] => STRING
                    [emailAddress] => STRING
                    [instructions] => STRING
                )
            [1] => Array ...
        )

    [discounts] => Array
        (
            [0] => Array
                (
                    [discountId] => INT
                    [prod_discountId] => INT
                    [discountCode] => STRING
                    [description] => STRING
                    [amount] => FLOAT
                    [createDate] => DATETIME
                    [modDate] => DATETIME
                    [createUserId] => INT
                    [modUserId] => INT
                    [mutuallyExclusive] => BIT
                    [itemId] => INT
                    [isStatic] => BIT
                )
            [1] => Array ...
        )

    [order] => Array
        (
            [orderId] => INT
            [orderNumber] => INT
            [completeDate] => DATETIME
            [cancelDate] => DATETIME
            [checkoutRegistrationDate] => DATETIME
            [checkoutAddressDate] => DATETIME
            [checkoutPaymentDate] => DATETIME
            [checkoutConfirmationDate] => DATETIME
            [add2CartDate] => DATETIME
            [accountUserId] => INT
            [adminUserId] => INT
            [notes] => STRING
            [HTTP_REFERER] => STING
            [ENTRY_URL] => STRING
            [IP_ADDRESS] => STRING
            [sourceCode] => sourceCode
            [createDate] => DATETIME
            [modDate] => DATETIME
            [createUserId] => INT
            [modUserId] => INT
            [itemTotal] => FLOAT
            [itemCount] => INT
            [baseShippingTotal] => FLOAT
            [shippingTotal] => FLOAT
            [taxTotal] => FLOAT
            [itemSurchargeTotal] => FLOAT
            [paymentTotal] => FLOAT
            [discountTotal] => FLOAT
            [discountFreeTotal] => FLOAT
            [grandTotal] => FLOAT
            [totalDue] => FLOAT
            [totalQuantity] => INT
            [weightTotal] => FLOAT
            [matrixAggregateMinQuantityMet] => BOOL
            [matrixArr] => Array [key is matrixId]
                 (
                        [aggregateMinQuantity] => INT
                        [aggregateMinQuantityFailurePageId] => INT
                        [totalQuantity] => INT
                        [itemIndexes] => Array of INT
                 )
        )

)

Examples

For an example of use in Shopping Cart, see Creating a Shipping Cart Template