Show OrderNote in order confirmation Email?
Show OrderNote in order confirmation Email?
Hello,
I am wondering whether OrderNote info can be displayed in the order confirmation Email? Does anybody know which object/file is responsible for sending order confirmation emails?
Thanks.
I am wondering whether OrderNote info can be displayed in the order confirmation Email? Does anybody know which object/file is responsible for sending order confirmation emails?
Thanks.
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Show OrderNote in order confirmation Email?
You would have to see if you can add it to the Order confirmation email template which is located at Configure-->Email-->Templates. You can probably get the code from the Note added by Customer template which can be generated when there is an order note added. It would be something like this, but you would probably need to put code on it to get the first note added.
On ${note.CreatedDate}, a new message was added to <a href="${store.StoreUrl}Admin/Orders/OrderHistory.aspx?OrderId=$order.OrderId">Order Number $order.OrderId</a></strong></p>
<p><strong>Customer said:</strong></p>
<p>${note.Comment}</p>
On ${note.CreatedDate}, a new message was added to <a href="${store.StoreUrl}Admin/Orders/OrderHistory.aspx?OrderId=$order.OrderId">Order Number $order.OrderId</a></strong></p>
<p><strong>Customer said:</strong></p>
<p>${note.Comment}</p>
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Re: Show OrderNote in order confirmation Email?
Thank you for the advice.jmestep wrote:You would have to see if you can add it to the Order confirmation email template which is located at Configure-->Email-->Templates. You can probably get the code from the Note added by Customer template which can be generated when there is an order note added. It would be something like this, but you would probably need to put code on it to get the first note added.
On ${note.CreatedDate}, a new message was added to <a href="${store.StoreUrl}Admin/Orders/OrderHistory.aspx?OrderId=$order.OrderId">Order Number $order.OrderId</a></strong></p>
<p><strong>Customer said:</strong></p>
<p>${note.Comment}</p>
I agree with you. However, I am having trouble locating which file I shall put my code in. Would you shine some more light on me please ? Thanks!
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Show OrderNote in order confirmation Email?
Is this note something a customer does in the checkout process and they are not using the one for the shipping message?
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Re: Show OrderNote in order confirmation Email?
Something like this would probably work:
#foreach($note in $order.Notes)
$note.Comment <br/>
#end
I think the $order object is available to most nVelocity templates. Give it a shot and see if it works.
the note object is of type OrderNote if you want to look it up in the API.
#foreach($note in $order.Notes)
$note.Comment <br/>
#end
I think the $order object is available to most nVelocity templates. Give it a shot and see if it works.
the note object is of type OrderNote if you want to look it up in the API.
Re: Show OrderNote in order confirmation Email?
What I am trying to do is to store "Delivery Date" and "Delivery Time" in the order. OrderNote may not be the desirable place to store the information. (I could not get it to work anyways ...
) I have decided to record the date and time in Shipment.ShipMessage. However, I still could not display the information in the "Order Confirmation Email".
My Code:
#foreach($shipment in $order.Shipments)
$shipment.ShipMessage.ToString()
#end
The data has been saved in the database, in OrderShipments.ShipMessage. But it shows an empty string in the email. Would anybody please point me out where I am doing wrong? Thank you!

My Code:
#foreach($shipment in $order.Shipments)
$shipment.ShipMessage.ToString()
#end
The data has been saved in the database, in OrderShipments.ShipMessage. But it shows an empty string in the email. Would anybody please point me out where I am doing wrong? Thank you!
Last edited by pbhavsar on Fri Nov 14, 2008 3:13 pm, edited 1 time in total.
Re: Show OrderNote in order confirmation Email?
Based on your code, I think you would want to do:pbhavsar wrote:My Code:
#foreach($shipment in $order.Shipments)
$shipment_date.ShipMessage.ToString()
#end
Code: Select all
$shipment.ShipMessage
the ToString is unnecessary since the value is already a string.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
Re: Show OrderNote in order confirmation Email?
Hi Joe Payne,
Sorry about that, it was a typo in my post. I have corrected it.
However, the problem remains.
Sorry about that, it was a typo in my post. I have corrected it.
However, the problem remains.
Re: Show OrderNote in order confirmation Email?
First of all this code will not work and will not send any thing because Email is sent when order is placed and actually at that time there is no order note available at all. The correct way is as described by Joe. The ShipMessage is infact the delevery instruction available with shipping. In order to make it available on OnePageCheckout first set the EnableShipMessage property the OnePageCheckout by setting it to true. Then use the following code in your OrderConfirmation Email tempalte.#foreach($note in $order.Notes)
$note.Comment <br/>
#end
Code: Select all
#foreach($shipment in $order.Shipments)
$shipment.ShipMessage
#end