[pmwiki-users] ZAP cart ready for testing...

The Editor editor at fast.st
Mon Apr 9 16:26:05 CDT 2007


I finally worked out the basic bugs in ZAP cart and have it doing
everything I wanted and a bit more.  If anyone cares to give it a
whirl, you can find the download and documentation at ZAPsite.

Some basic features include:
* simple drop in shopping cart markup
* maintain all item definitions on one Site.ZAPcart page
* direct access to payment gateway with/without cart
* built in javascript calculator so no extra js file needed
* dynamically created, editable orderform
* optional confirmation page
* uses session id so no login needed
* nearly everything is configurable

In a nutshell--basic uses are very easy, but it has enough flexibility
built in for the most complex applications.  Demo snippets
forthcoming.  Here is a basic overview of how it works from the
documentation section:

Feedback, comments, and questions welcome...

Cheers,
Dan


_______________________
Overview

The ZAP shopping cart system is simple yet powerful and flexible.  It
is not designed for enterprise level applications, but for most simple
uses, it should be quite adequate.

There are two main parts to the ZAPcart system--that can be used
separately or together.  The first part allows you to set up an easy
to use shopping cart system.  The second allows you to set up a PayPal
payment gateway.  Here is an overview of how they work.

The Shopping Cart System
1) To use the Shopping Cart, items must first be defined on the
Site.ZAPCartConfig page. These items are defined by simple text
variables as follows:

 SK: Survival Kit|7.00
 BT: Basic Training|10.00

2) You can enable users to add items to a Cart by simply putting a
(:zapcart Item:) markup on a page. A complete ZAPform is created that
saves a quantity for that item on the orderform. You can even put
several of these on one page and they will all work independently of
each other.

3) The (:zaporder:) markup generates a table drawn from the items they
have added to their cart, and calculates the subtotal, shipping and
total for the purchase. This form allows a person to change the
quantities of their purchases. You can go straight to PayPal from this
form or go to a confirmation page. If desired, the (:zappay:) markup
can be used to submit the form.

4) The optional (:zapconfirm:) markup creates a final, non-editable
version of the order form ready for submission to PayPal. Normally,
the confirm page looks for values set by the ZAPorder form (subtotal,
shipping, total), and will not work by default without it. If desired,
the (:zappay:) markup can be used to submit the form.

Either the ZAPorder or ZAPconfirm page will include email commands to
forward the order information to you. Normally you would add other
important fields to the form as well, like name, email, phone,
address, etc.  Once your order is ready, you can then send the user to
the Payment Gateway.

Payment Gateway
1) A special "paypal" page should be set up with the (:paypal:) markup
on it.  This takes all required parameters and automatically submits
the information to PayPal for processing. You will need to match the
payment confirmation from PayPal with the Order form from your
website, to ensure payment was completed.

2) To trigger the paypal page, you must submit a form with the action
set to the paypal page, and a total field set to some number
(optionally preceded by a $).  If no total field is set, it can be
inserted as a parameter in the (:paypal:) markup.  Normally this is
provided by the (:zaporder:) or (:zapconfirm:) markups, but it can be
done with a text input field, radio buttons, a hidden field, or any
other input field.

3) Upon completion of their payment, PayPal returns the user to your
specified Thank You page. If the name is difficult to guess, it
provides some security payment has been completed (for downloads,
etc.) but as of yet, I do not have a markup to verify payment, so do
not count on it. I understand PayPal can send a payment confirmation
code--and if someone does the research for me, I'll add a system for
taking advantage of that information.

Using the Payment Gateway by itself makes it easy to charge a
membership fee, purchase single items, make a donation, etc.  Enjoy!



More information about the pmwiki-users mailing list