1

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]

0

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. – kiamlaluno Jan 12 '15 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? – Gianni Di Falco Jan 12 '15 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(). – kiamlaluno Jan 12 '15 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 – Gianni Di Falco Jan 12 '15 at 21:28
0

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, privacy policy and cookie policy

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