php - Magento - Custom subject of order email -


I have a service in PHP that interacts with a Magento website. I can not access the source code for this website. That's why I can use the service to order the product and send a mail. When I call

  $ order-> sendNewOrderEmail ();  

My email-ID will be sent with the subject Nuovo ordine # XXXXXXXXX .

Now I want to add a string to the subject: Examination - NewuOrdin # XXXXXXXXX .

How can I do this?

in the app / code / core / pimple / sale / model / order. PHP find sendNewOrderEmail () method Then

  $ mailer-> Settlement param (array ('order' => $ this, 'billing' = & gt; $ this-> getBillingAddress (), 'payment_hebble' => $ paymentBLOCKHtml); Here is the array of variables from a template. Add a new param for testing:  
  'test' = & gt; $ Is_test? $ Is_test: ''  

Change the $ is_test in your status. For example:

  public function sendNewOrderEmail ($ is_test = FALSE)  

Now your template file app / locale / en_US / template / email Open /sales/order_new_guest.html (for example).

Find the subject variable on the first line: or something like that.

Change: & lt ;! - @ Subject {{var is_test}} Nuovo ordine # {{var order.increment_id}} @ - & gt;

Call method:

  $ order-> sendNewOrderEmail ('test -');  

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -