Adding comment to an excisting order
I've set up a commerce site with a couple of contrib modules: shipping, paypal & ogone. For shipping my customer would like to use FedEX and he wants to add a tracking number to the order overview so his customers can track it on the FedEX website.
Could anyone give me some tips on how to do this.
thx
Comments
Instructions
I was able to figure this out thanks to the IRC chat room (Thanks bojanz!).
Anyone have an idea on how to
Anyone have an idea on how to add a link, including the tracking number, to open the shippers tracking page?
I have the URL's, I just can't quite figure out how get the tracking number from the text field to include it in the URL in the link field.
Or, is there a better/another way to do it.
For anyone that might be
For anyone that might be interested, here is my solution:
Building out #3 via rules I configured a rule:
Event: After saving an existing commerce order
Conditions:
Data Comparison: commerce-order:type equals Order
AND
NOT Data value is empty - commerce-order:field-tracking-number (check the negate checkbox)
AND
Data Comparison: commerce-order:status equals Completed
AND
NOT Data Comparison: commerce-order:status equals commerce-order-unchanged:status (check the negate checkbox)
Actions:
Send Email - to address: [commerce-order:owner:mail] use [commerce-order:field-tracking-number] as your tracking # in the body.
The machine name of my field is: field_tracking_number (for the second condition)
The above solution will send an email to the order owner's email address when the order status is set to completed and a tracking number is present.
In my case I also added an additional Boolean field called "field_tracking_email_sent" to indicate to my admins that an email had already been sent. This field is a single on/off checkbox. I added a condition to check it was empty and added an action to set the value when the rule is triggered.
With this approach, the admin can uncheck the box, set the order to pending and then reset the order to completed to have the tracking # sent again.
Thanks snowfox and tars16, I
Thanks snowfox and tars16, I'm now easily sending tracking number to our clients.
I added two things for my needs:
1. Mime Mail module for sending HTML email from Rules
2. Adding the first and last name of the order owner with tokens. Check this link on how to bring the fields into scope:
http://drupal.stackexchange.com/questions/49094/selecting-first-name-of-...