Could anyone kindly suggest how I could have my product’s short description shown in a customer order confirmation email?
I am currently running Magento (Community) 2.4.2.
I’ve attempted to add the following code to my theme @ “THEME/Magento_Sales/templates/items/order/default.phtml”. I get the surrounding HTML code, but no data returned.
<td class="item-info<?= ($block->getItemOptions() ? ' has-extra' : '') ?>">
<p class="product-name"><?= $block->escapeHtml($_item->getName()) ?></p>
<-- TRYING TO GET SHORT DESCRIPTION HERE -->
<p class="short-desc"><?= $block->escapeHtml($_item->getShortDescription()) ?></p>
<p class="sku"><?= $block->escapeHtml(__('SKU')) ?>: <?= $block->escapeHtml($block->getSku($_item)) ?></p>
<?php if ($block->getItemOptions()) : ?>
<dl class="item-options">
<?php foreach ($block->getItemOptions() as $option) : ?>
<dt><strong><em><?= $block->escapeHtml($option['label']) ?></em></strong></dt>
<dd>
<?= /* @noEscape */ nl2br($block->escapeHtml($option['value'])) ?>
</dd>
Any suggestions on how to achieve this are greatly appreciated.