Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Are there any plans to add token support?
It would be really useful if there was something like [commerce-order:commerce-customer-billing:commerce-customer-address:phone_number]
.
Comment | File | Size | Author |
---|---|---|---|
#8 | 1969696.8-phone-field-tokens.patch | 2.1 KB | ericjenkins |
#2 | 1969696.2-phone-field-tokens.patch | 2.28 KB | deviantintegral |
Comments
Comment #1
jcisio CreditAttribution: jcisio commentedNo plan now. But patch is of course welcome.
Comment #2
deviantintegral CreditAttribution: deviantintegral commentedTada!
Comment #3
jcisio CreditAttribution: jcisio commentedI don't have time now to test, but the patch looks good and self explained. Anyone can test?
Comment #4
stonk CreditAttribution: stonk commentedI have added this to our site and, so far, it seems to be working perfectly. If I find any faults I will report them here.
Thanks for the patch.
Comment #5
Zoltan Komar CreditAttribution: Zoltan Komar commentedIf apply this patch, i got other problem with address fields. And when i got order report e-mail, the Name, State, Stree etc field change "Array" result.
Comment #6
ericjenkins CreditAttribution: ericjenkins commentedI had the same problem as zedspeirs, where my phone number tokens worked but my other addressfield tokens began displaying "Array" instead of the correct token values. I fixed it by adding a nested if statement to the patch, like so:
I am not sure if this change is the ideal way to fix this bug. But it's working for me, pending further testing.
Comment #7
Zoltan Komar CreditAttribution: Zoltan Komar commentedYep, #6 patch working fine.
Comment #8
ericjenkins CreditAttribution: ericjenkins commentedAttached is a proper patch file reflecting my change noted in #6.
Comment #10
jcisio CreditAttribution: jcisio commentedThanks. I've fixed some coding standard, add support for the language option etc. to keep synchronized with Addressfield token support.