0

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

1 Answer 1

0

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 ...

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.