When somebody adds an item to their cart on my website, there's an observer which adds a few custom options programmatically (mainly because it's much easier and it removes the dependency of having to make sure new products have these fields).

However, when somebody clicks edit on the product I need to make sure these are selected again and it uses a custom block of just HTML right now.

How can I get the values of these options on the product view page when somebody clicks edit? So I can check against the available options and select the ones that the user previously chose.

Thanks.