I am stuck in my custom code.
I want to pass a user variable from an email template to a pthml file.
Edit file
Application / Code / Local / Mage / Sales / Model / Order.php
in this function:
public function sendNewOrderEmail()
{
--- default code start ----
$mailer->setTemplateParams(array(
'order' => $this,
'test' => 'XXXXX',
'billing' => $this->getBillingAddress(),
'payment_html' => $paymentBlockHtml
)
);
--- default code end ----
}
and then I put this code in the email template of the new order:
{{layout handle="sales_email_order_items" order=$order test=$test}}
template file located here:
Applications / locale / en_US / template / email / sales / order_new.html
and I'm trying to get a test variable here:
application / design / interface / default / default / template / email / order / product / order / default.phtml
like this: $test = $this->getItem()->getTest()
but it will not work. Please let me know where I am going wrong? or what needs to be done to access this variable in the phtml file?