0

I am trying to build a PDF417 barcode generation for Order transactional email and for that I need some information from the order to pass to custom built phtml file, so javascript there can build a barcode image.

I am including custom phtml file into transactional template like this

{{block type='core/template' area='frontend' template='email/pdf417.phtml' }}

and I would like to be able to pass things like

{{var=$order.getCustomerName()}}

to this file, or get customer name directly in phtml file.

1

try this:

{{block type='core/template' area='frontend' template='email/pdf417.phtml' order=$order }}

this will allow you to pass the order object to the template file.
from here, you can call on the methods for the order object. you can get the order object in the template file like this:

$order = $this->getOrder()
| improve this answer | |

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.