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.
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.
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.
e.g.
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.