SetLineItemContext.html [SetHeader Parameters]values[/SetHeader]
Changes header values in a shopping cart.

To change header values in a visitor's shopping cart, place a SetHeader context into a template (alternately, you may use the ShowCart command from a URL or a FORM). Whenever WebDNA 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]

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

Here are the parameters to the SetLineItem context:
Product database containing the SKU, price, and other information.
Affected shopping cart file (from ShoppingCarts folder).
(alternative to cart) Affected shopping cart file (from any folder). 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

User Contributed Notes

Copyright © 2008 WebDNA Software Corporation, Inc.