Hey everyone,
I've been testing Views Bulk Operations in combination with Drupal Commerce. Specifically, I tried to send an e-mail ("Send e-mail" operation) by adding the bulk operations field to Drupal Commerce's orders and customer profiles views.
But when I try to use the operation, I'm taking to a screen where only fields for the subject and message are visible. There is no place to specify the recipient's e-mail address (nor the sender's address and screen name, unless the site default will be used). As a result, when trying to click "Next" to send a message, I'm getting the following drupal_set_message():
Enter a valid email address or use a token e-mail address such as [node:author:mail].
Are the visible fields for recipient and sender just missing?
Thanks,
Ben
Comments
Comment #1
bojanz commentedVBO in 6.x had some optimization where it tried to assume which token you wanted for the recipient field, so it can hide the recipient field.
That doesn't work in 7.x, and yet the field is still hidden.
Killed that code, so the recipient field should be there and work properly.
As for the sender field, no such thing, the sender is the website. This is a Drupal-provided action, so not much we can do (even if we wanted to).
Comment #2
BenK commentedHey bojanz,
I now see the recipient field... thanks! What I'm confused about is that I'm using this in conjunction with the Drupal Commerce "Orders" and "Customer profiles" fields, but I'm not sure what token to use for the recipient e-mail address for each. Since you're also involved with Drupal Commerce, do you happen to know this?
--Ben
P.S. Also, are the any other Drupal Commerce related bulk actions as part of VBO. All I see are core ones like "Delete" and "Send e-mail".
Comment #3
bojanz commentedI don't know, you can trying digging around [commerce-order:commerce-customer-billing]. The token support is still shaky everywhere (from Token to Entity API).
The core email sending action is very limited, using something like the Views Send modue (which requires VBO) is probably a better idea, but I think that one is not ported yet to D7.
VBO only provides a few most essential actions, and those are "pass ids to a url" and "delete item". You won't find anything Commerce specific because VBO shouldn't contain any custom actions or rules (would be a maintenance nightmare), it's job is just to run them if it finds them (it can run pretty much any drupal action, or rules component..). It's up to you to create them. I wonder why nobody created something like a VBO Action / Rule pack (like there's a Rules Bonus Pack for Rules), but oh well.