Create an account to edit articles | See Formatting Syntax for Wiki syntax | We look forward to your contribution!
You are here: The ProductCart Encyclopedia » How To's » How to rename the "productcart" folder
How to rename the "productcart" folder
Steps to edit it
All of ProductCart's files are by default included in a folder called productcart. You may rename the productcart folder to personalize the address of your store, but you should NOT remove it, or alter the folder hierarchy. You can rename the productcart folder before or after you install and activate ProductCart, but since there are a few things to change if you do this after the fact, it’s a good idea to make this change before you start using the software.
For example, the URL to the default home page is typically something like
http://www.YourStore.com/productcart/pc/home.asp
… but you might want to change it to something like…
http://www.YourStore.com/shop/pc/home.asp
You must not remove the productcart folder. To rename it, follow these steps:
- Locate the file productcartfolder.asp in the includes directory and download it to your local system using your favorite FTP program.
- Open the file with Notepad or an HTML editor and change the name productcart to any other name that you would like to use (only use alphanumeric characters in the name and no spaces). Save the edited file and re-upload it to your server via FTP.
- Change the name of the productcart folder itself to the new folder name that you have just entered in the productcartfolder.asp file. In the example mentioned above, the file would be edited from…
private const scPcFolder="productcart"
…to:
private const scPcFolder="shop"
E-commerce widget for Blogs
If you have installed the E-commerce widget for Blogs you will also need to re-generate the Widget.
Folder name and database connection string
If you have not yet activated ProductCart, keep this folder name into account when you create the database connection string if you are using a DSN-less database connection to a MS Access database. If this sounds confusing, don't worry. You will find detailed instructions on how to connect ProductCart to a MS Access database in the Installation section of the ProductCart User Guide.
If you already activated ProductCart and you are using a DSN-less connection to a MS Access database, you will need to edit it accordingly or every page in your store will return an error indicating that the system cannot connect to the database. The database connection string is located in the file storeconstants.asp inside the includes folder.
Folder name and Parent Paths Disabled
How to Change the Folder Name on a PPD Installation
If you are running ProductCart on a Web server that has Parent Paths Disabled and wish to change the “productcart” folder name, you will have to edit the hard-coded paths to the include files. In simple terms, you will need to perform the following find & replace tasks on the entire “productcart” folder, using a tool such as the Find & Replace utility contained in Adobe Dreamweaver.
Make sure that you are using a Find & Replace tool that allows you to search the source code of every file under the “productcart” folder, and set it so that it is not case sensitive. If you are using the Find & Replace utility included in Dreamweaver:
- Click on CTRL+F on your keyboard to open the Find & Replace utility
- Under Find In select Folder and then navigate to the “productcart” folder that contains the files to edit
- Under Search select Source Code
- Enter the text strings mentioned below in the Find and Replace text areas respectively
- Select Replace All
- You will need to repeat this task 4 times, for each of the Replace statements mentioned below
Find & Replace Strings
For example, to change “productcart” into “store”, you would have to perform the following 4 find & replace tasks.
Replace
virtual="productcart/includes/
… with:
virtual="store/includes/
Replace
virtual="productcart/pc/
… with:
virtual="store/pc/
Replace
virtual="productcart/xml/
… with:
virtual="store/xml/
Replace
arrBaseFolder(0)="/productcart/pc
… with:
arrBaseFolder(0)="/store/pc
Trace: • Adding a New Product • Removing the "Please wait..." Dialog Window from Small Search Box • Requirements • Installation Instructions • Integrating ProductCart with your own store design • Drill-down Navigation Widget (category search fields) • Batch Processing Sub-Products • Editing the Control Panel Master User • Technical Notes • How to rename the "productcart" folder