Skip to content

Commit 044befa

Browse files
committed
22686 Shipment view fixed for Fatal error.
1 parent 6e76b38 commit 044befa

File tree

1 file changed

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

1 file changed

+10
-8
lines changed

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

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@
1414
</thead>
1515
<?php $_items = $block->getShipment()->getAllItems() ?>
1616
<?php $_i = 0; foreach ($_items as $_item) :
17-
if ($_item->getOrderItem()->getParentItem()) :
18-
continue;
19-
endif;
20-
$_i++ ?>
21-
<tbody class="<?= /* @noEscape */ $_i%2 ? 'odd' : 'even' ?>">
22-
<?= $block->getItemHtml($_item) ?>
23-
<?= $block->getItemExtraInfoHtml($_item->getOrderItem()) ?>
24-
</tbody>
17+
if (!empty($_item->getOrderItem())) :
18+
if ($_item->getOrderItem()->getParentItem()) :
19+
continue;
20+
endif;
21+
$_i++ ?>
22+
<tbody class="<?= /* @noEscape */ $_i%2 ? 'odd' : 'even' ?>">
23+
<?= $block->getItemHtml($_item) ?>
24+
<?= $block->getItemExtraInfoHtml($_item->getOrderItem()) ?>
25+
</tbody>
26+
<?php endif; ?>
2527
<?php endforeach; ?>
2628
</table>
2729
</div>

0 commit comments

Comments
 (0)