Someone Help me out here

greenspun.com : LUSENET : S-Mart Shopping Cart : One Thread

Ok heres the deal, I trying to get the script working but all I get is "Server Errors". I am by no means an expert at CGI scripts but I have installed a few other scripts (Auctions, Message boards...ect) but for some reason cant get this one to work. Now if some one would do me a favor and e-mail a copy of your ".cfg" file so I can take a look at it and see what I'm doing wrong, would be a great help.

P.S. I have also set my permissions over and over to make sure they are set correctly.

Thanks,

Joe crosscheck@nwtech.net

-- Joe A. (crosscheck@nwtech.net), March 03, 1999

Answers

Maybe you don't use apropiate version of PERL. You should use Perl 5.004

-- Mario (mariom@croadria.com), March 05, 1999.

############################################################# # The path to sendmail (or whatever mail system you use) on your system. # If you have no clue, ask your sysadmin. $mailprog = '/usr/lib/sendmail';

# System: are you using Un*x , Win32, or MacOS ?? # 1 = unix # 2 = Win32 (WinNT / Win95) # 3 = MacOS $system = 1;

if ($system == 1) { $delim = "/" } elsif ($system == 2) { $delim = "\\" } elsif ($system == 3) { $delim = ":" }

# Do you want to use cookies or not? 1 to use cookies, 0 to use domain/IP $usecookie = 0; # For now cookies aren't functional

$debug = 0;

# URL to this script: $cgiurl = "http://www.metromkt.net/s-mart/s-mart.cgi"; $adminurl = "http://www.metromkt.net/s-mart/smartadmin.cgi";

# $secureurl = "http://www.metromkt.net/s-mart/s-mart.cgi";

# what is the base path to the directory where the files are (header,footer, order form)? $basepath= "/home/jwh/public_html/s-mart";

# what are your header and footer HTML docs? $header = "header.html"; $footer = "footer.html";

# where is the order form HTML doc? $order = "order.html";

# where is your temporary directory for Shopping Carts? # Make sure this directory is read/write $tmpdir = "./tmp";

# Storename. Keep it simple, it's only used for file naming. (i.e. "store1") # If you are running multiple stores on one server, using the same temp space, # make sure they all have different names. $storename = "store1";

if ($usecookie eq '1') { require 'cookie-lib.pl'; }

######################## # Death and taxes. ######################## # 0 = No taxes calculated. # 1 = Calculate Tax by State # 2 = Always calculate tax

$tax = "1";

# Default tax amount, if state is not specified, or if tax is always calculated # Example: You live in Ohio, so you have to charge sales tax to Ohio residents; # set $taxamt = "0" (as a default) and then set GA to '.065' as shown below.

$taxamt = "0";

if ($tax eq '1') { %taxes = (GA,'.06',FL,'.05') }

####################### # Shipping #######################

# 0 = No shipping # 1 = Shipping by number of items # 2 = Non-variable shipping # 3 = Shipping by weight # 4 = Shipping by price

$shipping = "1";

# For non-variable shipping if ($shipping eq '2') { $shipamt = "5.00"; }

# For shipping by number of items # It works like this (20,'20.00',11,'10.00',6,'5.00') For less than 20 items, charge $20.00. # For 6 - 10 items charge $10.00, and so on if ($shipping eq '1') { %shipping = ('20','20.00','10','10.00','5','5.00'); }

# For shipping by weight: # For <100 pounds charge $40, for <50 pounds charge $15, etc.. if ($shipping eq '3') { %shipping = ('100','40.00','50','15.00','20','0.00'); }

# For shipping by price: # (price,shipping,price,shipping,etc) if ($shipping eq '4') { %shipping = ('0.00','0.00','1.00','5.95','50.00','9.95','100.00','15.95','200.00', '17.95'); }

## Multi Shipping $multiship = 1;

if ($multiship eq 1) { $shipdb = "shipping.db"; }

##################################################### # Misc ##################################################### # Do you want to verify Credit Card Numbers? # Keep in mind that all this does, is ensure that the number is in the proper format. # It is in NO WAY an authorization, just a qualifier. # $useverify = 0; who would give inaccurate information? # $useverify = 1; Trust customers?! Ha! $useverify = 1;

