nVelocity usage

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

nVelocity usage

Post by jmestep » Sat Nov 01, 2008 7:44 am

I've been looking thru the source code to find out how nVelocity has been integrated with Able and possibly how to add other parameters/events. In the StoreEventEngine.cs and ScripletPart.cs, there are references to things like

Code: Select all

  parameters["order"] = order;
            parameters["customer"] = order.User;
            parameters["oldstatusname"] = oldStatusName;
            ProcessEmails(StoreEvent.OrderStatusUpdated, parameters);
Is that where they get integrated with nVelocity? So anything in the classes for store, order, users, products, payments? The Able wiki reference doesn't show events, for example. Is anything in the Stores namespace available for parameter usage?
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

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

Re: nVelocity usage

Post by mazhar » Mon Nov 03, 2008 6:06 am

One way for custom parameters support in the StoreEngine could be that you write a custom function with one parameter of type hashtable. Then you can call that function of store engine providing it the custom hashtable with parameters. for example

Code: Select all

Hashtable parameters = new Hashtable();
parameters.Add("myuser", Token.Instance.User);
parameters.Add("mycustomint", 123);
StoreEventEngine.MyCustomFunction(parameters)
You can add any ablecommerce object in the parameters. These custom parameters will be available to you when sending the Email. So you can write NVelocity code using these custom parameters inside your template.

dnoell
Ensign (ENS)
Ensign (ENS)
Posts: 19
Joined: Mon Jul 07, 2008 9:36 am

Re: nVelocity usage

Post by dnoell » Mon Dec 15, 2008 11:48 am

This may be a dumb question but where are StoreEventEngine.cs and ScripletPart.cs located?

Thanks,

David Noell

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

Re: nVelocity usage

Post by mazhar » Mon Dec 15, 2008 12:51 pm

These are classes in API source code.

dnoell
Ensign (ENS)
Ensign (ENS)
Posts: 19
Joined: Mon Jul 07, 2008 9:36 am

Re: nVelocity usage

Post by dnoell » Mon Dec 15, 2008 12:58 pm

Thank you for your response. I looked through all of the site pages and code and didn't find them. I appreciate the confirmation.

David Noell

Post Reply