Modify an existing line item in an order file
numero = 292[setlineitem cart=5678&db=catalog.db]quantity=4&textA=Blue[/setlineitem]Shopping cart file "5678" opens, and line item 3's quantity changes to 4 and textA changes to "Blue" (as specified in the context above).Here are the parameters to the [setlineitem] context:
| Parameter | Description |
|---|---|
| db | Product database containing the SKU, price, and other information. |
| index | Uniquely identifies which line item should be modified. |
| cart | Affected shopping cart file (from ShoppingCarts folder). |
| file | (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) |
| password | (Optional) In order to change the price (see below) you must provide the line item change password, which can be set in the preferences. |
| price | Optional) Sometimes you may need to change the price of a product after it has already been added to the cart. Normally you use a formula to vary pricing, but since formulas only apply when a product is initially added to the cart, this alternate technique may be needed. Remember to put the line item change password (see above) into the parameters. |
| Lineitem Field | Any line item field. See order file for the list of available line item fields. Values set in the context will override values pulled from the product database. |
| Header Field | Any header field may also be modified at this time. See order file for the list of available header fields. |
[setlineitem cart=5678&db=catalog.db]quantity=4&textA=Blue[/setlineitem]
| Parameter | Description |
|---|---|
| db | Product database containing the SKU, price, and other information. |
| index | Uniquely identifies which line item should be modified. |
| cart | Affected shopping cart file (from ShoppingCarts folder). |
| file | (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) |
| password | (Optional) In order to change the price (see below) you must provide the line item change password, which can be set in the preferences. |
| price | Optional) Sometimes you may need to change the price of a product after it has already been added to the cart. Normally you use a formula to vary pricing, but since formulas only apply when a product is initially added to the cart, this alternate technique may be needed. Remember to put the line item change password (see above) into the parameters. |
| Lineitem Field | Any line item field. See order file for the list of available line item fields. Values set in the context will override values pulled from the product database. |
| Header Field | Any header field may also be modified at this time. See order file for the list of available header fields. |
DOWNLOAD WEBDNA NOW!
...
AWS Raw WebDNA LAMP-Plus WebServerAmazon Web Services (AWS) README for Machine Image ID...
Download WebDNA ApplicationsWebDNA applications...
WebDNA LibrariesA list of available libraries for WebDNA...
F.A.QA compilation of some user's questions...
Technical Change HistoryThis Technical Change History provides a reverse chronological list of WebDNA changes...
[append db=base...
[appendfile]Writes text to the end of an existing file...
[filecompare]Compares the size...
[function]This context enables the WebDNA programmer to call a previously defined block of WebDNA code...
[replacefounditems]Replaces each found record in a database with the new field values...
[loop]Loops through the enclosing text the specified number of times...