Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 VP-Cart 8.0 Hint''s and Tips
 INCLUDE function
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

manilow
VP-CART New User

France
134 Posts

Posted - November 02 2020 :  13:24:35  Show Profile  Visit manilow's Homepage  Reply with Quote
Despite the fact that I use vpcart for over 10 years now, I just discovered a handy function in the shopfileio.asp file: INCLUDE

This function allows you to embed a template in another. I use it to add a header and a footer to my Email messages. The instruction is as follows:
[templates/your_template_folder/tmp_emailheader.htm INCLUDE]

If you write this instruction at the top of an Email template, it will insert the html of the tmp_emailheader.htm. You can even use other instructions between square brackets in the header template.

You need to write the full path to the template file (with templates/your_template_folder/..).

I hope this is useful for you.

Erik
aquathermia.com

madison
Starting Member

United Kingdom
47 Posts

Posted - March 11 2021 :  14:47:51  Show Profile  Reply with Quote
Hi Erik,

That is great. I also need to give a try. Which file you have edited? Did you just addeded the line at the top of the file.

Thanks,
Madison
Go to Top of Page

manilow
VP-CART New User

France
134 Posts

Posted - May 28 2021 :  15:59:55  Show Profile  Visit manilow's Homepage  Reply with Quote
Hi Madison,

I didn''t notice your message earlier.

To explain the way it works an example below with my tmp_rmacustomer.htm file :


[tmp_emailheader.htm INCLUDE]

<table>
<tr><th colspan="2" align="left">[getlang langrma]</th></tr>
<tr><td>RMA</td><td>[rma]</td></tr>
<tr><td>[getlang langrmadate]</td><td>[rmacreationdate]</td></tr>
<tr><td>[getlang langcustlastname]</td><td>[rmacustomername]</td></tr>
<tr><td>[getlang langemailcustomer]</td><td>[rmacustomeremail]</td></tr>
<tr><td>[getlang langrmaaction]</td><td>[rmacustomeraction]</td></tr>
<tr><td>Message</td><td>[rmacustomercomment]</td></tr>
</table>

[tmp_emailfooter.htm INCLUDE]



The tmp_emailheader.htm and tmp_emailfooter.htm files can contain any valid html code. I use the header file to include the <head></head> tags and to start <body>. The footer file then includes the closing tag </body>. In order to get a nice looking email you need to create a complete html page.
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