Sending Delivery Order email with XLS file attached

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by dan_metille on May 19, 2012 at 11:28am

Hi,

I'm trying to automatize my delivery process, and for this I need to send an email to the delivery company with an attached XLS file (eventually CSV or XML) recapitulating the following data:

  • Order #
  • Shipping method
  • Date
  • Client #
  • Shipping contact name + phone number
  • Shipping address
  • Line items with: product #, product name, product unit, quantity

My first approach was to use Views, Views data export and Rules, but I could not find a way to retrieve some data in Views, as the Shipping method for instance.

Maybe I should rather consider using the Commerce Order FTP Export module?

I would be glad if any one can help me to find the best way.

Thanks in advance,
.sahaj

Comments

I haven't done this yet but

Posted by markwk on May 19, 2012 at 11:40am

I haven't done this yet but it's on my list of TODOs for a project. I'm somewhat surprised when you say something aren't exposed to views. I'm somewhat doubtful this is the case since using Views to expose data is one of the defining principles in Drupal Commerce. Have you added all the proper relationships in Views itself?

If still not working, then you'll need to check in the code and add the proper views handlers. Shouldn't be too hard.

I'd say Views is the right route though.

Keep it simple. If your

Posted by vicgupta on May 19, 2012 at 12:54pm

Keep it simple. If your delivery company can take a CSV or XML, it is best to use it.

By default, the commerce order ftp export uses XML but can be modified to write CSV as well based on preset format agreed to by the delivery company.

I have modified the default commerce order ftp export XML and use this modified XML to send orders and product details to my delivery company.

How do you send the email

Posted by dan_metille on June 14, 2012 at 3:53pm

Dear VicGupta,

Thanks for your interesting post. Are you using Rules to send the email? Would you mind to give me more details about your solution?

Thanks in advance,
.sahaj

I too would love to know how

Posted by Red Rover on August 6, 2012 at 3:29am

I too would love to know how you've (presumably) set up Rules to send the email?

I too would also love to know how

Posted by melonkernel on October 5, 2012 at 7:03am

I would also like to know how to do this.

XML in the email body field.

Posted by monsoon on September 18, 2013 at 9:08pm

Hi, I am interested to know as well how have you solved this issue. I want to send xml format in email body to the site editor. Any help highly appreciated.

Thanks

Drupal Commerce

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /