Page 1 of 1

Displaying data using nVelocity variables

Posted: Fri Oct 05, 2007 4:04 pm
by Will
I am having difficulty figuring how to display product data in a scriptlet using nVelocity variables. I understand the concept and can get the ones you list in the documentation to show up just fine.

How do I figure out what other variables are available on a particular page?

I looked in the programmer.pdf you guys reference, but was unable to get it to work.

Example, on the product page, I assume we can pull in the value from a custom Merchant Field using an nVelocity variable. Looked at the "Product Object" chapter and couldn't see how the examples there map to nVelocity variables.

Thanks.

Posted: Fri Oct 05, 2007 4:20 pm
by nfortune
Programmer.pdf...?? I would like to obtain a copy as well if it it available..

Posted: Fri Oct 05, 2007 4:45 pm
by Logan Rhodehamel
nfortune wrote:Programmer.pdf...?? I would like to obtain a copy as well if it it available..
Me too! :shock:

That must be for the AC55 product, because AC7 has no equivalent reference. We will have a reference put together as soon as beta 2 is completed. This would display all merchant fields:

#foreach($tf in $Product.TemplateFields)
#if ($tf.InputField.IsMerchantField)
${tf.InputField.Name}: $tf.InputValue<br>
#end
#end

Hopefully that will get you in the right direction until a more comprehensive list of properties can be provided.

Posted: Fri Oct 05, 2007 6:06 pm
by Will
Your right, I was looking at the AC5 doc. Didn't occur to me that there wasn't one yet for AC7.

Sorry about that...

Posted: Fri Oct 05, 2007 6:12 pm
by Shopping Cart Admin
Hello Will,

It's very rough, however here's the API reference guide. It should get your Nvelocity variable questions handled.

viewtopic.php?t=5511

Posted: Sat Oct 06, 2007 11:35 am
by Will
Logan Rhodehamel wrote:
nfortune wrote:Programmer.pdf...?? I would like to obtain a copy as well if it it available..
Me too! :shock:

That must be for the AC55 product, because AC7 has no equivalent reference. We will have a reference put together as soon as beta 2 is completed. This would display all merchant fields:

#foreach($tf in $Product.TemplateFields)
#if ($tf.InputField.IsMerchantField)
${tf.InputField.Name}: $tf.InputValue<br>
#end
#end

Hopefully that will get you in the right direction until a more comprehensive list of properties can be provided.
Thanks -- this really helpful.