Sending Delivery Order email with XLS file attached

Events happening in the community are now at Drupal community events on www.drupal.org.
dan_metille's picture

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

markwk's picture

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

vicgupta's picture

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

dan_metille's picture

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

Red Rover's picture

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

melonkernel's picture

I would also like to know how to do this.

XML in the email body field.

monsoon's picture

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: