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
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
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
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
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
I would also like to know how to do this.
XML in the email body field.
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