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:
international time (1997)
Sorting Numbers (1997)
TCPConnect / TCPSend to Solaris NN Enterprise (2002)
Clickable maps and WebCatalog? (1996)
[WebDNA] [announce] Marketing new hire (2009)
using showpage and showcart commands (1996)
OLD ORDERS (1998)
Suddenly can't see files... (2000)
[OT] HTML lists and IE (2007)
Shared databases (2003)
[WebDNA] OAuth - anybody done this yet? (2009)
WebCatalog2 Feature Feedback (1996)
Protect (1997)
2.0 Info (1997)
RE: WebCatalog NT beta 18 now available (1997)
Date Sorting (1997)
WC Database Format (1997)
[WebDNA] Use of Linux commandline (2013)
Error:Too many nested [xxx] contexts (1997)
Ready,Set; Print! (1999)