FishCart: an online catalog management / shopping system Copyright (C) 1997-2003 FishNet, Inc. ========================================================================== Q: Does FishCart support Authorize.Net or CyberCash clearing? Q: Why is the cURL package required? Q: I keep seeing the following prompt when trying to install; what is wrong? Q: How can I change the product ordering? Q: How can I debug problems in FishCart for pages containing no data, etc.? Q: How do I use the AID, or Associate ID? Q: What is the difference between Product SKU and Product Sequence product ordering? Q: What characters are valid in a SKU? Q: What if I need to create flat or delimited files for orders? Q: How to I integrate the orders from FishCart into an external accounting system? Q: When I run the install.pl perl script, I get the following errors: Q: What if my SSL server is at a different address? How do I change the cart to go to a different secure URL? Q: When I run the install.pl perl script, I get the following errors: Q: How do I configure the number of products shown per page? Q: Is it possible to set links into FishCart to show single products or whole categories from other pages in my Web site without going through the index.php page? Q: When I try to enter an image in the maintenance section, an error occurs that the image cannot be found. What causes this? Q: I've seen a reference in the installation document to "pig latin". What is it? ========================================================================== Q: Does FishCart support Authorize.Net or CyberCash clearing? A: Yes. There is a zone flag to enable these. You will need to install the cURL package for AuthorizeNet. For more information, see the authorizenet.php file. ========================================================================== Q: Why is the cURL package required? A: Because authorize.net normally collects info from a web form, it is necessary to submit the info to them as if it were coming from a browser submission. To get the return results, it is necessary to parse the http headers. All this has to be done via an ssl connection. FishCart collects the payment data and then must emulate a browser to submit it to authorize (or any similar gateway). curl makes this doable programmatically. PHP cannot originate SSL connections, so FishCart cannot do this natively. V4 finally includes the openssl libraries, which PHP3 did not, but it has a very limited function set available, which does not include SSL connections. ========================================================================== Q: I keep seeing the following prompt when trying to install; what is wrong? Database error: Link-ID == false, pconnect failed MySQL Error: 0 () Session halted. A: FishCartSQL is not properly connecting to the mysql database. 1. Check the 'databasehost' parameter in the db.? file for this installation. It should be 'localhost' if the mysql server is running on the Web server; if it is running on another server, put the FQDN of that host in the db.? file. 2. Check that you are accessing the database with the proper mysql username and password. ========================================================================== Q: How can I change the product ordering? A: FishCart has a flexible product ordering scheme built in. The installed default is to order by SKU. The default ordering can be changed in the Web profile and in each Category profile. The Web sort criterion is used where there is not a category. This includes keyword only searches, the new and the closeout product list. In this case, the sequence number in the product record, prodseq, is used for ordering. This numeric value is set in the maintenance page for each product. The Category sort criterion is used where a product category has been specified. In this case, the product/category sequence number, pcatseq, is used. This numeric value is set in the product/category sequence page off the central maintenance page. This sequence number is set per category, so the same product listed in different categories can be ordered differently. The sequence numbers are numeric values. The absolute value does not matter; the only thing that matters is the relative ordering of the numbers in the table. ========================================================================== Q: How can I debug problems in FishCart for pages containing no data, etc.? A: Start by manually setting or inserting an error_reporting(15) function in the page in question. Bear in mind that if the error is on a page link, the problem will be in the destination page, not the page with the link in it. Also, some pages, orderproc.php for example, include other files inline; if the problem is in the included file, and that file has an error_reporting(0) function, you will have to change that value also. With error_reporting(15) you may see various unintialized variable warning. Generally these are not a problem. Syntax errors are the most likely cause of pages with no data in them. If you are having trouble transferring control to another file via a header(), keep in mind also that absolutely no text can go out before a header() statement. Unseen spaces and even implicit newlines are sent to the browser, causing the header("Location: ..") to be ignored. For example, the following syntax will cause a single newline to be sent to the browser, nullifying any header("Location") statements after this point in the file, <---- the newline here ========================================================================== Q: How do I use the AID, or Associate ID? A: The AID is an effective way to pass an ID code transparently through the cart to be presented to the merchant. This can be used for traffic source analysis or cyber reseller / associate marketing. FishCart does not act on or modify the AID in any way. A default AID can be set in the db.??? file for each installed cart; this is set if no AID is passed in. To set the AID to a specific value, enter the cart initially as follows: http://www.domain.com/catalog/index.php?aid=your_code Once the AID is set for a particular order ID, it will not be changed for the duration of that order. ========================================================================== Q: What is the difference between Product SKU and Product Sequence product ordering? A: There are several ways that products can be ordered for display in FishCart. One is by SKU. If product SKU ordering is chosen, the products will be shown sorted by SKU regardless of whether a category is selected or not. Another is by a product sequence when no category is involved in the display. This product sequence number is contained in the product table as the column 'prodseq'. Yet another is by a different sequence number when a category of products is being displayed. This column is called 'pcatseq' and is contained in the product/category table. This allows different ordering to be used for the same product when shown in different categories, permitting flexible control over product presentation. The absolute value of the sequence numbers is not important. The only thing that matters is relative ordering. ========================================================================== Q: What characters are valid in a SKU? A: A-Z, a-z and 0-9 all are valid. Some punctuation characters will work, but be careful. The SKU is passed along in a GET URL, and it is not URL encoded. You will need to avoid characters that will confuse the URL or PHP strings, such as ' ', '"+?&', and probably a couple of others. Avoid apostrophes, as that will cause problems with the SQL database. ========================================================================== Q: What if I need to create flat or delimited files for orders? A: Flatfiles are not normally needed/used. Examples are available but must be highly customized for a particular use. See the *fixlen* files in cust1 and cust2. Permissions management for flatfiles must be very tightly controlled, as the Web daemon user must be able to write to the files, and ownership must pass muster with PHP safe mode if it is turned on. One way is to set the flatfiles owned by the needed user to pass PHP safe mode, the group the Web server runs as, and then dhmod the file 020. This is write only by the group, and no one but the super user can read the file. Flat files are generally managed by cron jobs to rotate the files on a periodic basis. The files may be PGP encrypted if desired. Just make sure that the rotating cron job properly sets ownership and permissions on the files. ========================================================================== Q: How to I integrate the orders from FishCart into an external accounting system? A: Such integration is usually highly individual for each external accounting system. Start by finding out what provisions exist in the external system to import orders. You must conform to that in any case. One option is to create delimited files for the order summary and line item records that can be imported into the external system. This will be custom development based on whatever the external system requires. There are a few samples in the FishCart distribution to help you do this. Probably the best is the 'maint/process_tabdelim.php' file. The examples in the /cust1 and /cust2 directories in the master source, though quite old, may also provide a starting point. Another option is to create an external database such as an Access or a Paradox file. This can be done by creating a script on an NT server that reads the file from the FishCart database and writes it to any database format desired via the ODBC data mechanism. Such an NT based script can be written in PHP, VB, or whatever fits the need. ========================================================================== Q: When I run the install.pl perl script, I get the following errors: syntax error in file ./install.pl at line 212, next 2 tokens "my $d$ syntax error in file ./install.pl at line 215, next 2 tokens "$DBI:" syntax error in file ./install.pl at line 219, next 2 tokens "->" syntax error in file ./install.pl at line 222, next 2 tokens "->" syntax error in file ./install.pl at line 223, next 2 tokens "->" syntax error in file ./install.pl at line 225, next 2 tokens "$DBI:" syntax error in file ./install.pl at line 241, next 2 tokens "->" syntax error in file ./install.pl at line 243, next 2 tokens "->" syntax error in file ./install.pl at line 244, next 2 tokens "} els$ Execution of ./install.pl aborted due to compilation errors. A: You are running perl version 4. You need to upgrade to perl 5. ========================================================================== Q: What if my SSL server is at a different address? How do I change the cart to go to a different secure URL? A: See the 'securl' parameter in the db.? file for your installation. You can modify the value to be whatever you need. The default is below. # path to ACCT's secure Web home "secureurl", "https://$machine.$domain.$tld", If you have FishCart version 2.10 or later, the URL and path information are in the top of the installed public.php and admin.php files. You can edit these to quickly change the domain and path information on an installed cart. ========================================================================== Q: When I run the install.pl perl script, I get the following errors: OOPS: can't create directory: /the/path/to/your/tree/fishcartsql A: Make sure that you either run install.pl as the root user or as the user that owns the directory that you are installing into. The cart will be installed with the accounts that are defined in the db.? file for each installation. ========================================================================== Q: How do I configure the number of products shown per page? A: Edit the display.php file and change the $dn variable to the desired number of products per page. ========================================================================== Q: Is it possible to set links into FishCart to show single products or whole categories from other pages in my Web site without going through the index.php page? A: Yes. To search for a keyword from the default catalog, with the default language, create a link into the cart as follows. If your search term has spaces or special characters, these must be encoded per normal conventions (' ' -> '+', etc.) ... To show a single product from the default catalog, with the default language, create a link into the cart as follows: ... To show a single product specifying the catalog and language, create a link into the cart as follows, where M is the numeric catalog or zone ID, and N is the numeric language ID: ... To show an entire category from the default catalog, with the default language, create a link into the cart as follows, where C is the numeric category ID: ... To show an entire category specifying the catalog and language, create a link into the cart as follows, where M is the numeric catalog or zone ID, N is the numeric language ID, and C is the numeric category ID: ... NOTE: cookies must be operational to track orders when leaving the cart. ========================================================================== Q: When I try to enter an image in the maintenance section, an error occurs that the image cannot be found. What causes this? A: The path to the image needs to be in the following format. Examples are given relative to a document root of /home/web/web_a/, a FishCart installation directory of ~/cart, with a separate ~/images off the document root. * absolute with respect to the document root of the virtual web EX: /images/pic.gif OR * relative to the catalog installation path EX: ../images/pic.gif For images uploaded via the maintenance pages, the path is under the 'images' directory relative under the cart installation. EX: ./images/pic.gif or /cart/images/pic.gif ========================================================================== Q: I've seen a reference in the installation document to "pig latin". What is it? A: Pig latin is a made up spoken "secret language" that is used by kids in the United States, perhaps other English speaking contries also. The rules are fairly simple, and I think I can summarize them briefly; other authorities may have improvements or variances. Pig latin is only spoken, so when written out it looks pretty strange. For a native English speaker it isn't hard to pick up the pattern; I have no idea if this will make a lick of sense to a non native speaker. :) * words starting with a consonant: remove the initial consonant and put it at the end of the word with the vowel sound '-ay' after it. * words starting with a vowel: add an additional syllable '-way' at the end of the word. * the above operations may be (always?) done on each syllable of polysyllabic words. * the operation is on the phonetic value of the letters, not the literal spelling. (thus 'whole' would be 'ole-hay' since the 'w' is silent) Thus, the words 'pig latin' would be pronounced 'ig-pay atin-lay'. 'fishcart' would be 'ish-fay art-cay' since these are normally two distinct words. 'This is an entire sentence written in pig latin' would be: 'is-thay is-way an-way en-tay ire-way entence-say itten-wray in-way ig-pay atin-lay'. ==========================================================================