Re: FormVariable
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 23523
interpreted = N
texte = What is your actual setup?i guess i would do a scenario like the following:The person enters the site, a unique cart is created.You have two choises that would be right1. set a cookie [setcookie id=[card]], i sometimes prefer not to thisbecause of all the persons that either disallow cookies or has browsersthat dont work, or work well with cookies2. let the value of the card continue to each other page!then you can collect all the info you want about the user, and store itusing contextsthe simple way is with the cookies, the best is with letting the id passfrom page to pagewhat i normally do ismake a customers.db (to make the shopowner to get more statistics on theuse of the shop) with all regular info of the customer like name, addressetc maybe even encrypted!The sku of each record in that should be equal to another db which is a dbwith about the same info as a regular shoppingcart.When the customer is adding products to the basket, it first checks ifthe order that the customer is working on, is actual processed. If so, theuser has allready sent the order, but gone back, (using the back button inthe browser), and tried to change the orderwhen the order is processed i close down the database, and move theorderfile to a completed orders folder, so that the user cant change theorder, but only make a new order!got anything out of this?A simple thing that might help you work out a solution is:you can allways send webcat variables along to the next page without usingforms or doing commands. just like a
However if you want it to work around proper way, you might want to add[url] to the variables, like:After this you can allways retrieve that info on the nextpage.tpl bysimply adding a [var1] and [var2]Probably the easiest way of passing along information, but at the sametime, possible one of the most unsecure!/martin>You are right, I don't want to show them, I want to use them. Perhaps I>stated it>wrong by saying I wanted to use the info for database lookups. I really>just need>to stuff their values into the cart.>>My application is fairly simple, but I need to collect information about the>shopper on one page and then use it two pages later when I have a sku and>can write>to the cart. I'm using textA-textE in the cart to store that shopper info. My>client wants to get the shopper data first, like getting to know you before>presenting the shopping cart page.>>I'm a newbee to webcart....so I appreciate your patience ;->>>Jan>>Martin Bech wrote:>>> I dont think its possible normal way!>>>> because when using the formvariables it will list all the values, which i>> guess is not what you want!>>>> If you want it to be a lookup, instead of a search context, you should put>> a [lookup db=your.db&lookinfield=yourfield&value=[formvariables][showif>>>>[name]=theName][value][/showif][/formvariables]&returnfield=thereturnfield¬fo>> und=theNotFoundText]>>>> I would considder a search in stead!>>>> /Martin>>>> >I want to use FormVariable to do database lookups....not to list the>> >variables on a page but use the values for processing. Anyone have any>> >insight into this?>> >>> >thanks,>> >Jan
Associated Messages, from the most recent to the oldest:
What is your actual setup?i guess i would do a scenario like the following:The person enters the site, a unique cart is created.You have two choises that would be right1. set a cookie [setcookie id=[card]], i sometimes prefer not to thisbecause of all the persons that either disallow cookies or has browsersthat dont work, or work well with cookies2. let the value of the card continue to each other page!then you can collect all the info you want about the user, and store itusing contextsthe simple way is with the cookies, the best is with letting the id passfrom page to pagewhat i normally do ismake a customers.db (to make the shopowner to get more statistics on theuse of the shop) with all regular info of the customer like name, addressetc maybe even encrypted!The sku of each record in that should be equal to another db which is a dbwith about the same info as a regular shoppingcart.When the customer is adding products to the basket, it first checks ifthe order that the customer is working on, is actual processed. If so, theuser has allready sent the order, but gone back, (using the back button inthe browser), and tried to change the orderwhen the order is processed i close down the database, and move theorderfile to a completed orders folder, so that the user cant change theorder, but only make a new order!got anything out of this?A simple thing that might help you work out a solution is:you can allways send webcat variables along to the next page without usingforms or doing commands. just like a
However if you want it to work around proper way, you might want to add[url] to the variables, like:
[url]myName[/url]&var2=
[url]MyAddress[/url]>After this you can allways retrieve that info on the nextpage.tpl bysimply adding a [var1] and [var2]Probably the easiest way of passing along information, but at the sametime, possible one of the most unsecure!/martin>You are right, I don't want to show them, I want to use them. Perhaps I>stated it>wrong by saying I wanted to use the info for database lookups. I really>just need>to stuff their values into the cart.>>My application is fairly simple, but I need to collect information about the>shopper on one page and then use it two pages later when I have a sku and>can write>to the cart. I'm using textA-textE in the cart to store that shopper info. My>client wants to get the shopper data first, like getting to know you before>presenting the shopping cart page.>>I'm a newbee to webcart....so I appreciate your patience ;->>>Jan>>Martin Bech wrote:>>> I dont think its possible normal way!>>>> because when using the formvariables it will list all the values, which i>> guess is not what you want!>>>> If you want it to be a lookup, instead of a search context, you should put>> a [lookup db=your.db&lookinfield=yourfield&value=
[formvariables][showif>>>>[name]=theName][value][/showif][/formvariables]&returnfield=thereturnfield¬fo>> und=theNotFoundText]>>>> I would considder a search in stead!>>>> /Martin>>>> >I want to use FormVariable to do database lookups....not to list the>> >variables on a page but use the values for processing. Anyone have any>> >insight into this?>> >>> >thanks,>> >Jan
Martin Bech
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:
flushdatabases (1997)
[WebDNA] [OT] WebDNA Wiki - need grammar check / suggestions (2009)
Running 2 two WebCatalog.acgi's (1996)
Just Testing (1997)
Eudora Plugin (1999)
ShipTotal Again (1998)
[append] problem (1997)
mac hack (1997)
SiteGuard Admin Feature ? (1997)
Cart Number sequence (1997)
shipCost not working v2.1b4 (1997)
WebCatalog dying in WebTen Revisited (1998)
[OT] SMTP Server for W2000 (2002)
Webcat & SIMS (1998)
Stopping bad HTML propagation ? (1997)
Emailer again & again (1997)
ShowNext for method=POST (1997)
EIMS Problems (1997)
Fun with dates (1997)
[WebDNA] [replacefounditems] fails (2009)