Re: variables in [addlineitem]
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 17316
interpreted = N
texte = >I am reading a form with POST, variable itemtoadd is defined and is>shown on the page right before addlineitem:> itemtoadd: [math]itemtoadd[/math]
>>But when I include the variable into [addlineitem], WebCat shows>[itemtoadd] instead of using the value (does not find sku):> [addlineitem> db=luz_clients.db&cart=[cart]&sku=[itemtoadd]]> quantity=[value]> [/addlineitem]>>If I put the variable inside [math] WebCat loops indefinitely.> [addlineitem> db=luz_clients.db&cart=[cart]&sku=[math]itemtoadd[/math]]> quantity=[value]> [/addlineitem]>>If I write it like this:> ...&[math]sku=itemtoadd[/math]...>then WebCat complains: you need a sku value>>How can I use variables in [lineitems]?1- First, you need to assign a value to itemToAdd, like this:[math]itemtoadd=0[/math]2- Then make sure you put the itemToAdd variable INSIDE a [math] context wherever you need to use it. In other words, use [math]itemtoadd[/math] instead of [itemToAdd], because WebCat doesn't recognize [itemToAdd] as a math variable unless it's inside a math context.Sincerely,Ken Grome808-737-6499WebDNA Solutionsmailto:ken@webdna.nethttp://www.webdna.net
Associated Messages, from the most recent to the oldest:
>I am reading a form with POST, variable itemtoadd is defined and is>shown on the page right before addlineitem:> itemtoadd:
[math]itemtoadd[/math]
>>But when I include the variable into
[addlineitem], WebCat shows>[itemtoadd] instead of using the value (does not find sku):> [addlineitem> db=luz_clients.db&cart=
[cart]&sku=[itemtoadd]]> quantity=[value]> [/addlineitem]>>If I put the variable inside
[math] WebCat loops indefinitely.> [addlineitem> db=luz_clients.db&cart=
[cart]&sku=
[math]itemtoadd[/math]]> quantity=[value]> [/addlineitem]>>If I write it like this:> ...&
[math]sku=itemtoadd[/math]...>then WebCat complains: you need a sku value>>How can I use variables in
[lineitems]?1- First, you need to assign a value to itemToAdd, like this:
[math]itemtoadd=0[/math]2- Then make sure you put the itemToAdd variable INSIDE a
[math] context wherever you need to use it. In other words, use
[math]itemtoadd[/math] instead of [itemToAdd], because WebCat doesn't recognize [itemToAdd] as a math variable unless it's inside a math context.Sincerely,Ken Grome808-737-6499WebDNA Solutionsmailto:ken@webdna.nethttp://www.webdna.net
Kenneth Grome
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Error Log.db --however (1997)
emailer (1997)
WebCat2 several catalogs? (1997)
Random sort is not random at all..... (2000)
Tags not being Interpreted-Resending (1999)
Security Issue (1999)
weird user / authenticate happenings (2003)
emailer (1997)
PSC recommends what date format yr 2000??? (1997)
Quest renew freware program for FunnelWeb! (2006)
Help name our technology! (1997)
rotating thumbnails (1997)
PCS Frames-Default page is solution! (1997)
emailer (1997)
READFILE command? (1998)
RequiredFields template (1997)
Help with sorting search results sorting (1998)
Site / Database Structure (2002)
[WebDNA] Is [math] on a number with too many digits the only way that I can get scientific notation out of webdna? (2011)
[WebDNA] Clean URLS job - will pay (2010)