Not really me asking for this, but posting to help the user who posted it here...
http://www.drupalcommerce.org/questions/3789/how-email-product-key-using...
"I have successfully hooked Drupal Commerce, Commerce Product Key, and Commerce PayPal in my dev site and test purchases show that keys are being assigned to completed purchases.
The issue: I'm trying to create a workflow rule (Send mail) that will automatically email the product key to the purchaser, but, I can't find any tokens to use (none are listed in REPLACEMENT PATTERNS). I've tried looking through the huge list in the Pathauto module, but did not find one either. So how do I call on it so that a product key can be sent through email after completing the purchase?
Thanks,
Mike"
Comment | File | Size | Author |
---|---|---|---|
#6 | commerce_product_key-tokens-1777032-6.patch | 4.92 KB | samalone |
#3 | commerce_product_key-tokens-1777032-3.patch | 4.79 KB | samalone |
#2 | commerce_product_keys-tokens-1777032-2.patch | 4.66 KB | samalone |
Comments
Comment #1
Zem CreditAttribution: Zem commentedI am trying to do the same thing. I have tried to do this step by step using components in rules but for now I haven't been able to do this. Looking forward to some kind of solution or idea how to achieve it. If I was capable I would pitch in and help but my knowledge is still not enough after mere 4 month developing with drupal.
Comment #2
samalone CreditAttribution: samalone commentedI needed this as well, so today I coded it up myself.
My patch is below. It adds several replacement tokens that can be used in checkout panels, system messages, and email:
Useful for emails.
Useful for system messages and checkout panels.
Comment #3
samalone CreditAttribution: samalone commentedThis revised patch fixes a typo that was preventing the 'commerce-product-keys' token type from being defined.
Comment #4
lathanLess some white space issues this patch looks good.
Comment #5
lathanPatch is failing for me please rebuild it against master, and fix white space issue.
git apply -v commerce_product_key-tokens-1777032-3.patch
commerce_product_key-tokens-1777032-3.patch:25: trailing whitespace.
commerce_product_key-tokens-1777032-3.patch:29: trailing whitespace.
commerce_product_key-tokens-1777032-3.patch:34: trailing whitespace.
commerce_product_key-tokens-1777032-3.patch:63: trailing whitespace.
commerce_product_key-tokens-1777032-3.patch:69: trailing whitespace.
Checking patch .gitignore...
Checking patch README.txt...
error: while searching for:
And you are ready to go.
error: patch failed: README.txt:24
error: README.txt: patch does not apply
Checking patch commerce_product_key.tokens.inc...
Comment #6
samalone CreditAttribution: samalone commentedOkay, I've re-applied my edit to README.txt and fixed the trailing whitespace in commerce_product_key.tokens.inc. New patch against current master is attached.
Comment #7
Ashish Madkaikar CreditAttribution: Ashish Madkaikar commented1. I copied commerce_product_key.tokens.inc as sites/all/modules/commerce_product_key/commerce_product_key.tokens.inc,
2. Cleared the cache but still don't see the tokens in the "Send Email" action of "Assign product key to user and order" rule.
what is it that i am missing here?
UPDATE ----------
My mistake ..the server file was replaced for some reason i don't know. Thanks
Comment #8
cmseasy CreditAttribution: cmseasy commented#6 works perfect: thanks.
Comment #10
lathancommitted.