I am working on the backend invoice template.
In adminhtml (sales/order/invoice/view/items.phtml), the item list is performed with :
<?php $_items = $this->getInvoice()->getAllItems() ?>
<?php $i=0;foreach ($_items as $_item): ?>
<?php echo $this->getItemHtml($_item) ?>
<?php echo $this->getItemExtraInfoHtml($_item->getOrderItem()) ?>
<?php endforeach; ?>
I would like to be able to access items custom options inside that loop.
I tried several things :
$_item->getOptions();
$_item->getProductOptions();
$_item->getItemOptions();
$_item->getProduct()->getTypeInstance(true)->getOrderOptions($_item->getProduct());
but none is working…
Thank you for your help,
$_item->getProductOptions()
should be the one. What happens when youvar_dump
it? Does it return NULL?