WebCatalog's shopping cart/order file format


WebCatalog automatically creates and maintains order files, so the following information is is only needed for situations where you need third-party software to interpret order files. Normally you use Add, Remove, Clear, ShowCart, Purchase, [AddLineItem], [SetLineItem], [RemoveLineItem], [Purchase] commands or contexts to manipulate the contents of an order file.

The shopping cart (and order file) format is a tab-delimited text file of the following format:

H <tab> Version <tab> Date <tab> Time <tab> Email
<tab> PayMethod <tab> AccountNum <tab> ExpMonth
<tab> ExpYear <tab> Name <tab> Company <tab> Address1
<tab> Address2 <tab> City <tab> State <tab> Zip <tab> Phone
<tab> TaxRate <tab> ShipVia <tab> ShipCost <tab> Header1
<tab> Header2 <tab> Header3 <tab> Header4 <tab> Header5
<tab> country <tab> ShipToEmail <tab> ShipToName <tab>
<tab> ShipToCompany <tab> ShipToAddress1 <tab> ShipToAddress2
<tab> ShipToCity <tab> ShipToState <tab> ShipToZip
<tab> ShipToCountry <tab> ShipToPhone <tab> Header6
<tab> Header7 <tab> Header8 <tab> Header9 <tab> Header10
<tab> Header11 <tab> Header12 <tab> Header13 <tab> Header14
<tab> Header15 <tab> Header16 <tab> Header17 <tab> Header18
<tab> Header19 <tab> Header20 <tab> Header21 <tab> Header22
<tab> Header23 <tab> Header24 <tab> Header25 <tab> Header26
<tab> Header27 <tab> Header28 <tab> Header29 <tab> Header30 
<tab> Header31 <tab> Header32 <tab> Header33 <tab> Header34
<tab> Header35 <tab> Header36 <tab> Header37 <tab> Header38
<tab> Header39 <tab> Header40 <return>
New for 2.1: WebCatalog 2.1 adds the following extra fields to the header of the order file (after Header40):
<tab> NonTaxableTotal <tab> TaxableTotal <tab> TaxTotal
<tab> ShippingTotal <tab> CartIPAddress <tab> CartUsername <tab> CartPassword
<tab> Precision <tab> TaxableShipping <tab> AuthNumber <tab> ResponseText
<tab> Status <tab> BatchNumber <tab> ReferenceNumber <tab> SequenceNumber
<tab> ItemNumber

Followed by multiple line items (one per sku, tab-delimited, return at end):

L <tab> sku <tab> quantity <tab> price <tab> taxable
<tab> canEmail <tab> unitshipCost <tab> textA
<tab> textB <tab> textC <tab> textD <tab> textE <return>

WebCatalog saves Shopping Cart files in a folder you specify in the preferences. If the ShoppingCartFolder preference is "ShoppingCarts/", then WebCatalog looks for a folder called "ShoppingCarts" in the same folder as the template being displayed. If the preference is "../ShoppingCarts/" then WebCatalog looks for the folder one level "up" from the template.

Shopping Cart files stay in the ShoppingCarts folder until they expire (24 hours of inactivity), or until the visitor presses the "Purchase" button on an invoice form. Then the file is moved to the Orders folder defined in the preferences. If you own WebMerchant, then WebMerchant will pick up the orders that appear in that folder and process them accordingly. WebCatalog itself will do nothing to the files once they are moved to the Orders folder.

Note: WebCatalog never clears out the files saved in the Orders folder. If you have a huge volume of orders, you will occasionally need to erase (or archive) older files so you don't fill up your hard disk. We purposely never touch these files because they can provide a valuable "electronic paper trail" for you. The files are named the same as the cart at the time of purchase.