While the shortcode [commerce-order:commerce-email-order-items] is used to send several commerce emails, it does not includes SKU code. How can I add sku code or edit the output of [commerce-order:commerce-email-order-items]

2 Answers 2


Some tokens are generated by code others by views. This token is generated by code

So edit commerce_email.module and around line 420 you will see commerce_email_order_items function here you can add the sku.

Take in mind that this is not an ideal solution See hook_tokens_alter

  • This is a bad idea.
    – apaderno
    Jan 12, 2015 at 17:28
  • Yes it is, but i could not find another way of doing this. there is some kind of hook to alter tokens? Jan 12, 2015 at 17:38
  • hook_tokens_alter() is indeed the way to alter tokens implemented by other modules. I would be surprised if there isn't a token for the SKU code; if there isn't, a module could be created to implement it with hook_tokens() e hook_tokens_info().
    – apaderno
    Jan 12, 2015 at 21:12
  • There should be a sku token, thats for sure. But as commerce_email does not let you change/add tokens/fields or whatever to its order-summary-table function because it is hardcoded i think the propper way is with hook_tokens_alter Jan 12, 2015 at 21:28

The best way:

  • Go to: admin/structure/views/view/commerce_cart_summary/edit/

  • Under Fields you should change: Commerce Belegzeile: Product Erscheint in: commerce_line_item:product, commerce_line_item:product_discount.

  • Set the same settings from: admin/structure/views/view/commerce_cart_form/edit/

  • Delete the line for the Title.

Now you can change the output over the product-variation-types-sites under Basket: admin/commerce/config/product-variation-types/

Now you have a very good looking and adjustable order confirmation email.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.