Skip to content

Commit 2b68fcd

Browse files
ENGCOM-5162: #22686 Shipment view fixed for Fatal error. #22687
- Merge Pull Request #22687 from cedcommerce/magento2:2.3-develop-shipment-api-fix - Merged commits: 1. 2e344f1
2 parents a2385d2 + 2e344f1 commit 2b68fcd

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)