Creating Custom Pages that Use Header.asp and Footer.asp - v4

Last Updated: Aug 12, 2014 01:06PM EDT

Basic code

Let's say you wanted to create a page that does not rely on ProductCart' Content Pages feature, but still uses the same store interface defined by header.asp, footer.asp, and related files. How can you accomplish this? It's actually quite easy.
  • Create a blank, ASP page in your favorite HTML editor
  • Save it in the “pc” folder of your store (create a local directory structure on your desktop that mimics your online store)
  • Open the file and paste the following code in it
    <% response.Buffer=true %>
    <!--#include file="../includes/settings.asp"-->
    <!--#include file="../includes/storeconstants.asp"--> 
    <!--#include file="../includes/opendb.asp"-->
    <!--#include file="../includes/languages.asp"-->
    <!--#include file="../includes/currencyformatinc.asp"-->
    <!--#include file="../includes/stringfunctions.asp"-->
    <!--#include file="pcStartSession.asp"-->
    <!--#include file="header.asp"-->
    	<div id="pcMain">
    <!--#include file="footer.asp"-->
  • Add to the page any HTML code you wish within the “pcMain” DIV
  • Save the page with whichever name you wish to use for it (e.g. MyNewPage.asp) and upload it to the “pc” folder on your Web server.

Querying the store database

If you need to query the store database, use code that is structured as follows (here the query is just a simple placeholder for what your query will look like, of course).
<div id="pcMain">
Dim rs, connTemp, query
call opendb()
	query="SELECT * FROM Customers;"
	set rs=server.CreateObject("ADODB.RecordSet")
	set rs=connTemp.execute(query)
	set rs=nothing
call closedb()


  • Support Forums
  • Video Tutorials
  • Support Request
  • Support Policy
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found