Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 General help me questions
 email templates: changing definitions
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Justin
VP-CART New User

87 Posts

Posted - March 09 2005 :  19:48:22  Show Profile  Visit Justin's Homepage  Reply with Quote
Hi -

Could someone please tell me where I can find the definitions for the special codes (ie [orderamount]) used in the mailing templates? Specifically, I want to change the definition of [orderamount] to be read from the session variable "orderproducttotal" rather than "ordertotal"

Of course if there is already something called [oproducttotal] then that information would also help :)

Justin

devshb
Senior Member

United Kingdom
1904 Posts

Posted - March 10 2005 :  04:05:07  Show Profile  Visit devshb's Homepage  Reply with Quote
anything inside square brackets is assumed to be a database field unlesss it's been specifically coded-up as a separate special field.

All the special-template-fields are in shopfileio.asp

things like [orderamount] will just be taken directly from the orders.orderamount column.

if it's just a value that's to be taken from the record then it won't specifically be coded up in shopfileio.asp as by default it'll just try and grab it from the record's field.

in 5.5 there is a producttotal on the orders, and you can add that to the template without having to change anything in shopfileio.asp.

so, if you want to show a column's value, then just put the column name inside square brackets in the template.

(this is restricted in that it only relates to the actual record that's being queried in the template. ie you can't add a product or category column in an order email; to do that you'd need to create an extra template-field)

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons

Edited by - devshb on March 10 2005 04:07:32
Go to Top of Page

Justin
VP-CART New User

87 Posts

Posted - March 11 2005 :  00:29:18  Show Profile  Visit Justin's Homepage  Reply with Quote
ah ok - thanks! Here I was thinking it was reading from the session variables when it went to put together the email from the template. I'll try it out now (I was just too excited that I had to post to say thanks first! :) )

Justin

Go to Top of Page

Justin
VP-CART New User

87 Posts

Posted - March 11 2005 :  16:02:06  Show Profile  Visit Justin's Homepage  Reply with Quote
d'oh! Looks like I'll need to modify shopfileio.asp. That's no problem though - thanks for letting me know where I should be looking!

Justin

Go to Top of Page

devshb
Senior Member

United Kingdom
1904 Posts

Posted - March 12 2005 :  04:25:01  Show Profile  Visit devshb's Homepage  Reply with Quote
what value are you trying to show ?

if you're using templates, and want to display the product-only total amount on 5.5 then you should be able to just use:

[producttotal]

in the template without having to change shopfileio.asp

the key is to change the config option to use templates with order emails (set xemailwithtemplates to yes)

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons

Edited by - devshb on March 12 2005 04:25:36
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00