You can configure the cart to make a silent HTTP (or HTTPS) call back to your website on the successful completion of an order. This is definitely an advanced option because it is assumed that the call will post to some sort of script. Possible uses include; your own affiliate program, update an inventory product database or send the customer a customized email.


The method can be a GET or a POST request and any text returned by the server is ignored. It is strongly recommend that you declare the variables in your script properly. New columns/fields are added to the remote call on a regular basis.

 

DEMO SCRIPT

There are three demo scripts available for download for PHP, Perl/CGI and Cold Fusion. Each one simply sends an email to your customer based on the information included in the call. There is no standard way to send an email from a ASP page so that's why there isn't one as well.

Included in the zip file is a plain HTML form that can be used to test your script in place of the cart. Then:

  1. Open the script and change the sender's email address to yours.
  2. Upload the script to your website. If you are using the PERL/CGI version then you will need to make the FTP transfer as ASCII and chmod the file to 755 (try right click on the file in your FTP client to find an option to do that).
  3. Edit the test form to point to the location where you have placed the script.
  4. Upload the test form and fire!
  5. If it works and you successfully send yourself an email, good.

Please note: Sorry but we cannot support these scripts directly ourselves. It's simply too much time sorting out people's scripting problems. They are there to give you a little help.


And the scripts themselves:

Trent McCartney has contibuted a Perl version that can send an HTML email. He is also happy to answer questions if you have problems with it.

The Perl/CGI versions uses Sendmail so they won't work on a Windows NT server.

Chris Chaudruc has written a simple script in PHP that saves the data to a MySQL database.

 

MAINTAINING STATE - SESSIONS

You may be integrating the cart into your own systems. In which case you may need to maintain state across the transaction. To do this you can post a field called sd which is carried through and posted back in the Remote call.

 

STOCK CODES

Doing a look-up on a product database will be much easier if you have have included a stock code in your Buy Now links. Use a field named scode (or scode# with an addmulti.cfm form). The value will be included as the fourth part for each item in the returned cart string. For example with two products sold in an order that have codes PX001 and PT0045 you might receive back a cart looking something like:


First product description:1:9.99:0:PX001~Second product description:2:8.99:0:PT0045

 

FIELD LIST


FIELD NAME DESCRIPTION SPEC
username Your username Char(8)
id Customer/Shopper ID Integer
ip The customer's IP address Char(15)
date Date/time the order was placed Char(20)
method Payment method ie Card, Check, MO Char(15)
giftvcode Gift voucher used to pay with Char(15)
giftvamount Gift voucher amount Decimal(13,2)
pay_data A pipe | delimited list of data relating to a payment (PayPal Payer ID, etc.) Char(200)
cart Each product is delimited by a ~ and description, quantity, price, shipping units, stock code by colons : Blob
giftvouchers Each voucher/certificate is delimited by a ~ and amount, name, email and message for recipient by colons : Blob
voucher Discount voucher Char(15)
vval Discount voucher value Decimal(13,2)
subtotal Decimal(13,2)
discount Discount given Decimal(13,2)
shipping Value of shipping Decimal(13.2)
tax Value of sales tax Decimal(13,2)
total Total value of order Decimal(13,2)
shipping_zone Shipping to zone, numeric ie 1, 2 or 3 Tiny Integer
shipping_calc Data from shipping calculations Char(100)
inv_name Name to invoice to Char(50)
inv_company Company name Char(40)
inv_addr1 Char(50)
inv_addr2 Char(50)
inv_state Char(25)
inv_zip Char(15)
inv_country Char(15)
inv_id Tax ID Char(16)
del_name Name to Deliver to Char(50)
del_company Char(40)
del_addr1 Char(50)
del_addr2 Char(50)
del_state Char(25)
del_zip Char(15)
del_country Char(15)
del_tel Ship to telephone number Char(20)
tel Telephone number Char(20)
fax Fax or Mobile number depending on your setup Char(20)
email Email address of customer Char(50)
currency Tiny Integer
extra Unsecure payment option data Char(200)
message Customer message Blob
edata Extra customer data fields Char(240)
sd Your session data Blob
hash md5( Username . Shopper ID . Order Total . Secret Key) Char(32)