# Make sure you have ccverify.lib if ($useverify eq '1') { require 'ccverify-lib.pl'; } # If you don't want to go to the review page after adding an item, set this to # '1' $useredirect = 1;

# Multiple Currencies: Let the shopper decide what currency to pay in! # Patriotism - No other countries! $usecurrency=0 # Global Peace - Can't we all just get along? $usecurrency=1 # The vlaue for each currency should be the exchange rate, based on the prices in your # DB. So if you use U.S. dollars, set U.S. to '1'. $multicurr = 0; if ($multicurr eq '1') { $currdb="currency.db"; }

###################################################################### ##### # # Ok, so that's done. But now how do you put that whole catalogue on- line? # Easy use the Inventory manager. It so easy that any idiot (even your # customers!) can edit and update their on-line store! No need for training # those schmucks HTML! # ###################################################################### ##### # Do you want do do your own catalogue pages or have the computer generate # then on the fly, from a inventory database? # $useadmin = 0 (don't use it) # $useadmin = 1 (use it!) ###################################################################### ##### $useadmin = 1;

if ($useadmin eq '1') { # Where is the database file you want to use? $resourcedb = "database.db";

# Header & Footer for Admin $adheader = "header.html"; $adfooter = "footer.html";

# Where is the ID file? # All the ID file does is store an integer, that the admin script # uses to base it's ItemID numbering from. # It should be a blank, writable text file, create it yourself. $idfile = "item.id";

# Where are the product images? $imageurl = "http://www.metromkt.net/s-mart/images";

# Do you want to review command to show the product images? # $useimage = 0; images scare me # $useimage = 1; bring em on $useimage = 1;

#Do you want to display to product ID number? #useid = 0; no way! #useid = 1; way $useid = 1;

# Groups. Aisles. Rows. Whatever the hell you want to call them, they are # A convenient way to divide a store into sections. # List all your groups here: # (name of group in database, 'how you want it to appear')

%groups = ('viable', 'Viable', 'gnld', 'GNLD', 'supply', 'Supplies', 'service', 'Services');

###################################################################### ##### # Now how do you get the server to generate the pages? # Easy simply make this call from your HTML: # http://www.foo.com/smart/S-Mart.cgi?command=listitems&pos=0 # Now decide how many items to list at a time: ###################################################################### ##### $numtolist = "20";

###################################################################### ##### # That's it. No more mess. Let your customer worry about updating the # database. ###################################################################### ##### }

###################################################################### ##### # S-Mart Tracking # # Allows your customers to check on the present status of their order # and for you to receive and track all your orders, in a nice, easy way. # Rather than receiving 50 e-mails a day waith orders, you can just # logon and get a nice report of all unprocessed orders. # # $usetrack = 0; I like things the old fashioned way # $usetrack = 1; I'm a hipster, keep me in the 90's !! # ###################################################################### ##### $usetrack = 1;

if ($usetrack eq 1) {

# URL to the tracking script $trackurl = "http://www.metromkt.net/s-mart/smartrack.cgi";

# Directory to store orders # Not the same as the temp, becuase you CARE if orders get deleted # when they shouldn't !! $orderdir = "orders";

# Database file $trackdb = "track.db";

# Shipping Type # 0 = None (other) # 1 = FedEx # 2 = UPS # 3 = Airborne Express $shiptype = 2;

# What all possibilities are there for status? %trackoption = ("pending", "Not Processed", "processed", "Processing", "shipped", "Shipped", "error", "Problem with order");

# If you want additional text sent to the user (when sent update e- mails) %tracktext = ("shipped", "Your order has been sent out, please contact me with any additional info!\n");

# Do you want to let people know (by e-mail) when their order # as been processed, shipped, etc .. ? # $passivetrack = 0; Pull # $passivetrack = 1; Push $passivetrack = 1;

}

###################################################################### ##### 1;

-- James Hopkins (jwh@metromkt.net), March 06, 1999.


Moderation questions? read the FAQ