Documentation
SUPERMALL: V1.0
WARNING - THIS FAIRLY ADVANCED CGI CODE
Our support policy confines us to answering
SPECIFIC questions about the installation. We do not teach perl, systems
configurations or unix as part of the membership.
If you require this level of support you will have to pay for installation.
Feel free to give it a shot - if you have the time and like to learn you are on the
right page. For more information regarding support policies read the FAQ. If you
prefer to have the system installed for you simply contact PSYBERCORE to have this
arranged.
Preleminary Material for review
System Requirements
Preliminaries
- Determine the path to PERL 5 on your web
server host. Note that some web hosting companies run both PERL 4 and PERL 5.
Make ABSOLUTELY sure you are not setting this up under PERL 4. Ask your
administrator if you are not sure.
- Download the tarfile for this program and
save it to your desktop.
- Unpack the tar archive on your desktop using a
program that unpacks UNIX TAR ARCHIVES. If you don't have such a program then download
WINZIP FREE from SHAREWARE.COM.
- After you have unpacked the TAR archive you
will have a collection of folders and files on your desktop. Now you have to do some
basic editing of each of these files (or at least some of them). Use a text editor
such as wordpad, notepad, BBEdit, simpletext, or teachtext to edit the files. These
are NOT WORD PROCESSOR DOCUMENTS they are just simple TEXT files so don't save them as
word processor documents or save them with extentions such as .txt or they will NOT WORK.
Note that there may be a some files inside of folders which are "blank".
This is normal.
Preparing the CGI scripts
Define Path To PERL 5
The first step is to open up each and every
file that has a .cgi extention and edit line number one of each script. Each of the
cgi scripts is written in perl 5. For your scripts to run they must know where perl 5 is
installed on your web server. The path to perl 5 is defined to a cgi script in the first
line of the file. In each of the cgi scripts the first line of code looks something like
this:
#!/usr/bin/perl
If the path to perl 5 on your web server is
different from /usr/bin/perl you must edit the first line of each cgi script to reflect
the correct path. If the path to perl 5 is the same no changes are necessary. If you do
not know the path to perl 5 ask the webmaster or system administrator at your server site.
Configure the .cgi files
configure.cgi (for /cgi-bin/supermall/ and
/cgi-bin/supermall/admin)
Below are the variables used for mastergate
in ALL of the other cgi scripts. All of the other cgi programs USE configure.cgi to
figure out where certain things are. Supermall uses TWO COPIES of configure.cgi.
One goes inside /cgi-bin/supermall and the other inside /cgi-bin/supermall/admin/
- $mailprogram =
"/usr/lib/sendmail";
- $mysqldatabase= "mysql database
name";
- $mysqlusername = "mysql username";
- $mysqlpassword = "mysql password";
- $adminemail =
"administrator\@yourdomain.com";
- $referingdomain =
"yourdomain.com";
- $validation = "syntax"; #this can
only be either "syntax" or "realtime" (realtime only works with authorize.net)
- $confirmationurls =
"http://www.yourdomain.com/supermall/orders"; (URL to the orders directory)
- $itemdir =
"/path/to/public_html/supermall/items"; (full path to the items directory)
- $browsedir =
"/path/to/public_html/supermall/browse"; (full path to the browse directory)
- $orderdir =
"/path/to/public_html/supermall/orders"; (full path to the orders directory)
- $pixdir =
"/path/to/public_html/supermall/pix"; (full path to the pix directory)
- $browseURI =
"/supermall/browse"; (Relative
URL (URI) to the browse directory)
- $ordersURI =
"/supermall/orders"; (Relative
URL (URI) to the orders directory)
- $itemsURI =
"/supermall/items"; (Relative
URL (URI) to the items directory)
- $pixURI = "/supermall/pix"; (Relative URL (URI) to the pix directory)
- $admincgiURI =
"/cgi-bin/supermall/admin"; (Relative URL (URI) to the admin cgi directory)
- $usercgiURI =
"/cgi-bin/supermall"; (Relative URL (URI) to the main cgi directory)
- $headerhtml =
"/path/to/cgi-bin/supermall/header.html"; (full path to header.html)
- $footerhtml =
"/path/to/cgi-bin/supermall/footer.html"; (full path to footer.html)
If you are using REALTIME validation and need
more information interfacing to authorize.net See the authorize.net
documentation for any confusion regarding the structure/syntax of the form fields and
their required values.
Uploading the files
- /cgi-bin/
supermall/
- viewcart.cgi
- configure.cgi
- addtocart.cgi
- bookmark.cgi
- viewbookmarks.cgi
- footer.html
- deletebookmark.cgi
- header.html
- modifycart.cgi
- search.cgi
- checkout.cgi
- preconfirm.cgi
- order.cgi
- /cgi-bin/
supermall/admin/ (password
protected)configure.cgi
- add.cgi
- adminsearch.cgi
- delete.cgi
- modify.cgi
- spawn.cgi
- premodify.cgi
Create mall directories
You also need to create the following
directories inside of your webspace. Set the browse, items, and pix directory to
777. You have to upload pictures manually. Make sure they are gifs and name
each gif according to the item number (i.e. item number #1 - 1.gif uploaded to the pix
directory)
- http://www.yourdomain.com/supermall/
- http://www.yourdomain.com/supermall/admin/
- http://www.yourdomain.com/supermall/browse/
- http://www.yourdomain.com/supermall/items/
- http://www.yourdomain.com/supermall/pix/
Creating the mall
Through the admin panel first you have to add
product vendors. These are the people that you get your inventory from. If you
are the only vendor then you still have to add yourself. Then you add product
categories and only THEN can you add items. If you are confused then play with the demo and get a feel for the administrative area on a working
site first. Once you have added all your vendors, catagories and products click on
the "SPAWN" button to create the actual mall. A browsing page is created
and stored inside of the browse and items directory. You can use this for your main
page or copy the html and use parts of it for your main mall directory.
Set Your Script Permissions
File access permissions must be set correctly
for this program to run. The table below lists the permissions of each file which are to
be set by the unix command (chmod) used to set the correct access permissions. You must
set the access permissions for each of these files. If you are using WS_FTP then
right click on the files located on your webserver. Then you will see a hidden menu
pop up. Click on CHMOD(UNIX). Then a box pops up with 9 checkboxes. Set
permissions for all .cgi files to 755 and all others to 777 (i.e. footer.html and
header.html).