Adds a product to the specified shopping cart
numero = 222[addlineitem cart=5678&sku=1234&db=catalog.db][!][/!]quantity=5&[!][/!]textA=Red[!][/!][/addlineitem]The database "catalog.db" is searched, and sku 1234 is found. Shopping cart file "5678" opens, and a new line item is added to the bottom of the list, with a quantity of 5 and textA set to "Red" (as specified in the context above). The price is taken from the database's price field (or, if a formula for [price] is available in formulas.db, the price is calculated using that formula).Note: you may also add line items to order files that are not inside the ShoppingCarts folder. Using file=/folder/folder/cartname instead of cart=cartname, you can affect any order file in any folder.Note: you may add a maximum of 100 line items to a shopping cart.Here are the parameters to the [addlineitem] context:
Parameter | Description |
---|---|
db | Product database containing the SKU, price, and other information. |
sku | Uniquely identifies which product should be added to the cart. |
cart | Affected shopping cart file (from ShoppingCarts folder) |
file | alternative to cart) Alternate 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 values | Description (these values go inside the context) |
password | (Optional) In order to change the price (see "price") you must provide the lineitem change password, which can be set in the preferences. |
price | (Optional) Sometimes you may need to change the price of a product while adding it to the cart. Normally you use a formula to vary pricing, but sometimes this alternate technique is preferred. Remember to put the line item change password into the parameters. There is a slight security risk when using this technique, as a hacker could create a URL containing their own price values |
textA | (Optional) Extra information of any kind that you want associated with this line item. Often used to store extra product information, such as "shoe size" or "color." Also used to pass catalog database fields such as [title] through to the order file so they may be viewed later without needing the original database to look for the value of [title]. |
textB ... textZ | Same as textA above. |
quantity | (Optional) Indicates quantity of this item. This quantity is used when calculating subtotals, unitshipcost, etc. |
taxable | (Optional) "T" or "F". Overrides "taxable" field in the database - normally the information about the item's taxable status is taken from a field called "taxable." |
canemail | (Optional) "T" or "F". Overrides "canemail" field in the database - normally the information about the item's canemail (electronically deliverable) status is taken from a field called "canemail." |
unitshipcost | (Optional) A number indicating the item's price for shipping. Overrides "unitshipcost" field in the database - normally the information about the item's unitshipcost status is taken from a field called "unitshipcost." shiptotal and grandtotal use this number (multiplied by quantity) to determine the total shipping and grand total. |
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. Header fieldnames are different from the line item fieldnames, and WebDNA will know they are header fields. |
[addlineitem cart=5678&sku=1234&db=catalog.db][!]
[/!]quantity=5&[!]
[/!]textA=Red[!]
[/!][/addlineitem]
Parameter | Description |
---|---|
db | Product database containing the SKU, price, and other information. |
sku | Uniquely identifies which product should be added to the cart. |
cart | Affected shopping cart file (from ShoppingCarts folder) |
file | alternative to cart) Alternate 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 values | Description (these values go inside the context) |
password | (Optional) In order to change the price (see "price") you must provide the lineitem change password, which can be set in the preferences. |
price | (Optional) Sometimes you may need to change the price of a product while adding it to the cart. Normally you use a formula to vary pricing, but sometimes this alternate technique is preferred. Remember to put the line item change password into the parameters. There is a slight security risk when using this technique, as a hacker could create a URL containing their own price values |
textA | (Optional) Extra information of any kind that you want associated with this line item. Often used to store extra product information, such as "shoe size" or "color." Also used to pass catalog database fields such as [title] through to the order file so they may be viewed later without needing the original database to look for the value of [title]. |
textB ... textZ | Same as textA above. |
quantity | (Optional) Indicates quantity of this item. This quantity is used when calculating subtotals, unitshipcost, etc. |
taxable | (Optional) "T" or "F". Overrides "taxable" field in the database - normally the information about the item's taxable status is taken from a field called "taxable." |
canemail | (Optional) "T" or "F". Overrides "canemail" field in the database - normally the information about the item's canemail (electronically deliverable) status is taken from a field called "canemail." |
unitshipcost | (Optional) A number indicating the item's price for shipping. Overrides "unitshipcost" field in the database - normally the information about the item's unitshipcost status is taken from a field called "unitshipcost." shiptotal and grandtotal use this number (multiplied by quantity) to determine the total shipping and grand total. |
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. Header fieldnames are different from the line item fieldnames, and WebDNA will know they are header fields. |
DOWNLOAD WEBDNA NOW!
BioType is a behavioral biometrics WebDNA function based on ADGS research and development (from version 8...
WebDNA ModulesA list of the currently available modules...
WebDNA LibrariesA list of available libraries for WebDNA...
AWS Raw WebDNA LAMP-Plus WebServerAmazon Web Services (AWS) README for Machine Image ID...
Download WebDNA ApplicationsWebDNA applications...
Technical Change HistoryThis Technical Change History provides a reverse chronological list of WebDNA changes...
Lists all the fields in the specified database...
[lookup]...
[addfields][addfields db=...
[sendmail]There is hardly a website that doesn't at some point need to send an email...
[shell][shell] is a way to use the command line with your webserver...
[!]Hides text...