Clear?cart=[cart]
To remove all products from a visitor's shopping cart, click a URL containing the Clear command. Whenever WebCatalog receives a Clear command, it opens the shopping cart file and removes all LineItems from the shopping cart. The template displayed after the Clear command can contain any header fields from the order file (cart), and can contain a [LineItems] loop (but of course no line items will ever appear because they are all gone now).
Example (normally you would link to a URL or form containing the following information):
Try It!
Shopping Cart file "5678" is opened, and all line items are removed from the list. The page sent back to the browser will be xx.tpl, which typically contains a message confirming that the shopping cart is empty.
Here are the parameters to the Clear command:
Parameter | Description |
---|---|
cart |
Shopping cart file that is to be cleared |
template |
Template of HTML to be displayed after clearing |