I am a cart session (instantiate into Session scope) and facade for StarterCart.cfc. I can call any method on StarterCart.cfc and automatically include the OrderID into the arguments.
methods: |
Initialization Order Processing Utility |
Initialization |
init |
---|
I initialize and return this component. Output: suppressed Parameters: StarterCart: any, required OrderID: numeric, required |
initialized |
I return the date that this instance of CartSession was instantiated (used to compare with method of same name on StarterCart.cfc so this one can be reloaded if StarterCart has changed since then). Output: suppressed Parameters: |
Order Processing |
addItem |
I add an item to a user's cart/order and return the OrderItemID for the added item. Output: suppressed Parameters: |
changeQuantity |
I change the quantity of the given item from the user's cart. Output: suppressed Parameters: OrderItemID: numeric, required Quantity: numeric, required |
getOrder |
I return a recordset of cart/order record. Output: suppressed Parameters: |
getOrderData |
I return a recordset of the cart/order record and associated information. Output: suppressed Parameters: |
getOrderID |
I return thie OrderID for this instance of CartSession. Output: suppressed Parameters: |
getOrderItems |
I return a recordset of the items in this cart/order. Output: suppressed Parameters: |
isCompleted |
I indicate if this order has been completed. Output: suppressed Parameters: |
removeItem |
I remove the given product from the user's cart/order. Output: suppressed Parameters: ProductIdentifier: string, required |
saveOrder |
I save the order data. Output: suppressed Parameters: |
setDiscount |
I attempt to apply a discount to the order. Output: suppressed Parameters: DiscountCode: string, required |
Utility |
onMissingMethod |
I call any method on StarterCart and add the OrderID argument. I return any data returned by the method. Output: suppressed Parameters: |
resetInstance |
I reset the instance data for this instance of CartSession (useful if an outside process might have changed some data). Output: suppressed Parameters: |