This document contains information about how to move the page home.asp to the root directory of your Web site so that your Web site home page can be your ProductCart v3 home page. The following assumptions are used in this section:
An example: You can see an example of the home page moved up 2 levels and renamed “index.asp” here:
For instructions on retaining the use of the AJAX-based product preview feature in the new home page, please refer to this article.
The following is a list of tasks to be performed. Please make sure you follow these instructions carefully. Please also note that Early Impact does not provide technical support on implementing these code changes.
Open “footer.asp” with your HTML editor and save it to the root directory (again, here we are assuming that the root is 2 levels up). The 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 referenced in JavaScript code, the HTML editor will typically not edit those links. Make sure you manually review the code to see if there are any file locations that need to be updated.
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.
Open “home.asp” and perform the same task. Here too, all the links will be automatically updated, but since you need to use a header and footer that are in the same directory, you will have to change those include statements back to pointing to header.asp and footer.asp in the same directory (now the root directory).
That is: after the links have been recalculated, do a search for “header.asp” in the file and remove the path that has been added to the file location (e.g. change file=“productcart/pc/header.asp” to file=“header.asp”). Do the same with the locations of the files “footer.asp” and “homeCode.asp”.
Open “homeCode.asp” and perform the same task. All the links will be automatically updated. This file loads a few other files to handle the display of products on the page. You will have to move those files to the root as well, and edit the statements that include them inside “homeCode.asp”. Specifically:
Some of the code that load images on these pages contains variables, and an HTML editor like Dreamweaver does not recalculate links correctly when that is the case. To fix the problem, do the following (if you are not using Dreamweaver, perform the same tasks using your HTML editor):
Find: src="catalog/ Replace with: src="productcart/pc/catalog/ Find: src="<%=rslayout Replace with: src="productcart/pc/<%=rslayout Find: scStoreUseToolTip="1" Replace with: scStoreUseToolTip="2"
Save the 5 files.
This last 'Find & Replace' has to do with the fact that moving the AJAX product preview functionality to the root requires too many file changes. For this reason, perform the find and replace and make the following, additional edit to “home.asp”. Open “home.asp” and remove the include statement to the file “inc_PrdCatTip.asp”. Remove that line of code entirely.
There are three links that need to be manually updated:
Find: strArray(0,2)="showspecials.asp" Replace with: strArray(0,2)="productcart/pc/showspecials.asp" Find: strArray(1,2)="shownewarrivals.asp" Replace with: strArray(1,2)="productcart/pc/shownewarrivals.asp" Find: strArray(2,2)="showbestsellers.asp" Replace with: strArray(2,2)="productcart/pc/showbestsellers.asp"
In all the links above, remember to replace “productcart” with the name of the folder used on your store, in case you have renamed the “productcart” folder.
Make sure you have correctly performed the find & replace mentioned above:
Find: src="catalog/ Replace with: src="productcart/pc/catalog/
Make sure you have correctly performed the find & replace mentioned above:
Find: src="<%=rslayout Replace with: src="productcart/pc/<%=rslayout
If you are getting JavaScript errors on the page:
<!--#include file="inc_PrdCatTip.asp"-->