0

I am using Magento 1.9.3.7 version. I am triggering a mail from the observer with multidimensional array values. How I can get and use it in the mail template.

1 Answer 1

-1

We should include a block with the template from a current theme inside the email template instead, just like we do for CMS pages. See below:

{{block type='core/template' area='frontend' template='pathtotemplate/templatefilename.phtml' items=$items}}

Then, you just need to sort out your data in phtml-file, see the following example:

<?php foreach ($this->getItems() as $_item): ?>
<p><?php echo $_item['name'] ?></p>

I referred this link for the solution.

2
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review Commented Feb 26, 2018 at 6:38
  • 1
    @ManojDeswal Thanks for the comments. I changed the Answer. Commented Feb 26, 2018 at 7:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.