Skip to content

Instantly share code, notes, and snippets.

@thomascharbit
Last active March 14, 2023 15:39
Show Gist options
  • Save thomascharbit/5e1df2e1e401b6e31d5e6021f101ed41 to your computer and use it in GitHub Desktop.
Save thomascharbit/5e1df2e1e401b6e31d5e6021f101ed41 to your computer and use it in GitHub Desktop.
<?php var_dump($this->getData()); ?>
<?php $item = $block->getItem(); ?>
<?php $order = $block->getOrder(); ?>
<?php $orderItem = $item->getOrderItem(); ?>
<tr>
<td style="vertical-align: top;<?= $orderItem->getParentItemId() ? 'padding: 0px 20px 5px 10px;' : 'padding: 10px 20px 5px 0;' ?>">
<div style="<?= $orderItem->getParentItemId() ? '' : "font-family: 'josefinsans', sans-serif; font-size: 14px; font-weight: bold; text-transform: lowercase; letter-spacing: .2em;" ?>">
<?= $block->escapeHtml($item->getName()); ?>
</div>
<?php if ($productOptions = $block->getProductOptions($item)) : ?>
<br>
<div><?= $block->escapeHtml($productOptions, ['br']); ?></div>
<?php endif; ?>
<?php if (!$orderItem->getParentItemId()) : ?>
<?php if ($block->mustDisplayCustomsInfos($order)) : ?>
<?php if ($item->getPrice() == 0) : ?>
<br>
<div style="font-family: 'josefinsans', sans-serif; font-weight: bold;">
<?= __('Offered') ?>
</div>
<?php endif; ?>
<?php if ($orderItem->getProduct() && $orderItem->getProduct()->getData('nose_product_hs_code')) : ?>
<br>
<div>
<?= $block->escapeHtml(__('HS Code: %1', $orderItem->getProduct()->getData('nose_product_hs_code'))); ?>
</div>
<?php endif; ?>
<?php if ($address = $this->getManufacturerAddress($item)) : ?>
<br>
<div style="font-family: 'josefinsans', sans-serif; font-weight: bold;">
<?= $block->escapeHtml($address); ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
</td>
<td>
<?= $block->escapeHtml($item->getSku()); ?>
</td>
<td>
<?= $block->formatPrice($item->getPriceInclTax(), true, false) ?>
</td>
<td>
<?= $block->escapeHtml($item->getQty()); ?>
</td>
<td class="last">
<?= $block->formatPrice($item->getRowTotalInclTax(), true, false) ?>
</td>
</tr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment