Reputation: 93
Suppose I have a variable like $something ="xyz_xyz". I want to add/concatenate this variable with the order email content in magento. So that, customer can see my variable output in email.
I have searched in google but can't understand the solution.How can i do this?
Here $something is actually dynamic variable. Please make me suggest also the file, file path and method which generates the order email .
Upvotes: 0
Views: 2984
Reputation: 2443
open file located at [magento]\app\code\core\Mage\Sales\Model\Order.php
locate function public function sendNewOrderEmail()
find
$something ="xyz_xyz";
$mailer->setTemplateParams(array(
'order' => $this,
'billing' => $this->getBillingAddress(),
'payment_html' => $paymentBlockHtml,
'custom' => $something //your custom value here
)
);
locate file [magento]\app\locale\en_US\template\email\sales\order_new.html
you can access your variable
{{var custom}}
hope this help you
Note: Don't change in core files instead override it
Upvotes: 4