This method is only supported by the Classic (v1) version of the cart.
Not all merchants need the facilities of a full shopping cart. Many have only a handful of products and a simple order form may be all that is required. Also some merchants already have some sort of ordering system and just want to take advantage of the payment processes built into our systems.
To help in these circumstances we have created a script which allows you to place a form on your website which collects the customers name, address and product details they wish to purchase. This form can be posted straight into a Payment options page.
OK, it sounds simple but it isn't!
The script will draw on your setup in Admin in order to calculate tax, shipping and discounts. In some case that means it is necessary to include extra information for those calculations to be made. In addition, in some cases, the data must conform to the correct format.
So this is a complex script, indeed in many ways it's a condensed version of the whole cart, and needs to be setup very carefully in order to work properly. You have been warned....
The pay.cfm script does not support shipping calculations using the Advanced shipping system.
Your form method must be POST and the action URL should be set to:
<FORM METHOD="POST" ACTION="http://ww#.aitsafe.com/cf/pay.cfm">
<input type=hidden name=userid value=1234567>
Products. Products are posted in exactly the same way as the multi-product form for adding items to the cart, the so called addmulti.cfm script. Click here for details.
Name and address. In addition to the products the customer may wish to purchase you need to collect the customers name and address. If you want you can also include their delivery address as well. The field names are:
|Invoice to name||inv_name|
|Invoice to company||inv_company|
|Invoice to address||inv_addr1|
|Invoice to city||inv_addr2|
|Invoice to state||inv_state|
|Invoice to ZIP/Postal code||inv_zip|
|Invoice to country||inv_country|
|Ship to name||del_name||Yes|
|Ship to company||del_company||Yes|
|Ship to address||del_addr1||Yes|
|Ship to city||del_addr2||Yes|
|Ship to state||del_state||Yes|
|Ship to ZIP/Postal code||del_zip||Yes|
|Ship to country||del_country||Yes|
Form fields for name, invoice address and shipping address will be validated in accordance to the rules you have setup in Admin >> Required fields.
Messages The script can also accept an incoming message field. This can be as simple as form field named message or something much more complex. Once again the syntax conforms to Method 2 for posting a message into the cart. Click here for details.
Shipping by zones, options 4 to 7: In setting up these shipping options you may have anything from one to five different zones. If you have only one then you don't need to worry about it. However if you have more than one then you should include a field made from either radio buttons or a drop down selection corresponding to your zones.
The name of the field for your shipping zones selection should be shipping_zone. The values should be in a range from 1 to 5. If you post in a value that doesn't exist, for example you post 5 when you have only 4 zones setup then an error message will be generated.
Tax check box: If you have this tax option selected then include in your form a check box field with the name taxable with any value (for example value=1). When checked tax will be included.
Tax by US State: This option will take the input from the inv_state field. However the state must come in as a two letter code.
Formats for specific Payment Gateways: Many payment gateways (including PayPal, Sagepay, Worldpay) needs the inv_country field to be an ISO two letter code. Click here for the HTML for such a list. It will open in a new window.
<form action="http://ww9.aitsafe.com/cf/pay.cfm" method="post">
<input type="hidden" name="userid" value="3100170">
<input type="hidden" name="return" value="www.mals-e.com/featuresDemo.php">
<input type="text" name="inv_name">Name
<input type="text" name="inv_company">Company
<input type="text" name="inv_addr1">Address
<input type="text" name="inv_addr2">City
<input type="text" name="inv_state">State
<input type="text" name="inv_zip">Zip
<input type="text" name="inv_country">Country
<input type="text" name="tel">Phone
<input type="text" name="email">Email
AwarePro Viewer @ $199
<input type="text" name="qty1" size="1">
<input type="hidden" name="product1" value="AwarePro Viewer">
<input type="hidden" name="price1" value="199.00">
AwarePro Authoring Kit (Create) @ $299
<input type="text" name="qty2" size="1">
<input type="hidden" name="product2" value="AwarePro Authoring Kit (Create)">
<input type="hidden" name="price2" value="299.00">
AwarePro Export Utility @ $249
<input type="text" name="qty3" size="1">
<input type="hidden" name="product3" value="AwarePro Export Utility">
<input type="hidden" name="price3" value="249.00">
AwarePro Viewer User Manual (printed copy) @ $49.95
<input type="text" name="qty4" size="1">
<input type="hidden" name="product4" value="AwarePro Viewer User Manual (printed copy)">
<input type="hidden" name="price4" value="49.95">
<input name="submit" type="submit" value="Buy Now!">