volusion-angular-themes/method — pull request #16 by jedmao (2014-06-23 23:25:04+00:00)
Title: Fix styles quantity

Commit https://github.com/jedmao/method/commit/32cb3b2b3358b39691a67bc6e292a42182984baa implements the following features:
- Add to cart button enabled state is now bound to the `cartItem.quantity === 0`
- Selection availability and `cartItem.quantity` now play well together. The user can increment the quantity only up to the number of available stock before adding to cart.
- If the selection has 3 availability and they add 2, it will only let them add 1 more (this gets wiped out of they change their selection and come back though).

I considered adding an `on-hold` state to the selection if they added all available stock, but this presented me with a confusing message that showed up so quickly, I was inclined to believe there was an issue adding it to my cart in the first place.

I really want to add specs for these use-cases, but I think it would make more sense in isolation. That is, if we could eventually pull-out this quantity counter into a separate component and also the add to cart button into another, they could send messages and respond accordingly. As it is now, things are way too tightly coupled. We shouldn't have so much logic in our product controller and this is how we can pull it out.