greatphoto
VP-CART Super User
USA
304 Posts |
Posted - July 03 2004 : 13:19:16
|
I second this request. The documentation gives a few examples of what is available, but little info on how to expand beyond the examples. Different FAQs and forum postings provide magical new variables that were otherwise unknown. The only way I know to do it right now is digging through the ASP code and comparing it to the examples.
Does anyone, such as Support, have a definitive list of [variables] and [functions] that can be referenced in the templates?
Nathan
|
|
|
greatphoto
VP-CART Super User
USA
304 Posts |
Posted - July 03 2004 : 19:40:05
|
Okay, here is a step in the direction of answering our question for ourselves.
First, this FAQ has a lot of info that wasn't in the Developer's guide: http://www.vpasp.com/virtprog/info/faq_templates.htm
Also, I recall from the developer's guide that any field from your database table can be referenced in the template. The trick is just figuring out the scope of the template based on its context. In other words, product templates only have access to fields in the product table, while category templates can only reference category fields. I'm not sure what fields email templates have access to because I haven't written them yet. Anybody want to answer that one?
The next trick is to know just what the field names are. They are generally hidden from you in the admin pages since other names are used. For example, the field labeled "More!" in the product entry form is really called "extendeddesc." How would you know that? Unfortunately, I don't think these are documented anywhere. You could probably dig it out of the ASP code directly, but I have done it by trial and error. I write something in the field blank and then view the table in its raw form to see where that value gets stored.
For example, type something random like "tracetest" in the "More!" field and save the entry. Then view the record in its raw form by either opening the database directly in Access or by clicking the "Edit" link at the top of the product entry form. Search down till you find the value "tracetest" and correlate it to the field name beside it!
Perhaps some other user will share the specific ASP file that quickly gives the relationship between the labels and the actual field names?
|
|
|