<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// phpcs:disable Magento2.Templates.ThisInTemplate

/** @var $block \Magento\Sales\Block\Order\Email\Items\DefaultItems */

/** @var $_item \Magento\Sales\Model\Order\Item */
$_item = $block->getItem();
$_order = $_item->getOrder();
$_product = $_item->getProduct();
/*$block = $this->getLayout()->getBlock('item_price');
$block->setItem($item);
return $block->toHtml();*/
?>
<tr>
    <td align="left" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;">
    	<strong style="font-size:11px;"><?= $block->escapeHtml($_item->getName()) ?></strong>
    </td>
    <td align="left" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;">
    	<?= $block->escapeHtml(str_replace('1000ml', '1L', $_product->getAttributeText('spi_inhalt'))) ?>
    </td>
    <td align="left" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;">
		<?= $block->escapeHtml($_product->getData('spi_sku')) ?>
	</td>
    <td align="center" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;">
    	<?= (float) $_item->getQtyOrdered() ?>
    </td>
    <td align="center" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;">
    	<span class="price"><?= /* @noEscape */ $_order->formatPrice($_item->getPriceInclTax()) ?></span>
    </td>
    <td align="right" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;">
        <span class="price"><?= /* @noEscape */ $block->getItemPrice($_item) ?></span>
</tr>
<?php if ($_item->getGiftMessageId()
    && $_giftMessage = $this->helper(\Magento\GiftMessage\Helper\Message::class)
        ->getGiftMessage($_item->getGiftMessageId())
) : ?>
    <tr>
    <td colspan="3" class="item-extra">
        <table class="message-gift">
            <tr>
                <td>
                    <h3><?= $block->escapeHtml(__('Gift Message')) ?></h3>
                    <strong><?= $block->escapeHtml(__('From:')) ?></strong> <?= $block->escapeHtml($_giftMessage->getSender()) ?>
                    <br /><strong><?= $block->escapeHtml(__('To:')) ?></strong> <?= $block->escapeHtml($_giftMessage->getRecipient()) ?>
                    <br /><strong><?= $block->escapeHtml(__('Message:')) ?></strong>
                    <br /><?= $block->escapeHtml($_giftMessage->getMessage()) ?>
                </td>
            </tr>
        </table>
    </td>
</tr>
<?php endif; ?>
