Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First thing is you were editing core files. This is not appreciated. You can get shipping email easily from controllers. Using Event Absorber is good method than over writing files. But that is hard to compare over writing .</p> <p>Just overwrite the OnepageController.php at core->Mage->checkout->controllers.</p> <p>Here is the code, </p> <pre><code>include_once("Mage/Checkout/controllers/OnepageController.php"); class Pakagename_Modulename_OnepageController extends Mage_Checkout_OnepageController { public function saveBillingAction() { if ($this-&gt;_expireAjax()) { return; } if ($this-&gt;getRequest()-&gt;isPost()) { // $postData = $this-&gt;getRequest()-&gt;getPost('billing', array()); // $data = $this-&gt;_filterPostData($postData); $data = $this-&gt;getRequest()-&gt;getPost('billing', array()); $customerAddressId = $this-&gt;getRequest()-&gt;getPost('billing_address_id', false); if (isset($data['email'])) { $data['email'] = trim($data['email']); } </code></pre> <p>Here the problem is customer may use different email for shipping and billing. So you need to checkout both shipping and billing save actions. </p> <p>add to session</p> <pre><code>$email = $data['email']; Mage::getSingleton('core/session')-&gt;setMyValue($email); </code></pre> <p>Then here I assume that you were trying to edit order e-mail template. 1) Edit sendNewOrderEmail() function located in</p> <p>app/code/core/Mage/Sales/Model/Order.php</p> <pre><code>$my_email = Mage::getSingleton('core/session')-&gt;getMyValue(); $mailer-&gt;setTemplateParams(array( 'order' =&gt; $this, 'billing' =&gt; $this-&gt;getBillingAddress(), 'payment_html' =&gt; $paymentBlockHtml, 'my_email' =&gt; "$my_email" //New custom value )); </code></pre> <p>Then hereafter you can fetch that email like this </p> <pre><code>{{ var my_email }} </code></pre> <p>If you want edit invoice template then you should find out corresponding function to define custom email variable. That's all..!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload