This articles consists of 2 parts: 1. Using FrontPage to design order pages for use with 800Cart and 2. Using FrontPage to design a "data-based" ordering system with Access., text file, or SQL Server databases Using FrontPage to design order pages for use with 800Cart Method 1 (easiest) 1. In FrontPage Editor, position your cursor on your web page where you want to
insert an order form to work with 800Cart 2. Copy the HTML below and paste in into the HTML view of the editor. Replace the "zuser22" in the ID tag with the login name you chose when you created your free Cart.
3. Switch back to the Normal view by clicking the Normal tab in the lower left hand corner of the Editor.
4. You can now double click on the text box to the left of the submit button and change its size to 2 or 3, and to change the price or name of the item which is in the "name" of the tag. (see below) 5. Click to the Preview view and test! It's now just a matter of copy 'n' pasting the form elements around on the page. Note: the black line around the order form elements denotes an HTML form. Form elements like text boxes and buttons will not work unless they are inside a form. To create a new form, you can copy n paste the entire HTML block above. Important: Try to keep ALL the items you want to sell from a page all in the same form (within a single black box). If you have separate or different forms on a page, your shoppers will not be able to buy both items with a single click of the button (this is the way HTML is supposed to work, not the design of our e-commerce software). Method 2 (still pretty easy) Adding products for sale to your FrontPage web is easy! You only have to fill out 3 dialog boxes on FrontPage to add your first product -- after that, it's "copy 'n' paste"!! To create an order form to work with 800Cart Drop down the Insert menu, select Form Field, then One-Line Text Box.
Note that FrontPage places several elements in the page for you besides the text box you requested. The black line around everything represents a form. The Submit and Reset buttons are also inserted for you.
Double click on the rectangle that represents your text field. The dialog box
below appears. You'll probably want to shorten the length of the text box to about 2
characters and now you do the real magic of 800Cart In the Name of the text box, type in the price of your item for sale
(without a $ or other currency symbol) followed by and underscore _ character, followed by
the name of your product (spaces are OK, but don't use any other special characters)
followed by another underscore _ followed by your shipping information (here we used a
weight of 13 pounds, but there are about 13 other ways to calculate shipping as well with
800Cart Click OK.
Now, you have to tell your FrontPage order page where to send this information when a shopper clicks the submit button. Place your cursor anywhere within the black outline of the form, and right click. Choose Form Properties. In the resulting dialog box, click the Send to other radio button and then click the Options button.
In the Options for Custom Form Handler dialog (a fancy name for 800Cart itself!) type in: (you can copy the above text and paste it in to ensure accuracy) Select a Method of POST if that's not already selected.
In 800Cart
A hint about tables: if you are going to organize your products in tables, as many designers do, create your form FIRST, then create your table. Put your cursor in side the form, then create your table. (Or drag a table you already have into the form.)
You can then copy n paste or drag form elements (such as text boxes and buttons) wherever you want them in the table.
Now you see we have a table cell almost finished.
Inserting more products.... just highlight the parts you'll want to copy (as shown below) and click the "copy" button (or the Edit menu, then "Copy")
Now you can simply paste the elements into other table cells, and all you have left to do is double click on each text box and change it's name as shown at the top of this article.
Note: the black line around the order form elements denotes an HTML form. Form elements like text boxes and buttons will not work unless they are inside a form. To create a new form, you can copy n paste the entire HTML block above. Important: Try to keep ALL the items you want to sell from a page all in the same form (within a single black box). If you have separate or different forms on a page, your shoppers will not be able to buy both items with a single click of the button (this is the way HTML is supposed to work, not the design of our e-commerce software).
Part II: FrontPage and Database-generated Pages Placing your products in a database that FrontPage will use to present your products in your web pages is pretty easy, but does require a few steps, and you can skip none of these steps to make it work. 1. You must be hosted on a Windows NT web server that allows you to set up a DSN (Data System Name) and that has FrontPage Extensions installed. You must use the resource the web host (ISP or WPP) provides you to set up a DSN for your database file. (Your database file can be an Access database, a flat text file, or a SQL Server file.) FTP your database file to your web server first, then set up the DSN. Call your web host for more information on DSNs. 2. Next, in FrontPage Editor, drop down your Insert menu, and select Database, then Database Region Wizard.
3. The first thing the Database Wizard will ask you is for the name of the DSN we told you to set up in the previous step. Type in the name of the DSN you set up. If your database requires a username and password, supply that information, too.
4. Now the hard part - you need to know some SQL to tell FrontPage which records from which table you want to get for this web page. (we'll give you some links to some SQL tutorials at the end of this article). Type in SQL statement that will fetch the rows of records you want to present in this web page. NOTE: if you are using Access or a flat text file as your database, you CANNOT do joins across tables - you must query each table separately and you won't be able to "join" separate tables in the same row.
5. Now an easier part. In the next dialog box (below) list the names of the fields you want presented in each row of results. These are the actual names of the fields from your database, which can be found in the table you queried above.
After you have completed this process, a table with a row of cells containing your database results will appear on your page (the number of rows depends on the number of records fetched from the database, based on your SQL query.) That's it! Publish your web and test! Here are some links to articles in Microsoft's Knowledgebase that will assist you in this undertaking: Web Workshop - Using Databases with Microsoft FrontPage 2000 FP97: How to Make a Web Page Display Data from a Database Web Workshop - FrontPage: Using Active Server Pages Technology to Display Microsoft Access Data Web Workshop - FrontPage: Publish Microsoft Access 97 Data Using FrontPage FP98: How to Display Contents of a Database Using ASP FP97: How to Return Database Results to Rows in a Table FP98: How to Search Using LIKE In SQL Statement For IDC or ASP Microsoft FrontPage 2000 Web Database FP98: How to Remove or Customize "No Records Returned" Message FP2000: How to Return a List of Records as Hyperlinks Using ASP Other useful links, code, and tutorials can be found at: http://www.activerserverpages.com
|