Component Documentation

StarterCart
Component StarterCart (Starter Cart)

I manage all of the functionality for Starter Cart. Note that Starter Cart allows external (or internal) management of products which causes some increased API complexity in return for the extra flexibility.


methods:

Initialization
init, initialized

Order Processing
addItem, changeQuantity, createOrder, getBillingAddress, getOrderData, getShippingAddress, hasDiscounts, placeOrder, processPayment, removeItem, setBillingAddress, setBuyer, setCustomer, setDiscount, setRecipient, setShippee, setShippingAddress

Administration
shipOrder, updateItem, updateItemPrices, updateItems

Utility
CentsCeiling, CentsInt, CentsRound, MaskedCardNumber, runScheduledTask

Miscellanious
throwError, xml


init

I initialize and return this object.

Output: suppressed
Parameters:
   Manager: any, required
   cfpayment: any, required
   NoticeMgr: any
   Scheduler: any
   ErrorEmail: string

initialized

I return the date that this instance of StarterCart was instantiated.

Output: suppressed
Parameters:

addItem

I add an item to a user's cart/order and return the OrderItemID for the added item.

Output: suppressed
Parameters:
   OrderID: string, required (The OrderID to which the item should be added. If zero, StarterCart will create a new order for this item.)
   ProductIdentifier: string, required (A unique identifier for the product being purchased.)
   ProductName: string, required (The name of the product as it should appear in the cart.)
   Price: numeric, required (The per-unit price of the product (Starter Cart will not verify the price against the price of the product).)
   Quantity: numeric (The number of items of this product being added.)
   ProductInfo: string (HTML for additional information about this item that should display in the cart (this can include a brief description or options chosen, for example).)
   LinkAdmin: string (The URL for administering this product to display in the site administration area.)
   LinkPublic: string (The URL for the public page for this product to display to the user.)

changeQuantity

I change the quantity of an order item.

Output: suppressed
Parameters:
   OrderID: numeric, required (The OrderID for the order being changed.)
   OrderItemID: numeric, required (The OrderItemID for the item whose quantity is being changed.)
   Quantity: numeric, required (The new quantity for the item. A quantity of zero will remove the item from the cart.)

createOrder

I create a new cart/order and return the OrderID.

Output: suppressed
Parameters:
   OrderTotal: numeric

getBillingAddress

I return a recordset of the billing address for the order.

Output: suppressed
Parameters:
   OrderID: numeric, required

getOrderData

I return a structure of the data for the given order.

Output: suppressed
Parameters:
   OrderID: numeric, required

getShippingAddress

I return a recordset of the billing address for the order.

Output: suppressed
Parameters:
   OrderID: numeric, required

hasDiscounts

I indicate whether or not the system has any active discounts.

Output: suppressed
Parameters:

placeOrder

I place an order in a single method call (not to be used in conjunction with other methods).

Output: suppressed
Parameters:
   OrderID: numeric
   sPayment: struct, required (A structure with a keys matching the arguments of the processPayment method (excluding OrderID))
   sBuyer: struct, required (A structure with a keys matching the arguments of the setBuyer method (excluding OrderID))
   sShippee: struct (A structure with a keys matching the arguments of the setShippee method (excluding OrderID))
   sItem: struct (A structure with a keys matching the arguments of the addItem method (excluding OrderID))
   aItems: array (An array of structures each with a keys matching the arguments of the addItem method (excluding OrderID))
   DiscountCode: string

processPayment

I process the payment for an order.

Output: suppressed
Parameters:
   OrderID: numeric, required (The OrderID for the order being payed.)
   cc: string, required (The credit card number used to pay for the order.)
   ccv: string, required (The verification number from the credit card.)
   year: numeric, required (The year the card expires.)
   month: numeric, required (The month that the credit card expires.)
   CreditCardID: numeric (The CreditCardID for the type of card being used (Amex, MasterCard, Visa, etcetera).)

removeItem

I remove an item from the user's cart/order.

