This patch adds the following:
1) A "buy this product" button for each product in templates/base_category.html. Product is added with quantity of 1, view redirected to cart.
2) An alternative cart template (templates/base_cart-alternate.html) demonstrating: - text-input fields for quantity editing - "update cart" button - edits quantities for all items, deletes items with quantity 0 - cart-wide form (all cart items contained in a single form) - "remove" buttons modified to work inside the cart-wide form
3) New view methods in satchmo.shop.views.cart: add_from_list (to support 1), add_from_list_ajax (same for ajax, untested), update_cart (to support 2). All new views create a modified POST dict and then call the original cart editing views - this way actual cart manipulation code is not duplicated.
4) New entries in satchmo,shop.urls for the new cart actions.
a) There is no update_cart_ajax view to complement update_cart. Returning and updating the entire cart display in JS is non-trivial enough that it should probably be discussed first.
b) I created base_cart-alternate.html because I didn't want to override Bruce's cart features - his uses individual forms for performing quantity updates on each row, which is a good option to keep around. I'm not sure how to make the alternative cart template available - suggestions welcome.
Reported by itai