Hostahoy Shopping Cart  
Offline / FTP 
Administration

[ main menu ]

The Hostahoy Shopping Cart allows for online "wizard" type configuration that is both simple and fast, shell mode configuration for advanced users and offline configuration* so advanced users can create large databases of similar products quickly. In order administer your store offline, you must have FTP access to the site your store resides on. 

The File Structure 

To completely understand how the Hostahoy Shopping Cart works and the associated files, it is important to be familiar with the file structure of the program. 

The program itself with a copy of the banners directory (image files) resides in the cgi-bin directory in a sub directory called cart. If you have followed the suggest configuration during the setup of the script, your file structure should look like this (assuming html is your base html directory): 
 

html/stores - hold the store(s) information 
html/stores/banners - for multiple store use only, this directory can hold banner files that will display in all stores 
html/stores/buttons - holds a copy of all the common buttons and images for all usernames inside stores directory 
html/stores/username - is the specific directory that the username should have full access to - all files in this directory and sub directories are specific to the user 
html/stores/username/admin - is the password protected directory that contains all the data files except for the secure credit card information 
html/stores/username/admin/temp - contains the temporary order files that are created while shoppers are adding products to their order. It is recommended that these file be cleared after about 30 days. 
html/stores/username/banners - is the directory for custom uploaded banners (if option is allowed by script owner) 
html/stores/username/images - the logo for the store should be the only image in this directory 
html/stores/username/images/buttons - the custom buttons and images specified in basic administration are uploaded here 
html/stores/username/images/products - the product images are uploaded here. If the name of the image is image.jpg then the thumbnail would be th_images.jpg and the zoom image would be zoom_image.jpg. the zoom and th image are not required. 
html/stores/username/secure - if your script resides on a secure server and the secure URL is entered in the payment options, credit card information will be stored in this password protected directory.

 
The Product Database File 

All of your product information is stored in an easy to read text file in the admin directory called cart_db.txt. This file is a simplified database file meaning all data for one record is expanded to several lines in the text file to make human reading and editing easier. The format of this file is quite simple: the field name is on the left in all caps then the value(s) are on the right.  The two halves are separated by one or more tabs. The file gets tricky or "advanced" when dealing with multiple options or values because multiple colons are used to separate the values and it is quite easy to make an error when editing this file manually. Here is the "Mystery Meat" database record from the example store (long lines are wrapped here but should not be in file): 

CODE           mystmeat 
NAME           Mystery Meat 
CATEGORY       Meats 
PRICE          14.95 
TAXABLE        NO 
INTRO          We are not sure what type of animal this meat comes from, or even if it comes from an animal at all.  But some have eaten it before without dying. 
IMAGE          mm.jpg:left 
ICON           :left 
OPTIONS(pldwn) Toughness:Tough:Very Tough:Hard as a Rock - add 10%:: 
OPTIONS(check) Parts to Include:Legs:Rump:Back:Fingers:Tail:Kidneys:: 
DISCOUNTS      2-99:10%::100+:25% 
SHIPPING SCHED  
MINIMUM  
RELATED        soda 
RELATED_MSG    How about a frost cold one to go with your Mystery Meat? 
FOOTNOTES  

There are a few very important things to remember when editing this file directly:  

  • 1) Make sure you transfer file back and fourth from the server in ASCII mode, not Binary  
    2) Make sure the left side and right side of each line is separated by one or more tabs (not just spaces)  
    3) Make sure multiple options are separated by the correct number of colons - if you are not sure, use the on-line wizard to setup one product and use that one as a template. 

Other Data Files 

The other data files can be edited in a text editor offline as well, however these are usually updated much less frequently than the product database and can just as easily be updated online using the wizard. 

* Offline configuration is only available to the owner of the script