Hi,
I didn't modify something "important" in your code, just a fix for the variable "$parent_item_id" for more "security".
The way to retrieve the product option is the right one.
First you look at your targeted product and after that, you look at the option of your targeted product.
It's perfect
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.