Closed harberg closed 10 years ago
Still need to separate out the createCart, loadItem, and addItem functions. Right now they are set up to be triggered with button clicks. Need to have the cart created and the item loaded on page load before the the addItem is called.
createCart is now a factory that can be called by other controllers. It will also be called on page load if the page in question has items on it.
loadItem has and if/else to check for the existence of a cart object and will load the item with or without the cart object. This enables both calls (loadItem and createCart) to be called at the same time.