I am trying to edit the confirmation email which the client is receiving upon making a new order. So far I've managed to style it up but I am not able to add collumn which can display the product size number which has been picked. Could someone please tell me how can I add this product attribute in the email. I have tried to follow this Get product attritube in order confirmation email but I am not able to display the size still. Thanks
I think help some code try In <Vendor>/Email/Block/Order/Email/Items/DefaultItems.php
I put
public function getProductModel($id)
{
$product = $this->productFactory->create()->load($id);
return $product;
}
and in <Vendor>/Email/view/frontend/templates/email/items/order/default.phtml
I've called the method like so:
$_product = $block->getProductModel($_item->getProductId());
<?php echo $_product->getAttributeText("lead_time_title"); ?>
And more information read this link :-
Magento 2: Add Custom Attribute to New Order Transactional Emails
Hope this help you
Thanks ...