Active
Project:
Commerce Core
Version:
7.x-1.8
Component:
Price
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Aug 2013 at 08:20 UTC
Updated:
12 May 2021 at 09:37 UTC
Jump to comment: Most recent
I needed to customize an order confirmation email using commerce_message and was surprised that the commerce_order_total field token does not have any of its components broken out into separate tokens.
The commerce_order_total components I needed were base-price, shipping, VAT.
I was able to declare the tokens i needed using hook_token_info(). Then to replace the token values implemented hook_tokens().
These should already be available in commerce-order tokens but they are not.
The tokens for the base-price, tax, vat, shipping components should be there as a bare minimum!
Have I missed something?
Comments
Comment #0.0
inventlogic commentedgrammar
Comment #1
summit commentedHi,
I completely agree with @inventlogic. These tokens are very necessary .
In Europe we need to add VAT most of the time to the shipping. This needs to be correctly shown on the orderform and email through tokens.
With these tokens at the minimum: base-price, tax, vat, shipping this can be handled.
Greetings, Martijn
Comment #2
summit commentedHi, I build this short term solution: http://www.drupalcommerce.org/questions/9046/add-tokens-commerce-order-t... but can;t get it to work yet...
I know this is not the correct solution, but he, you do what you can...
Greetings, Martijn
Comment #2.0
summit commentedlayout
Comment #3
pasquallehttps://www.drupal.org/sandbox/bgilhome/2854058