Question

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.

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à magento.stackexchange
scroll top