JavaScript for E-Commerce

Back | Contents | Next
Please note that this tutorial was first published in the year 2000, and is based on work conducted between 1997 and 2000. While we trust that it still constitutes useful tutorial material, it should not necessarily be construed as to impart best practice in the year 2016. For more details please see this blog post.

Order Finalization

Once the customer has looked around the shop and selected some items, they are going to want to place an order. To this end we must provide a page that allows them to enter their payment details, and then send the order to the merchant.

Ideally, the order would be inserted into a database which the merchant would periodically check. However, this is beyond the scope of this document, so we will be using a reasonably simple Perl script.

The page that allows entry of payment details will open in a new window when the customer clicks the "Order" button. It will display the list of items ordered, and will include form fields for name, address, payment method and credit card details. The list of items ordered will also be stored in hidden fields to be sent to the merchant.

The code that generates this page will be added to the index.html file.


Back | Contents | Next

This tutorial has been translated to Serbo-Croatian language by Jovana Milutinovich from Webhostinggeeks.com.

This tutorial has been translated to Slovak by Juraj Rehorovsky from Coupofy team.

If you find this tutorial useful and want to show your apprectiation, a small donation is most welcome, either in Bitcoins to 19QpWDmZPmTqawcr8VsXcbdc4Znq1ecrza, or via PayPal.