This causes formatted token replacement in rules to fail for commerce_price fields. Coincidentally, formatted tokens do work with the default field called commerce_price, but only because the field name is the same as the instance and tokens are keyed off of field name.
To reproduce, create a new instance of commerce_price field and try to use the formatted token in a system message or mail action.
I believe this can be easily fixed by adding "commerce_price_formatted_amount" as the default token formatter in the field info of the commerce_price field. See attached.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | default-token-formatter.patch | 1.87 KB | helior |
| price_field_default_token_formatter.patch | 524 bytes | dpolant |
Comments
Comment #1
helior commentedComment #2
helior commentedCoolio. I went ahead and also added a default_token_formatter for Commerce product reference field.
Comment #3
amateescu commentedLooks good.
Comment #4
rszrama commentedThanks for the patches and review -> committed!
Comment #6
foopang commentedNot sure if it is relevant, I just wonder if it is possible to use a different price formatter other than default with dynamic tokens.