Hi, I have added custom attributes to the order form in the community store backend. These work fine on the checkout and confirm pages, but do not show up in the emails generated by new_order_notification.php or order_receipt.php.
Though the script is in the php files and looks fine to me. Has anyone a suggestion as to why this is not working?
Thanks,
Una
<?php if (!empty($orderChoicesAttList)) { ?>
<tr>
<td colspan="2">
<h3><?= t("Other Choices")?></h3>
<?php foreach ($orderChoicesAttList as $ak) {
$orderOtherAtt = $order->getAttributeValueObject($ak->getAttributeKeyHandle());
if ($orderOtherAtt) {
$attvalue = trim($orderOtherAtt->getValue('displaySanitized', 'display'));
if ($attvalue) { ?>
<strong><?= $ak->getAttributeKeyDisplayName() ?></strong>
<p><?= str_replace("\r\n", "<br>", $attvalue); ?></p>
<?php }
}?>
<?php } ?>
</td>
</tr>
<?php } ?>