Display salutation in order details

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
michaelatnicsys
Ensign (ENS)
Ensign (ENS)
Posts: 7
Joined: Fri Nov 13, 2009 4:08 pm

Display salutation in order details

Post by michaelatnicsys » Fri Nov 13, 2009 4:14 pm

I have added salutation to the billing/shipping addresses successfully via the following link:

viewtopic.php?f=42&t=11027

My question is now, how do I display that in emails/reports/receipt pages that use the order.BillingFirstName, etc, fields (instead of the user.FirstName, user.Nickname, etc, fields?

Thanks

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Display salutation in order details

Post by mazhar » Mon Nov 16, 2009 6:24 am

Try this statement

Code: Select all

order.User.PrimaryAddress.Nickname

michaelatnicsys
Ensign (ENS)
Ensign (ENS)
Posts: 7
Joined: Fri Nov 13, 2009 4:08 pm

Re: Display salutation in order details

Post by michaelatnicsys » Wed Dec 02, 2009 11:29 am

I got this error when trying to send an email:

Some error has occurred while parsing email template. Please fix the email template 'Customer Order Notification' before trying to send email. Error details:
Lexical error: NVelocity.Runtime.Parser.TokenMgrError: Lexical error at line 132, column 36. Encountered: "u" (117), after : "&" at NVelocity.Runtime.Parser.Parser.Directive() at NVelocity.Runtime.Parser.Parser.Statement() at NVelocity.Runtime.Parser.Parser.Process() at NVelocity.Runtime.Parser.Parser.Parse(TextReader reader, String templateName)

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Display salutation in order details

Post by mazhar » Thu Dec 03, 2009 3:12 am

Don't forget to place $sign before variable name like

Code: Select all

$order.User.PrimaryAddress.Nickname

michaelatnicsys
Ensign (ENS)
Ensign (ENS)
Posts: 7
Joined: Fri Nov 13, 2009 4:08 pm

Re: Display salutation in order details

Post by michaelatnicsys » Thu Dec 03, 2009 2:44 pm

I'm sorry I forgot to mention, I did include the $

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Display salutation in order details

Post by mazhar » Fri Dec 04, 2009 8:14 am

Then possibly you may have corrupted the Email template some how, one possibility is that you edited Email template via FCK editor. This is a known problem that FCK corrupts NVelocity scripts. Give a try restore default template and then make change directly in the text area by locating desired location instead of opening it FCK editor.

michaelatnicsys
Ensign (ENS)
Ensign (ENS)
Posts: 7
Joined: Fri Nov 13, 2009 4:08 pm

Re: Display salutation in order details

Post by michaelatnicsys » Thu Dec 10, 2009 4:48 pm

Yes that is indeed what happened.

Thanks, your suggestion worked.

Post Reply