Output: suppressed
Parameters:
   OrderID: numeric, required (The OrderID for the order being changed.)
   ProductIdentifier: string, required (The ProductIdentifier of the product being removed from the cart.)

setBillingAddress

I set the billing address for the order.

Output: suppressed
Parameters:
   OrderID: numeric, required
   FirstName: string
   LastName: string
   Address1: string
   Address2: string
   City: string
   StateCode: string
   PostalCode: string
   Comments: string
   StateProvinceID: numeric
   CustomerID: numeric
   AddressID: numeric

setBuyer

I set the buyer (billing address and customer record) for the order.

Output: suppressed
Parameters:
   OrderID: numeric, required
   Address1: string
   Address2: string
   City: string
   StateCode: string
   PostalCode: string
   Comments: string
   StateProvinceID: numeric
   Phone: string

setCustomer

I set the customer record for the order.

Output: suppressed
Parameters:
   FirstName: string
   LastName: string
   Email: string
   Phone: string

setDiscount

I attempt to apply a discount to the order.

Output: suppressed
Parameters:
   OrderID: numeric, required
   DiscountCode: string, required

setRecipient

I set the shipping address for the order (setRecipient,setShippee,setShippingAddress are all different method names for the same action).

Output: suppressed
Parameters:
   OrderID: numeric, required
   Address1: string
   Address2: string
   City: string
   StateCode: string
   PostalCode: string
   Comments: string
   StateProvinceID: numeric

setShippee

I set the shipping address for the order (setRecipient,setShippee,setShippingAddress are all different method names for the same action).

Output: suppressed
Parameters:
   OrderID: numeric, required
   Address1: string
   Address2: string
   City: string
   StateCode: string
   PostalCode: string
   Comments: string
   StateProvinceID: numeric

setShippingAddress

I set the shipping address for the order (setRecipient,setShippee,setShippingAddress are all different method names for the same action).

Output: suppressed
Parameters:
   OrderID: numeric, required
   Address1: string
   Address2: string
   City: string
   StateCode: string
   PostalCode: string
   Comments: string
   StateProvinceID: numeric
   CustomerID: numeric
   AddressID: numeric

shipOrder

I mark the order as shipped and take any steps tied to that action.

Output: suppressed
Parameters:
   OrderID: numeric, required
   ShipperTrackingNumber: string
   Notes: string

updateItem

I update/change an item in the order and return the OrderItemID for the item.

Output: suppressed
Parameters:
   OrderID: numeric, required
   ProductIdentifier: string, required
   ProductName: string, required
   ProductInfo: string, required
   Price: numeric, required
   Quantity: numeric, required

updateItemPrices

I update only the price for a product across any active (non-completed) carts/orders.

Output: suppressed
Parameters:
   ProductIdentifier: string, required
   Price: numeric, required

updateItems

I update a product across any active (non-completed) carts/orders.

Output: suppressed
Parameters:
   ProductIdentifier: string, required (The unique identifier for the product being changed. Any items using this ProductIdentifier for uncompleted orders will be affected.)
   Price: numeric
   ProductName: string
   ProductInfo: string
   LinkAdmin: string
   LinkPublic: string

CentsCeiling

I increase a numeric up to the nearest cent.

Output: suppressed
Parameters:
   amount: numeric, required

CentsInt

I decrease a numeric down to the nearest cent.

Output: suppressed
Parameters:
   amount: numeric, required

CentsRound

I round a numeric to the nearest cent.

Output: suppressed
Parameters:
   amount: numeric, required

MaskedCardNumber

I take the last four digits of a credit card number and the desired length and return a string of the appropriate length with the digits preceding the last four using Xs.

Output: suppressed
Parameters:
   CardLastFour: string, required
   CardLength: numeric

runScheduledTask

I am called every hour and used to run any custom code that needs to be run on a regular basis.

Output: suppressed
Parameters:

throwError


Output: suppressed
Parameters:
   message: string, required
   errorcode: string
   detail: string
   extendedinfo: string

xml

I return the XML for the tables needed for Starter Cart to work.

Output: suppressed
Parameters: