Welcome to the OpenCart Test Page
This is a simple page that can be used to test your installation of
the OpenCart application software. You should print the source code
for this page in order to understand how to use the shopping cart.
In general, you will find that all of the documentation that applies
to PayPal also applies to this application, so you can use it as a
direct substitution for PayPal. Here is a sample link that
demonstrates how the shopping cart can be used to purchase a
product using a standard web link:
Purchase A Green Widget
Another way to handle the purchase of an item is to use a form to
handle the purchase. Here is an example of a form that is used to
handle the purchase of a product:
Purchase A Blue Widget
There are also several custom routines that can be used to break out
the functionality into separate modules -- all of these modules are
found in the distribution CGI directory, cgi-bin.
In general, the webscr CGI routine is the hook that makes
OpenCart look like PayPal, however there are several other routines
that can be invoked independently to allow you to customize the
behavior of the shopping cart. Here are a few of those routines:
The OpenCart application is so easy to implement that all you need to
have are links to add.pl to add items to your shopping cart, and a link
to display.pl to view the contents of the shopping cart. Buttons inside
the shopping cart allow the user to invoke all of the other features
built into the system automatically.
- add.pl is used to provide a standard (non-Paypal)
hook into the OpenCart application. It accepts values for
itemno, quantity, price, title, and other elements. You can
read the source code for this module to see the elements it
it referencing. Here is a way to buy something using add.pl
instead of webscr (its PayPal equivalent):
Purchase A Red Widget
- checkout.pl is used to start the checkout process after
someone has put one or more items in their shopping cart. This
routine is invoked directly from the shopping cart page, but can
be invoked independently as a standalone routine. It requires
no additional parameters.
- clear.pl is used to clear an exiting shopping cart.
Because the application can be configured to keep items in a
shopping cart for several days, this routine can be used to
remove everything from an existing shopping cart in a single
click. This routine does not require any parameters.
- display.pl is used to display (view) the contents of the
current shopping cart. This feature can also be invoked using
the webscr CGI routine with the parameter "display=1". If you
use display.pl to view your shopping cart, you do not have to
pass it any paramaters.
- There are several other routines that are used to handle the
checkout process, update item quzntities in an existing cart,
and handle other internal functions. In most cases, the shopping
cart handles this internally without any external intervention.