- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2020
09:01 AM
08-06-2020
09:01 AM
Email templates - show or hide some text based on the product type
I'd like to show or hide some text in New Order email templates based on the product type.
If it's a Downloadable product, I need to show download instructions; otherwise don't show them.
In the email template, how can I get the product type?
Or is this the wrong way to go about this?
Labels:
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2020
09:23 AM
08-06-2020
09:23 AM
Re: Email templates - show or hide some text based on the product type
Hi @MacEwen
You can get product type with the below code:
$item->getProductType();
You can check the code with the below solution URL for sending order email flow :
You can custom your code to get ProductType and update your text accordingly.
Hope this helps you!
Problem Solved! Click Kudos & Accept as Solution!
Problem Solved! Click Kudos & Accept as Solution!