Page 1 of 1

How to Expose C# Values in Nvelocity

Posted: Mon Jul 09, 2012 4:18 am
by moustafa
Hi,

We're doing some custom programming and need to expose some variables through Nvelocity. If it was just the case of using the data in scriptlets, I could get around that by writing a simple control. While this would be overkill, it would work.

However, I have no idea how to expose values from C# (and ultimately, from the database) to email scripts. I guess I would have to do this via Nvelocity, but how?

Thanks,
Moustafa

Re: How to Expose C# Values in Nvelocity

Posted: Thu Jul 12, 2012 8:34 am
by mazhar
NVelocity variables are being added in back end codes so without change to backend source I don't think so if its possiable. Though there are some ways where you can pass some information into some of notifications. For example you can pass some data to New Order notification by placing your custom values in BasketItem.CustomFields which will trun into OrderItem.CustomFields and can be accessed in Order Notification.