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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.