Add shipping method name to order

Hi,

Thanks for your help previously getting the phone number displayed:

[quote]'%shipping_phone' => $this->data['customer']['phone'],[/quote]

I am trying to add the shipping method to the order confirmation email but can't get it to work. Can you please help to let me know how to define the aliases.  I have tried:

[quote]'%shipping_option_name_display' => $this->data['shipping_option'],

'%shipping_option_name_display' => $this->data['shipping_option'][preg_replace('#^(shippingoption)#', '', $field)],[/quote]

But neither of these works.

tim

Try 
$this->data['shipping_option']['name']

Thanks for the reply.  I have two shipping methods (Standard Post & Express Post).  However, the above code will just display "Australia" for both of them.

Thanks for the reply.  I changed the option(s) around a bit in the shipping modules before when I removed the weight from displaying in the checkout. So now I realise that I am actually hoping for it to display the shipping option description (or the module title translation).

I tried defining the alias:

'%shipping_option_name_display' => $this->data['shipping_option']['description'],

But this displays an empty result?

tim

Shipping description is not copied to the order object. Only id, name (and title).

What is it that you are trying to do?

I was wanting to get as much of the order information into the email as possible (including name, shipping address, phone number, shipping method), so that 
(1) There's a written confirmation of it that is permanently stored in email history (in case of server going down etc)
(2) Emails can be searched to find an order based on name, postcode, suburb, phone number etc.
(3) Can set up an email filter for orders placed with Express shipping to be forwarded to an email address or SMS gateway

From your previous help, I had setup the name, address & phone number to be included in the email :)

With the shipping method, I ended up rearranging/renaming the options array values (name, description) so that in the checkout there wasn't a duplication of information being shown for the shipping method.  Now an appropriate shipping method options array name shows up in both the checkout and in the order confirmation email.

Thanks again for your help.

Questo thread è stato chiuso per lunga inattività. Non è possibile postare su di esso.
View code on GitHub