close ad
 
Important WebAssist Announcement
open ad
View Menu

Web development tutorial

How to create an order history

Tutorial created by Ray Borduin, WebAssist

Categories: eCart, Dreamweaver, MySQL, PHP

rating

Order History pages can be very useful, they allow your customers to keep track of what they have purchased, and can be further enhanced to function as a Download Center if you are selling digital goods.

This tutorial guides you through creating an Order History page, and a customer’s Order Detail page to display their orders.

In order to successfully accomplish the steps describe in this document, you should first follow the steps in the following tutorial:
http://www.webassist.com/community/tutorials/view_tutorial.php?tid=118

arrow downRequirements

You will need to have the following items ready before beginning this tutorial:

  1. Dreamweaver CS3 or later
  2. Dreamweaver site with eCart checkout functionality with registration already created.
  3. DataAssist
  4. SecurityAssist 2
  5. WebAssist Free eCommerce MySQL database (Optional)
    wa_ecommerce_db.zip
This tutorial refers to the Free eCommerce MySQL database that is provided by WebAssist. This database contains all the necessary tables and columns to complete this tutorial. If you are not using this database, you will need to review the table and column references to make sure they match up with your database structure.

arrow downRecord Customer Details

The first step is to ensure that the Customer ID for the customer who is making the purchase is going to be recorded in the database along with the details for the order.

You will need to have configured eCart to store the cart summary in your database. You can confirm this by checking to see if an eCart Store Summary in Database server behavior exists in the Server Behaviors panel of the confirm page.

Step 1: Creating the OrderUserID column in your database

First, you need to create the database column in your orders table for storing the customer/user ID.

If you are using the Free eCommerce Database from WebAssist, this column will already exist and you are probably already storing this information in your database, so you can skip this step.
  1. Using your preferred database manipulation tool, open the orders table, or the table that you are using to store your order summary.
  2. Insert a new column to your database, name this column OrderUserID.
  3. Specify this column as the Integer Datatype.

Step 2: Update the server behavior

  1. In Dreamweaver, open your eCart confirm page.
  2. From the Server Behaviors panel, double-click on the eCart Store Summary in Database server behavior.
  3. Select the OrderUserID column.
  4. Click the Value lightning bolt.
  5. Expand the Session option.
  6. Select the UserID option.
    Depending on the Session Variable used with SecurityAssist, this may be named differently.
  7. Click OK.
  8. Click OK again.


You've now configured eCart to store the customer ID in the database when it records each order. You will now use this information to create the Order History page

arrow downReviews and comments

Comments will be sent to the author of this tutorial and may not be answered immediately. For general help from WebAssist, please visit technical support.

Sign in to add comments
rating

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.