Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order Line Item Adhoc items are mutable #68

Open
nostopbutton opened this issue Mar 10, 2013 · 1 comment
Open

Order Line Item Adhoc items are mutable #68

nostopbutton opened this issue Mar 10, 2013 · 1 comment

Comments

@nostopbutton
Copy link
Contributor

I've discovered, what I believe to be, a flaw in the logic for how the adhoc option values for Order line items are stored in the data model (AdHocOptionValuesLineItem).

I plan to look at whether I am able to implement a change in this area, but would appreciate the views of anyone who works with this extension regularly.

The current implementation works by creating a reference link between the order line item and the reference table that stores the adhoc option values. My concern is that the Order, once placed should be self-contained and immutable (unless deliberately adjusted). Unfortunately, the effect of referencing the adhoc option values means that if anyone changes those values in future, the old orders will be affected by the changes.

Screenshot_10_3_13_9_18_PM

e.g.

  • imagine a product with an adhoc "colour" option with values of "01-red" "02-blue" "03-green"
  • an order is placed for a green version of this product, the line item links to "03-green" via references in AdHocOptionValuesLineItem
  • a few day later, someone change the adhoc options for colour -> "03-light green" and "04-dark green" - now if you go to look at the order, it says that the customer chose "light green" which was not even an option.
  • the change / impact could be even more drastic - someone could add a $20 change for light green,
  • deleting values in AdHocOptionValue would break the orders referencing them
  • for old orders, the impact is basically just messing up your historical record - not the end of the world one might say
  • more worrying is if someone changes an option just after an order is place, but before fulfilment takes place - in this case, the customer would likely get something different to the order they think they placed.

A solution to this should be to copy the adhoc option values into a table (such as AdHocOptionValuesLineItem) to make the value immutable to changes reference data in the AdHocOptionValue table.

@jsqu99
Copy link
Owner

jsqu99 commented Nov 8, 2013

@nostopbutton - Very sorry for the long-delayed response. did you ever come up with a solution? happy to integrate it if you have one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants