Announcement:Materials and articles for ProductCart 5 can be found at our brand new support center.

Create an account to edit articles | See Formatting Syntax for Wiki syntax | We look forward to your contribution!

Moving the home page to the root directory

Not necessary

Moving the home page to the root of your store is not necessary. You can safely and effectively redirect visitors to your store's home page in a search engine friendly manner. Being two levels down from the root of the domain is simply not considered a relevant ranking factor.

301 Permanent Redirect

The correct, search engine friendly way to redirect visitors (including search engine robots) to your ProductCart-powered home page is to place an index page in the root (typically a file named “default.asp”) that contains the following code (change productcart to match your folder structure):

Response.Status = "301 Moved Permanently" 
Response.AddHeader "Location", "productcart/pc/home.asp"

Here is a default.asp file that you can use for this purpose. Again, remember to change the path to ”home.asp” as you might have renamed the productcart folder on your Web server.

Moving the home: Two Options

If you still wish to move the ProductCart home page (home.asp) to the root of your Web site, you have two options:

  1. Pre-edited files: use the pre-edited files provided below (currently available only for ProductCart v4.0 SP3)
  2. Do-it-yourself: edit the files yourself following the instructions below

In both cases, please note the following:

Do not move files

This document contains information about how to copy the page home.asp to the root directory of your Web site so that your Web site home page can be your ProductCart home page. NO FILES SHOULD BE MOVED out of the “pc” folder.

Updating your store

Care will need to be taken when upgrading or updating the store in the future or when updating the header.asp and footer.asp files: you will need to remember that BOTH copies of the files are updated (both in the pc folder AND in the root). None of the files that have been copied to the root will be automatically updated during an update of the software.

No technical support

Since you will be changing the ProductCart source code and working with your own header.asp and footer.asp, we do not provide technical support on this task. Once again, we would like to reiterate that moving the ProductCart home page to the root is simply not necessary and not a relevant factor in your store's search engine rankings.

First Option: pre-edited files

We pre-edited files for you so that you can quickly accomplish the “move” of the home page to the root. Read the following instructions very carefully.

  • Download this ZIP archive and unzip it to an empty folder:
  • Do not upload any files to your store yet. Carefully read the instructions below first.


  • You are using ProductCart v4.0 SP3
  • Your “productcart” folder is named “productcart”, “store”, or “shop”. You will find files for each of these three folder names. If your folder name is different, see “Using the files with a different folder name” below.
  • You are moving the home page two levels up.

Header.asp and footer.asp

The ZIP file above contains header.asp & footer.asp ONLY so that you can see how those files were edited. Open them and look at the include statements: some (small shopping cart, small search box, etc.) point to local files, whereas others point to files 2 levels down.

  • Download your version of header.asp and footer.asp from your Web server and save them to a separate folder
  • Compare those include statements to the ones you have in your version of header.asp and footer.asp
  • Edit your header.asp and footer.asp accordingly
  • Upload your edited header.asp and footer.asp to the root of the Web store (where you want to move the home page)
  • REMOVE header.asp and footer.asp from the pre-edited files

