Page 1 of 1

nVelocity Help

Posted: Mon Feb 23, 2009 2:43 pm
by heinscott
Hello. I have a hopefully easy question.
I have created a dataObject for returned items in our store. Now, I have both a field for ProductId (when it is a product) and for OrderItemId, when it is a valid orderItem. I have made references to the actual Product and OrderItem as members of this object... (ie, if "RI" is the object of ReturnsItem type, then RI.ActualProduct would be the ref to actual product). Now, I was able to include my ReturnsItem in an Email Template by adding the list of Return Items for an order to a parameter of the EmailTemplate (_EmailTemplate.Parameters.Add("returnItems",ri);
Okay, now this all works perfectly, and all local data members, such as price, quantity, etc. will show up just fine in my Emails. However, when I try to call the reference to the Product object, it seems that nVelocity is unable to resolve.
Here is how I have it calling...
${ri.ActualProduct.Sku}
...but it will never resolve with actual product Sku. This all works perfectly in a normal web context.
Any ideas?

Scott

Re: nVelocity Help

Posted: Mon Feb 23, 2009 3:10 pm
by heinscott
Sorry.
Disregard this message. Turns out a had a null Product Reference, and didn't know that nVelocity left the text that refered to it in the redered output.
Thanks anyway.

Scott