Vote up!
Vote down!

Shipping Service Notification

How can I display the shipping service used, to the customer and store on the order completion emails (cloned customer rule for store notiification-changed email) but without knowing how to ship a package the order dept has to come see me each time or login and pull up the order.

drupal 7

kickstart commerce .26

Asked by: SBS_JR
on July 30, 2015


After trying to solve this through Rules for a long time I think I found a solution. I just implemented this afternoon, so if I discover unwanted side effects I will post, but wanted to document this.

Under the Rules action "Send HTML e-mail" there is already a replacement pattern for Line Items [commerce-order:commerce_line_items] As I understand it, Shipping Service IS a Line Item on the order. This token is driven by the View "Line items (Commerce Line Item)" which by default has a Filter "Commerce Line Item: Line item is of a product line item type". Once I removed that filter, the shipping service appeared in the same table below the products that were in the order.

Further, the field "Commerce Line Item: Type (Type)" is included in the output of that View, however it is checked "Exclude From Display". I unchecked that and moved that field such that it is below Commerce Line Item: Label (Label) and now the Line Item's Type (Product, Shipping, etc.) is reported in the email in a column between the item's Title and Unit Price.

- Greg S on November 29, 2017

1 Answer

Vote up!
Vote down!

The tokens can be manipulated here:


The shipping service, by default, shows up in the order summary. Along with taxes and discounts, using this variable:


You could use https://www.drupal.org/project/commerce_extra_tokens as a base from which to create your own tokens available in the messages like this:


But that would require additional PHP programming.


Josh Miller
Answer by: Josh Miller
Posted: Aug 4, 2015