Upload the files

  • Back-up your current home page (the file that loads when your domain name's root folder is loaded)
  • Make sure you have removed header.asp and footer.asp from the pre-edited files folder (otherwise they will overwrite your store design)
  • Upload the files and images folder to the root of your Web site
  • Load the root of your Web site to make sure that the new home page is working properly
  • Manually edit the file inc_footer.asp in the pc folder as described here
  • Log into your Control Panel and change the Home Page URL setting under ”Settings > Store Settings” so that it points to the root of your Web site.

Using the files with a different folder name

If your productcart folder name is not “productcart”, “store”, or “shop”, do the following to adjust the files. Here we assume that you can use Adobe Dreamweaver to perform a Find & Replace task, and that your folder name is “order”. If you are using a different Find & Replace tool, and/or if your folder name is different, change the following steps accordingly.

  • Make a copy of the “productcart” folder from the ZIP file and rename it “order”
  • Open Dreamweaver
  • Load the Find & Replace utility (CTRL + F)
  • Under “Find in”, locate the “order” folder
  • Under “Search”, select “Source Code”
  • Find:

  • Rename:


  • Find:


  • Rename:


Upload the edited files as mentioned above.

Second Option: Do it yourself

If you have custom files or special needs that do not allow you to use the pre-edited files mentioned above, then you can follow the tasks listed below. Please make sure you follow these instructions carefully. Place also note that ProductCart does not provide technical support on implementing these code changes.


All of the instructions below assume that…

  • Your store is located in the “root” of your Web site. That is, the “pc” folder is 2 levels down from the root.
  • Your store's folder name is “ProductCart”. This is the default folder name for the folder that contains all ProductCart files. This folder is typically renamed by ProductCart customers (e.g. “store”, “shop”, “order”, etc.). Adjust the instructions below accordingly, based on the name you used for that folder in your ProductCart installation.

Create a local version of your store

In order for your HTML editor to correctly “recalculate links”, you should create a local version of your store. If you don't do so, your HTML editor might use the complete path to the file when recalculating link, instead of using the root of your Web site as the starting point. For example, it might recalculate the following link in header.asp:

<link type="text/css" rel="stylesheet" href="ProductCart/pc/pcStorefront.css" />

… as (incorrect):

<link type="text/css" rel="stylesheet" href="c://inetpub/wwwroot/ProductCart/pc/pcStorefront.css" />

… instead of (correct):

<link type="text/css" rel="stylesheet" href="ProductCart/pc/pcStorefront.css" />

You can follow the instructions below even if you don't have a local copy of your store defined in your HTML editor. Simply make sure to review all links that are automatically recalculated to avoid the issue described above.

Open and re-save "header.asp" and "footer.asp"

  • Open footer.asp from the “pc” with your HTML editor
  • “Save as” to the root directory. Your HTML editor will likely recalculate all links automatically for you (e.g. in Dreamweaver, answer yes to the “Update Links?” question).
  • Do the same with header.asp.

If you have any images or other files referenced in JavaScript code, the HTML editor will typically not edit those links. So make sure you manually review the code to see if there are any file locations that need to be updated.

Regardless of whether or not links were recalculated automatically for you by your HTML editor, you should open header.asp and footer.asp once they have been saved in the root folder and review all file locations to ensure that they are correct. This includes images, JavaScript files, CSS files, outbound links, etc.

Edit header.asp

The reference to inc_header.asp needs to point to a local version of the file. So

  • Open header.asp
  • Locate:
    <!--#include file="productcart/pc/inc_header.asp" -->

  • Replace with:

    <!--#include file="inc_header.asp" -->

Open and re-save "inc_header.asp" and "inc_jquery.asp"

  • Open inc_header.asp with your HTML editor
  • “Save as” to the root directory without recalculating links. If you are using Dreamweaver, this means that you will answer “No” to the “Update Links?” question.
  • Open inc_jquery.asp with your HTML editor
  • “Save as” to the root directory, recalculating links. If you are using Dreamweaver, this means that you will answer “Yes” to the “Update Links?” question.

Category Navigation

If you are using the Generate Navigation feature in the Control Panel, and therefore “header.asp” uses the file inc_catsmenu.asp, take the following steps to make sure that the navigation links will appear and work properly in your root version of the home page.

First of all, make sure that when you generate your navigation, you opt to use absolute URLs, not relative links (i.e. the links will include the full HTTP location of the pages).

Then, take the following steps:

  • Edit the root version of header.asp
    • Open header.asp in the root
    • Locate:
      <!--#include file="ProductCart/pc/inc_catsmenu.asp"-->

    • Replace with:

      <!--#include file="inc_catsmenu.asp"-->

  • Open the file inc_catsmenu.asp with your HTML editor
    • “Save as” to the root, recalculating links
    • Locate:

      imgopen.src = "images/btn_collapse.gif";

    • Replace with:

      imgopen.src = "productcart/pc/images/btn_collapse.gif";

    • Locate:

      imageclose.src = "images/btn_expand.gif";

    • Replace with:

      imageclose.src = "productcart/pc/images/btn_expand.gif";

    • Save inc_catsmenu.asp

Open and re-save "home.asp"

  • Open home.asp
  • “Save as” to the root, recalculating links

Now edit a few of the links that have been automatically recalculated:

  • Locate:
    <!--#INCLUDE file="ProductCart/pc/HomeCode.asp"-->

  • Replace with:

    <!--#INCLUDE file="HomeCode.asp"-->

  • Locate:

    <!--#include file="ProductCart/pc/header.asp"-->

  • Replace with:

    <!--#include file="header.asp"-->

  • Locate:

    <!--#include file="ProductCart/pc/inc_PrdCatTip.asp"-->

  • Replace with:

    <!--#include file="inc_PrdCatTip.asp"-->

  • Locate:

    <!--#include file="ProductCart/pc/footer.asp"-->

  • Replace with

    <!--#include file="footer.asp"-->

Now make one more code change to take care of an issue that exists when the store is turned off.

  • Locate:
    <!--#include file="ProductCart/pc/pcStartSession.asp"-->

  • Replace with:

    If scStoreOff="1" then
    	response.redirect "productcart/pc/msg.asp?message=83"
    End If
    <!--#include file="ProductCart/pc/pcStartSession.asp"-->

Changes to homeCode.asp

  • Open homeCode.asp
  • “Save as” to the root, recalculating links
  • Locate (there are 2 instances):
    <!--#include file="ProductCart/pc/pcShowProductP.asp" -->

  • Replace with (both instances):

    <!--#include file="pcShowProductP.asp" -->

  • Locate:

    <!--#include file="ProductCart/pc/pcShowProductH.asp" -->

  • Replace with:

    <!--#include file="pcShowProductH.asp" -->

  • Locate:

    <!--#include file="ProductCart/pc/pcShowProductL.asp" -->

  • Replace with:

    <!--#include file="pcShowProductL.asp" -->

  • Locate:

    <!--#include file="ProductCart/pc/pcShowProductM.asp" -->

  • Replace with:

    <!--#include file="pcShowProductM.asp" -->

  • Find:

    <a href='<%=strArray(i,2)%>'>

  • Replace with:

    <a href='/productcart/pc/<%=strArray(i,2)%>'>

Now open and re-save to the root, recalculating links, the following 4 files:

  • pcShowProductH.asp
  • pcShowProductL.asp
  • pcShowProductM.asp
  • pcShowProductP.asp

Some of the code that load images on these pages does not get recalculated correctly. To fix the problem, do the following (if you are not using Dreamweaver, perform the same tasks using your HTML editor):

  1. Go to the root directory
  2. Highlight the following 5 files: homeCode.asp, pcShowProductH.asp, pcShowProductL.asp, pcShowProductM.asp, pcShowProductP.asp
  3. Right click and select “Edit with Dreamweaver”. The HTML editor will open all of them. Make sure that there are no other files open.
  4. Now start the Find & Replace tool (CTRL+F)
    1. Select “Open Documents” in the “Find In” menu
    2. Select “Source Code” in “Search” menu
    3. Perform the following find & replace tasks
    4. Find:

    5. Replace with:


    6. Find:


    7. Replace with:


    8. Find:


    9. Replace with:


    10. Find:


    11. Replace with:


Save the 5 files.

If your header.asp or footer.asp file uses the “small search box”…

Now that you've saved the edited version of the file to the root, make sure that header.asp or footer.asp in the root include the local version of the file, and not the one in the “pc” folder. Specifically:

  • Open the file that includes the search box
  • Locate:
    <!--#include file="productcart/pc/SmallSearchBox08.asp"-->

  • Replace with:

    <!--#include file="SmallSearchBox08.asp"-->

Edit the Small Shopping Cart

If your header.asp or footer.asp file uses the “small shopping cart”…

  • Open the file SmallShoppingCart.asp in the pc folder
  • “Save as” to the root
  • With the file still open:
    • Locate:

    • Replace with:


Now that you've saved the edited version of SmallShoppingCart.asp to the root, make sure that header.asp or footer.asp in the root include the local version of the file, and not the one in the “pc” folder. Specifically:

  • Open the file that includes the small shopping cart
  • Locate:
    <!--#include file="productcart/pc/SmallShoppingCart.asp"-->

  • Replace with:

    <!--#include file="SmallShoppingCart.asp"-->

Edit the "Added to Cart" dialog window

If you are using the Enable “Stay on Page when Adding To Cart” Feature (Settings > Store Settings > Miscellaneous), then do the following…

  • Open the file atc_viewprd.asp in the pc folder
  • “Save as” to the root
  • With the file still open:
    • Locate:

    • Replace with:


Now that you've saved the edited version of atc_viewprd.asp to the root, change the reference to it in home.asp so that it points to the local version of the file, and not the one in the “pc” folder. Specifically:

  • Open home.asp
  • Locate:
    <!--#include file="ProductCart/pc/atc_viewprd.asp"-->

  • Replace with:

    <!--#include file="atc_viewprd.asp"-->

Open and re-save smallRecentProducts.asp (Recently Viewed Products)

If you have added the Recently Viewed Products Widget to your store design (smallRecentProducts.asp appears in either header.asp or footer.asp, follow these instructions:

  • Open smallRecentProducts.asp
  • “Save as” to the root folder, recalculating links
  • Keep the file open and make the following changes
    • Find:

    • Replace with:


    • Find:


    • Replace with:


Now make sure that header.asp or footer.asp correctly reference SmallRecentProducts.asp.

  • Open the file that contains the link to it
  • Find:
    <!--#include file="ProductCart/pc/SmallRecentProducts.asp"-->

  • Replace with:

    <!--#include file="ProductCart/pc/SmallRecentProducts.asp"-->

Product-preview feature (AJAX)


If it does not already exist, create a folder in the root called images. Copy from the productcart/pc/images folder all of the .png files related to the product-preview pop-up and place them in the images folder in the root. The files are: bottomcap.png, contentmiddle.png, lower-left-combo.png, lower-right-combo.png, pngfix.png, titlemiddle.png, topcap.png, up-right-combo.png, up-left-combo.png

Open and re-save files

  • Open inc_PrdCatTip.asp and xml_getPrdInfo.asp
  • “Save as” to the root, recalculating links

Edit inc_PrdCatTip.asp

  • Locate:
    myConn.connect("xml_srcListPrds.asp", "POST", GetAllValues(document.ajaxSearch), fnWhenDone);

  • Replace with:

    myConn.connect("productcart/pc/xml_srcListPrds.asp", "POST", GetAllValues(document.ajaxSearch), fnWhenDone);

Edit xml_getPrdInfo.asp

  • Locate:

  • Replace with:


Edit inc_footer.asp (pc folder)

When a customer returns to the storefront and ProductCart has saved shopping cart content from a previous visit to the store, a modal window is shown asking the customer whether he/she wishes to keep the products that had previously been loaded into the shopping cart. Those links will be broken if the modal window is loaded outside of the ”pc” folder.

To fix the issue:

  • Locate the file inc_footer.asp in the pc folder
  • Download it to your desktop via FTP and make a back-up copy of it
  • Open the file with your favorite HTML editor and locate the following 2 lines of code (there is other code between them, but these are the only lines you will need to edit):

  • Add the full URL to the ”pc” folder in front of each page name. For example, assuming that the URL to the ”pc” folder in your storefront is, you would replace the lines above with:


  • Save the file and upload it back to the Web server

Rename home.asp

You're done (finally!). In order for home.asp to be loaded automatically when visitors load the root of your Web site, rename it “default.asp” (this file is normally setup to be the default home page in the root).

QR Code
QR Code Moving the home page to the root directory (generated for current page)