Re: [addlineitems]
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 15059
interpreted = N
texte = >I would then like to add the [addlineitem]pair to this page(I think) so >that when selected the appropriate item is then added to the cart.No; that's the problem. The way HTML works, you don't get to see the values of checkboxes until the *next* page. Just clicking a checkbox on and off doesn't cause any WebDNA or anything else to execute. That's because at that point everything is happening on the local user's home computer. You need to submit a form before the web server can see what form variables have been set.So go ahead and put your checkboxes on the page as you suggested, then on your ShoppingCart page put the [AddLineItem] stuff at the top:-- ShoppingCart.tpl --HTML header stuff[Showif SomethingImportant][AddLineItem db=xx&cart=[cart]&sku=[CheckedSKU]]quantity=1&sku=[CheckedSKU][/AddLineItem][/ShowIf]...by this point, the items have been added, so now you want to display the contents of the order file...[OrderFile cart=[cart]]...[LineItems]...[/LineItems][/OrderFile]Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ====Pacific Coast Software | WebCatalog, WebMerchant,11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster,San Diego, CA 92128 | Typhoon619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/
Associated Messages, from the most recent to the oldest:
>I would then like to add the
[addlineitem]pair to this page(I think) so >that when selected the appropriate item is then added to the cart.No; that's the problem. The way HTML works, you don't get to see the values of checkboxes until the *next* page. Just clicking a checkbox on and off doesn't cause any WebDNA or anything else to execute. That's because at that point everything is happening on the local user's home computer. You need to submit a form before the web server can see what form variables have been set.So go ahead and put your checkboxes on the page as you suggested, then on your ShoppingCart page put the
[addlineitem] stuff at the top:-- ShoppingCart.tpl --HTML header stuff[Showif SomethingImportant][AddLineItem db=xx&cart=
[cart]&sku=[CheckedSKU]]quantity=1&sku=[CheckedSKU][/AddLineItem][/ShowIf]...by this point, the items have been added, so now you want to display the contents of the
order file...[OrderFile cart=
[cart]]...
[lineitems]...[/LineItems][/OrderFile]Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ====Pacific Coast Software | WebCatalog, WebMerchant,11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster,San Diego, CA 92128 | Typhoon619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/
Grant Hulbert
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:
WebCat 3.04-3.07 plug-in dying on server.... (2000)
Link with [cart] in db field (1999)
[WebDNA] java class (2014)
Can I do these? (1997)
serial number (1998)
WebCat2 Append problem (B14Macacgi) (1997)
Fwd: Protect Tag and Groups (1998)
close to search (2001)
Don't tick me off :) [elaspedtime] (1997)
Price written to db as scientific notation??? (1999)
Search for starts with and ends with? (2003)
company names not begin with a letter (2005)
UPPERCASE (1997)
Using [detete] (1998)
WebCat2b15MacPlugin - [protect] (1997)
Frames and WebCat (1997)
multipart part 2 (2004)
syntax question, not in online refernce (1997)
Modifying order output (1997)
WebCatalog NT beta 18 problem (1997)