Re: How can I Add several Items into the cart at once?
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 13682
interpreted = N
texte = >How would you suggest I use the showif to see if the checkbox has been>clicked? Is there someway to pass this info with the submit button?WebCatalog makes every form variable available to you upon submit, so in your case there are 6 checkboxes named box1, box2, etc. If you put [box1] into your shoppingcart.tmpl, it will either display cdp005001H or it will display [box1]. Web browsers are weird; if a checkbox is unchecked, then it's as though it doesn't exist in your form at all, so that's why WebCatalog displays literally [box1].The following lines mean if box1 has a value other than literally [box1], then add the sku associated with box1 to the cart[ShowIf [box1]![raw][box1][/raw]][AddLineItem cart=[cart]&db=Photos.db&sku=[box1]]sku=[box1][/AddLineItem][/ShowIf][ShowIf [box2]![raw][box2][/raw]][AddLineItem cart=[cart]&db=Photos.db&sku=[box2]]sku=[box2][/AddLineItem][/ShowIf]I also really like the idea of using frames, so you can have a little contents of cart frame somewhere that gets updated every time they click a add button, but it leaves the main frame unchanged.Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ====Pacific Coast Software | WebCatalog, WebMerchant11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMasterSan Diego, CA 92128 | SiteGuard619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com
Associated Messages, from the most recent to the oldest:
>How would you suggest I use the showif to see if the checkbox has been>clicked? Is there someway to pass this info with the submit button?WebCatalog makes every form variable available to you upon submit, so in your case there are 6 checkboxes named box1, box2, etc. If you put [box1] into your shoppingcart.tmpl, it will either display cdp005001H or it will display [box1]. Web browsers are weird; if a checkbox is unchecked, then it's as though it doesn't exist in your form at all, so that's why WebCatalog displays literally [box1].The following lines mean if box1 has a value other than literally [box1], then add the sku associated with box1 to the cart[ShowIf [box1]!
[raw][box1][/raw]][AddLineItem cart=
[cart]&db=Photos.db&sku=[box1]]sku=[box1][/AddLineItem][/ShowIf][ShowIf [box2]!
[raw][box2][/raw]][AddLineItem cart=
[cart]&db=Photos.db&sku=[box2]]sku=[box2][/AddLineItem][/ShowIf]I also really like the idea of using frames, so you can have a little contents of cart frame somewhere that gets updated every time they click a add button, but it leaves the main frame unchanged.Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ====Pacific Coast Software | WebCatalog, WebMerchant11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMasterSan Diego, CA 92128 | SiteGuard619/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:
Signal Raised Error (1997)
remotely add + sign (1997)
WebDNA Quick Reference (Reserved Words) (2000)
[ModDate] & [ModTime] ? (1997)
Banner ads example (1997)
iTools5.0014 and up + WebCat = DownServer (2000)
Error after loading WebDNA (2004)
CommandSecurity? (1997)
View Source from cache (1997)
Show if time tags (1997)
Adding new customer numbers sequentially (1997)
textarea question (1998)
[setcookie] (2001)
Problems getting parameters passed into email. (1997)
[Q] Novice's question (1997)
[OT] CSS and SSI books (2004)
Secure server question (1997)
problems with 2 tags (1997)
Re[2]: WebCatalog on Linux (2000)
expired beta (1997)