mirumee/satchless — pull request #82 by greggarson (2011-11-11 23:12:55+00:00)
Title: OrderedItem Subclassing

This somewhat goes hand in hand with the work I did on Carts and CartItems. When the Order is created I need to be able to pass the additional information that I added to the CartItems to the OrderedItems too for long term persistence as the CartItems are going to be deleted at checkout.

To achieve this I refactored the OrderedItem creation mechanism so it's now based of a specified OrderedItem subclass and additionally exists in an overloadable function so the entire of OrderManager.get_from_cart doesn't need to be overidden.

Also refactored the clean method of AddToCartForm very slightly so that the call to Cart.add_item can now be overridden to accept additional params based on the updated I made in my previous pull request.