0

I am trying to get the phtml file data in email template as well as passing variable from email template to phtml file as like below code. but am not getting the data from phtml file

In email template

{{block type='core/template' area='frontend' template='reorder/related_products.phtml' quick=$emailTemplateVariables.customer_name }}

In phtml file:

 print_r($block->getData('quick'));
 print_r($this->getQuick());
 echo get_class($this->getQuick());
  • are you sending email from frontend or admin? – Qaisar Satti Sep 20 '16 at 10:34
  • Sending email from cron job – Ramesh Sep 20 '16 at 10:37
  • your related_products.phtml file is located in base/template? – Qaisar Satti Sep 20 '16 at 10:39
  • yes, in base/template/reorder/related_products.phtml – Ramesh Sep 20 '16 at 10:46
  • @Satti, template is working but can't pass the variable – Ramesh Sep 20 '16 at 10:47
0

in phtml file just write below code and it will work

echo $this->quick

I have try in my local and it works .

0

try with $customer_name

{{block type='core/template' area='frontend' template='reorder/related_products.phtml' quick= $customer_name }}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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