spree/spree — pull request #5274 by metade (2014-08-27 16:02:40+00:00)
Title: Refactor Spree::OrderContents#add_to_line_item

Our application has personalised products (e.g. you can have your own name and inscription on the product), and we want to allow:
* users to provide the product options when adding a product to the cart
* users to edit their product options once they've added the product to the cart from the cart page
* customer support to be able to edit the product options on completed orders from the admin section

The work done by @jsqu99 to enable customisable products only allowed the first of these use cases, so here's a proposal to enable it for the others.

We refactored Spree::OrderContents#add_to_line_item so that the logic of setting the line item price based on the product options is reusable when creating an updating a line item.

There's one section which could do with I'm not too happy with, I will comment that individually.