How to adjust the shipping charges?
Inside shopit.cgi, you need to be sure that enable shipping
is set to YES. Then you need to set the other variables:
$shipping[X]="UPS 2 day";
$shippingfile[X]="shippinginfo1.db";
where X is a number, start with one and have as many
different ones as you like. The shipping variable contains
the type of shipping, this will appear in the selection
box on the quantity form page. Then shippingfile is
the location of the file that holds the shipping info
for that type of shipping.
You need to edit the shipping files with a text editor
or spreadsheet program. Here is the format:
Order Total1, Shipping charge1
Order Total2, Shipping charge2
Order Total3, Shipping charge3
Where Order Total1 is less then Order Total2...
Here are the variables that relate to shipping:
(*SHIPPING) - The current cost of shipping
(*SHIPPING_TYPE) - On the quantity form template, this is a selection box.
On the final cost form it is just text.
(*TAXSTATE) - The state which you have chosen in the shopit.cgi file
(*TAX_PERCENTAGE) - The percentage of tax that you have chosen
(*TAXES) - The checkbox to indicate whether the customer wants to be taxed
(*TAX) - The amount of tax on the current order
How do I change the look of the template files?
File Definitions:
errorpage.template - This is just a page that is displayed
if the cart has some sort of fatal error like it can't
open a file for writing.
quantityform.template - The page of the cart where
the users can fill in their information and adjust their
order.
finalcostform.template - The page after they hit
order, it displays the order and the information
from the form. This also should say something like:
"Thank you for your order"
The first part of the quantityform or finalcostform
template files is defining the look that each item
in the current shopping cart will have. Everything
above '--END OF EACH ITEM DEF--' is part of this
definition.
The variables, (*Variablename), are field names coming
from your database. You can position them however
you like.
Below that section, is just normal HTML. That
is where you would adjust the look of the page,
like the background color and the look of the form...
Of course, there are some variables that can be
used in this section which you can see. They
are self explanatory for the most part.
STARTINFOFORM - This variable contains the FORM
html tag with the appropriate Action set. It
needs to be placed above any form elements including
the INSERTFORM variable.
INSERTFORM - This is where all of the items defined
in the previous section will be placed.
REFERER - This is the url that the customer came
from. It would normally be used to set where
the 'CONTINUE SHOPPING' button will go. This is
done by setting the refer variable like so:
<input type=hidden name=refer value=(*REFERER)>
Or for a static url:
<input type=hidden name=refer value=/myurl.html>
On the quantityform, you can require that a field
be filled in on the form by adding an exclamation
in front of that name. Some are set this
way for you to see.
On the finalcostform, FIRST_NAME, LAST_NAME... are
variables from the previous page's form.
How do I setup an advanced search form (Advanced Search Module)?
This is more complicated than a standard search since
there are so many fields to search on.
Here is some of the sample form(a_search.html):
<FORM method=get action=shopit.cgi>
<input type=hidden name=asearch value=1>
<input type=hidden name=search_fields value="type,tcolor,cabsize,drive,warranty,radio,transmission,engine">
The search fields tag needs to specify all searchable
fields excluding price and age. Price and age
are special since they don't do exact matches,
they are less than searches.
Other than those two, to add selection boxes for
the rest of the fields, just follow the example.
Each option would be a choice that you have in
your database. Oh, and each field must exist in
the database, i.e. type,tcolor...
How do I use the secure module?
The secure module is fairly easy to setup
and use. As far as install, all that is
needed is:
chmod 777 admin/saves/
chmod 755 admin/forms.cgi
You should password protect the admin directory
to keep intruders out. Most html editors
allow for this, but for a fee, we can set it
up for you with the userid and password of your
choice.
As for the operation, the main thing is
your save type. How you want the orders
to be saved to the secure server.
Sample from the shopit.cfg file:
# Secure save type:
# 1=individual files
# 2=one file for each day
# 3=one file for each month
# 4=one file for each day, csv database file
# If using 4, you must define the csvdefs variable below
$secure_type=2;
2 is what most use, since you can get
a seperate file of new orders for each
day. This eliminates trying to figure
out which orders are which. 4 is
also used a lot since you can import
each daily file directly into a database
like Excel or Lotus.
How do I use the Dynamic Display Module?
This module allows you to have a page automatically
created for each item in your database. This
is generated from a template file which merely
contains variables from your database, like
(*PRODUCT_ID).
In addition, you can use two additional variables:
(*IMAGE) and (*LONG_DESC)
To use these you need to create a sub-dir named
image and one named descriptions.
Then inside those directories, put files named
product_id.jpg or product_id.txt, where product_id
is an actual product_id from your database. You
can also specify default.jpg and default.txt, which
will be used if product_id.* doesn't exist.