Skip to content

Commit 9c10f4a

Browse files
authored
ENGCOM-5162: magento#22686 Shipment view fixed for Fatal error. magento#22687
2 parents 4a93b23 + 59f2702 commit 9c10f4a

File tree

1 file changed

+8
-5
lines changed
  • app/code/Magento/Shipping/view/adminhtml/templates/view

1 file changed

+8
-5
lines changed

app/code/Magento/Shipping/view/adminhtml/templates/view/items.phtml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@
1616
</tr>
1717
</thead>
1818
<?php $_items = $block->getShipment()->getAllItems() ?>
19-
<?php $_i = 0; foreach ($_items as $_item): if ($_item->getOrderItem()->getParentItem()): continue; endif; $_i++ ?>
20-
<tbody class="<?= /* @escapeNotVerified */ $_i%2 ? 'odd' : 'even' ?>">
21-
<?= $block->getItemHtml($_item) ?>
22-
<?= $block->getItemExtraInfoHtml($_item->getOrderItem()) ?>
23-
</tbody>
19+
<?php $_i = 0; foreach ($_items as $_item):
20+
if (!empty($_item->getOrderItem())) :
21+
if ($_item->getOrderItem()->getParentItem()): continue; endif; $_i++ ?>
22+
<tbody class="<?= /* @escapeNotVerified */ $_i%2 ? 'odd' : 'even' ?>">
23+
<?= $block->getItemHtml($_item) ?>
24+
<?= $block->getItemExtraInfoHtml($_item->getOrderItem()) ?>
25+
</tbody>
26+
<?php endif; ?>
2427
<?php endforeach; ?>
2528
</table>
2629
</div>

0 commit comments

Comments
 (0)