[SetHeader Parameters]values[/SetHeader]

Changes a header values in a shopping cart.

To change a header values in a visitor's shopping cart, put a SetHeader context into a template (alternately, you may use the ShowCart command from a URL or a FORM). Whenever WebCatalog encounters a SetHeader context, it opens the shopping cart file and changes values in the headers you specify. The item's quantity, textA-E, and cart header fields are all changeable. Also see Remove, Clear, ShowCart, [AddLineItem], [SetLineItem], and Purchase.

Example (normally you would put the following text into a .tpl file on your server and use a web browser to link to it):

[SetHeader cart=5678&db=catalog.txt]ShipToZip=92128&Header9=Blue[/SetHeader]

Try It!

Shopping cart file "5678" is opened, and ShipToZip is changed to 92128 and Header9 changed to "Blue" (as specified in the context above).

Here are the parameters to the SetLineItem context:




Product database that contains the SKU, price, and other information


Shopping cart file (from ShoppingCarts folder) that is to be affected


(alternative to cart) Shopping cart file (from any folder) that is to be affected. Unlike cart, this file can be in any folder. Specify the file URL-relative to the template.
Context value Description (these values go inside the context)

Header Field

You may set any shopping cart header field (such as Name, taxRate, Address1, etc.) at the same time you add a product to the cart. See complete list of Header Fields