How can i get item custom option from shipment item
my code is as
I am tring to get this using $options = $item->getProductOptions();
but it gives blank.
<?php $_order = $this->getOrder() ?>
<?php $group = $this->getGroupcode(); ?>
<?php $shipmentId = $this->getShipmentid(); ?>
<?php if ($_order): ?>
<?php foreach($_order->getShipmentsCollection() as $shipment): ?>
<?php foreach($shipment->getItemsCollection() as $item): ?>
<?php
$options = $item->getProductOptions();
echo "<pre/>";print_r($item->getData());exit;
$lineId = $options['info_buyRequest']['additional_options']['productline_id'];
$groupId = Mage::getModel('productline/productline')->load($lineId)->getShippinggroup();
if(!empty($options['info_buyRequest']['additional_options']['item_shippinggroup'])){
$itemGroup = $options['info_buyRequest']['additional_options']['item_shippinggroup'];
}else{
$itemGroup = trim(Mage::getModel('shippinggroup/shippinggroup')->load($groupId)->getTitle());
}
?>
<?php if($group == $itemGroup && $shipmentId == $shipment->getIncrementId()): ?>
<?php echo $this->getItemHtml($_item) ?>
<?php endif; ?>
<?php endforeach; ?>
<?php endforeach; ?>
<?php endif; ?>